Sustainability of Digital Formats: Planning for Library of Congress Collections |
|
![]() |
|
Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact |
Full name | MySQL Table Definition Format |
---|---|
Description |
The MySQL Table Definition Format (FRM) is an internal systems file which stores the metadata used to form table definition (column names and other relationship metadata) of a MySQL or MariaDB database. MySQL and MariaDB are both relational database management systems (RDBMS). An FRM file is always used in tandem with either a MySQL Database Data File (MYI) or MyISAM Indexes File (MYD) file, which store the contents of the database. Earlier versions of MySQL and MariaDB would automatically create an FRM file based on the table names. There is no restriction to how many tables a database can hold. Both MySQL and MariaDB have removed FRM files from their current versions. MySQL deprecated FRM in version 8.0 and MariaDB deprecated it in version 11.0. The file type was not replaced with a different file type. Instead, both MySQL and MariaDB retain the data previously saved in an FRM file directly within the software. FRM in the filename extension is short for "FoRM." This is a legacy terminology from a predecessor to MySQL called UNIREG (ca. 1979), which used the term "form" instead of "table" to represent database structure. MySQL was created by MySQL AB, a Swedish company founded by David Axmark, Allan Larsson and Michael "Monty" Widenius. It was named after Widenius’ daughter My. MySQL is a proprietary software owned by Oracle. Widenius left MySQL in 2010 and created a new RDBMS named MariaDB (named for his second daughter Maria). MariaDB utilizes the same file types as MySQL, operates on the same logic, and is open source. Generally, statements about the MySQL Table Definition Format may be applied to both MySQL and MariaDB systems. MySQL versions 5.7 and earlier automatically generated table-based FRM files whenever a new table was created. These files will always be in binary. MySQL users can prompt a 'CREATE VIEW' database action, which will create a plain text file with the FRM extension. These files are not the same as the MySQL Table Definition Format. See MySQL View Definition Format for more information. MySQL has the option to use different storage engines (e.g. MyISAM or InnoDB), but FRM files are generated regardless of the chosen storage engine. See "Relationship to other formats" for more details about additional files that are stored alongside FRM files as they differ based on the chosen storage engine. |
Production phase | This is a production file. It can be used to fully restore a MySQL database only if other files (MySQL Database Data File [MYI] or MyISAM Indexes File [MYD] file) are present and a matching version of MySQL is running. For example, if the files were created using MySQL 5.5, the files could only be restored into a MySQL 5.5 version database. This is not a file used for making a preservation copy or an official export from the MySQL database. |
Relationship to other formats | |
May have component | MySQL Database Data File (.myd) was the default data storage engine for the MySQL RDBMS versions prior to 5.5. Not described separately at this time. |
May have component | MyISAM Indexes File (.myi, PRONOM ID: fmt/1197) was the default index storage engine for the MySQL RDBMS versions prior to 5.5.5 MyISAM was the default MySQL storage engine. Not described separately at this time. |
May have component | MySQL InnoDB Table File (.ibd) was a file created by the InnoDB database engine that stores table-specific tablespace and index data. InnoDB is the default storage engine for MySQL and MariaDB versions later than version 5.5.5. InnoDB was available as a plug-in starting in version 5.1. Not described separately at this time. |
May have component | MySQL Partition definition file (.par) was a file created by the InnoDB database engine that defined table partitions. Removed in MySQL 5.7. Not described separately at this time. |
LC experience or existing holdings | The Library of Congress, as of August 2023, has over 20,000 FRM files in its collections, covering both MySQL Table Definition Format and MySQL View Definition Format. |
---|---|
LC preference | See the Library of Congress Recommended Formats Statement for preferences for dataset formats. |
Disclosure |
As a deprecated method of recordkeeping during production, documentation is limited and only available in legacy materials. MySQL has removed some of this information from its legacy documentation. |
---|---|
Documentation |
Official documentation "MySQL .frm File Format" (link via Internet Archive). |
Adoption |
This file, although now deprecated, is part of the widely used MySQL and MariaDB RDBMS. MySQL is the second-most popular database in the world according to DB-Engines with MariaDB ranking as #12. Many large organizations use MySQL, including Facebook, Twitter, Booking.com, and Verizon. Dozens of programming languages integrate with MySQL, including Ada, C, C#, C++, D, Delphi, Eiffel, Erlang, Haskell, Java, JavaScript, (Node.js), Objective-C, OCaml, Perl, PHP, Python, Ruby, Scheme, and Tcl. |
Licensing and patents |
None associated with the basic format. No license is required in creating, modifying, or exporting FRM files. |
Transparency |
A matching version of MySQL must be used to load and transform FRM files. |
Self-documentation |
This file is itself self-documentation for the MySQL database format. The MySQL Table Definition Format file preserves the table and the relationship between data within the database, but none of the data itself. The file stores the version it was created in. The version history can be retrieved using MySQL tooling or by checking the value of binary hex offset 0x33. |
External dependencies |
MySQL version 5.7 or earlier and a matching version of the software that created the file. |
Technical protection considerations |
None. There is no built-in mechanism for encryption, compression, or intellectual property protection. |
Dataset | |
---|---|
Normal functionality |
MySQL Table Definition Format files are used in MySQL 5.7 and earlier databases during production. This file stores information about a table and one is created for each table in the database. There can be many FRM files in each database as there is no limitation for the number of tables per database. |
Support for software interfaces (APIs, etc.) |
This file is limited to MySQL versions 5.7 and earlier. Editing can be done using the MySQL system via command line, desktop-based software such as MySQL Workbench, or web-based technology such as phpMyAdmin. |
Data documentation (quality, provenance, etc.) | Files store the MySQL version and storage engine used to create the file. More details can be found in the specification. |
Beyond normal functionality | None. |
Tag | Value | Note |
---|---|---|
Filename extension | frm |
This extension is generated by MySQL 5.7 and earlier. |
Internet Media Type | application/x-mysql-db
application/x-mysql-table-definition |
These identifiers are not registered with IANA. Values from the Apache Tika registry. Comments welcome. |
Magic numbers | FE01{3}00{21}02{13}000000000000 |
See PRONOM. See the specification for full details of the expected hex characters and offsets. Please note that they may be different based on the structure of the file. |
Pronom PUID | fmt/868 |
See https://www.nationalarchives.gov.uk/PRONOM/fmt/868. |
Wikidata Title ID | Q59653966 |
See https://www.wikidata.org/wiki/Q59653966. |
Other | NF00340 |
See NARA File Format Preservation Plan ID. |
General |
MySQL Table Definition files are stored in MySQL's data directory. This location will vary depending on the installation and machine. By default, the data directory can be found at the path /usr/local/mysql/for Linux and Mac machines.For Windows, that default path is C:\Program Files\MySQL. A MySQL database can be restored from backup with an FRM file and its matching .MYI and .MYD files (for databases using the MyISAM storage engine) or .IBD file (for the InnoDB storage engine). |
---|---|
History |
MySQL was created in 1995 by Swedish company MySQL AB which was founded by David Axmark, Allan Larsson and Michael "Monty" Widenius. The first internal release of MySQL was on May 23, 1995. MySQL is named after co-founder Monty Widenius's daughter, My. In 2008, the company was sold to Sun Microsystems. In 2010, Sun Microsystems was purchased by Oracle. Co-founder Widenius opposed the Oracle acquisition and left to found his own RDBMS, MariaDB, based upon MySQL's open source codebase. Just as MySQL is named for Widenius' eldest daughter My, MariaDB is named for his second daughter Maria. This familiar relationship between MySQL and MariaDB is why both RDBMS are remarkably similar and both utilize the FRM format. |
|