What is the role format file (.frm file) ?
FRM stands for FoRMat and it is storing data dictionary information for tables in .frm files. It describes the table’s format like: table definition, including fields and structure. The name of this file is same as the table name.
Specially InnoDB engine stores encoded information about the table and managing its own data dictionary inside the tablespace.
When MySQL drops a table or a database, it also deletes .frm file which is associated with it.
We can also take backup of .frm file, restore the table definition from .frm file, can move .frm file from one storage to another storage.
The .frm file associated with table can be found in the directory that represents the database to which the table belongs.
You can check the MySQL data directory using below SHOW command.
SHOW VARIABLES LIKE 'datadir';
There is also one limitation of .frm file structure.
The portion of the information stored in the .frm file that is checked against the expression cannot grow beyond the 64KB limit, so if the table definition reaches this size, no more columns can be added.
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.