开发者

When to use SQL Server or MySQL and when to manage data myself

If I have a small database with fixed table layouts can I get any kind of performance benefit from handling the data myself rather than using a backend like MySQL? What are the benefits to us开发者_Python百科ing such a database backend?


Handling the data yourself usually means saving them in flat file and accessing them with custom code. In this case they are easier to migrate and deploy, sometimes with better performance but not always, and performance should not be a concern for small data set much less the concern.

Using a database make it harder to corrupt the data when multiple users change the data at the same time, easier to filter/sort the data, easier for other programmers to maintain, more data tools to integrate with (charts, data forms, reports, etc.), data is less likely to be tampered by user, and your hosting company may backup database more frequently then files.


Databases provide ACID features (http://en.wikipedia.org/wiki/ACID) which are hard to deliver when rolling your own solution.

In addition, databases tend to scale to larger volumes of data with better performance characteristics.


Main benefit is automatic data handling - storing, retrieving, querying.

If you only have very small amount of simple data then you can of course just use INI files or Windows registry or just text file. This saves you from having to handle the MySQL installation and configuration and managing.


Theoretically, you could get more performance for specialized data structures. On the other hand, you have more flexibility wrt data structures with a database.

You might want to look into the NoSQL options available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜