Mysql database file format

CodeX

2[H]4U
Joined
Mar 21, 2006
Messages
2,879
can anyone tell me where to find a description of the database file format used by MySQL, I looked on their site and the link I found to the documentation didn't work. I need to be able to load up a database file in my own program and manipulate it.
 
can anyone tell me where to find a description of the database file format used by MySQL, I looked on their site and the link I found to the documentation didn't work. I need to be able to load up a database file in my own program and manipulate it.

I could be wrong, but wouldn't it be more efficient/less work to connect to the database rather than directly access the database files?
 
Sgraffite has got it right; you want to run MySQL and talk to it to have it do the work. That's what it's for!
 
I don't want to use SQL on the data, I want to be able to read the data files to use as test cases for my program that finds functional dependencies and key values. I could just use my own file format to do this but I thought for my program to be as useful as possible you should be able to use it on already created databases
 
Problem : MySQL multiple storage engines which may use their own file structures. One of their engines uses CSV files which would probably be fairly easy to read. Some of the other database engines might be somewhat more complex.

A more straightforward approach might be to try using something more like Berkeley DB (which is one of the supported DB engines for MySQL) and see what you can do with that.
 
hmm... Ill probably just go with using the CSV format then, which is basically what I would have created myself (comma delimited text files) had I decided to just use an arbitrary file format for the test cases.
 
to be as useful as possible you should be able to use it on already created databases

Would it be more useful if it worked with any database engine? Seems like if you are reading from a proprietary file format instead of querying the database engine with fairly standard SQL, then your app will only work with MySQL databases that use the same format. It does not really matter how your app stores the data internally (although you really could do everything on the database server through SQL statements and temp tables), but if you connected to the server and queried data instead of reading files directly, then your app could be written to work with any database engine, such as Oracle, SQL Server, Postgre, MySQL, Access, etc.
 
Back
Top