tags:

views:

134

answers:

5

Hi there, 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!

+1  A: 

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.

Oliver Bayes-Shelton
`(*)` refers to columns, not rows. Closing (non persistent) connections is useless.
kemp
sorry kemp you carn't always be right like I guess you are all the time.
Oliver Bayes-Shelton
+4  A: 

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 and open source and there are plenty of learning materials about it.

Emanuil
I got a kick out of the edit history for this answer. +1
RenderIn
I know :) Sometimes I lose control.
Emanuil
+1  A: 

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.

Babiker
+2  A: 

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.

Darknight
A: 

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.

Brian T Hannan