my name is Tal,
Im working on a PHP Application the should have lots and lots of records, what DB should I use, and are there开发者_如何学编程 guides on the web that explains how to build efficient dbs and tables?
Tnx!
Get familiar with database normalization. It's a brilliant theory that will help you build stable and scalable databases. There is a good article on the subject at http://en.wikipedia.org/wiki/Database_normalization
As to what database management system you should use, I'd recommend that you start with MySQL. It's the world's most popular database software (it's what they use in WordPress, phpBB and Drupal). It's fast, reliable, open source and there are plenty of learning materials about it.
This is a big topic, merely selecting technology A or B is not enough. You have to consider the whole chain from the end user all the way up to the web server.
Most DB's are close performance wise. How well you utilise each DB will have a direct and bigger impact than simply using one platform over another.
A badly designed DB schema and poorly optimised query will perform badly in ANY db platform.
Don't select every row (*) just select what you need in a query.
Always close connections.
Use either prepared statements or escape inputted user information when inserting or updating.
PHP is widely used with MySql. You can also use PHP with sqlite. sqlite is faster and embeddable, but is not ideal for large dbs.
As far as db efficiency is concerned check this out.
MySql is easy to use, but probably not the most efficient b/c it is free.
SQLite works well too if you need an embedded database in your app.
精彩评论