Methods used in informatics require input data that are in a machine-readable, structured format. Materials data, in particular, can be exceedingly complex, so defining data formats to store any and all materials-related information is a daunting task. In this article, we discuss a hierarchical data structure used for storing materials data called the physical information file (PIF). The PIF is a flexible schema for storing the structure, processing history, and properties of materials, devices, and physical systems. In addition to a general discussion of the schema, we give examples of its use in representing complex materials systems. We also describe open-source tools that have been developed for building and reading files using the PIF schema.