Benefit of reading data off a mat file as opposed from the database
Pergunta
I've seen some code read large data from mat files instead of doing queries on a database. What are the benefits of doing this as oppose to using a database? Is it possible to easily move the mat file contents into a database and vice versa?
Solução
Reading data from mat file, is also a "database" in which you read your data from file.
Eventually, you will have to implement queries by yourself, and take care of many other issues.
Also, it is not a scalable solution, which means that for a large amount of data, it won't work well.
Of course, if you have small amount of data, and only basic queries, the fuss of setting up a database, using SQL isn't worth it.
Regarding your second question, it really depends on the data you have there.
Outras dicas
I agree with Andrey. It depends on the data and what you want to do with it. I created a small program in Matlab that queries a relatively small .mat database but as the database and users grew performance has been going down.
In the light of this we decided to use a MySQL database. I created a small java application that talks to the database and imported that into Matlab to move data between Matlab and MySQL. But I had to create specific queries for my data. If someone can bring me a better solution I would be grateful.
Perhaps it wouldn't be such a bad idea to generate a general script that moves data between .mat data between Matlab and a SQL database. Store the data in a structure and use that to create the tables.
If you want to discuss something like this further via email I would be happy to. Maybe we can learn a thing or two from each other.