You are here: Re: One database or many ? « PHP Programming Language « IT news, forums, messages
Re: One database or many ?

Posted by Gordon Burditt on 05/12/05 14:01

>If you're writing many databases that aren't necessarily associated
>with each other (ie parts, vacation days, how you like your steak
>done, and school you attended, etc; as examples), does it make more
>sense to have one database name and several tables for the data topics
>above OR multiple databases since they aren't associated with each
>other?

It depends. One consideration is security issues, and who uses the
data. It is a lot easier and simpler to segregate access by database,
and easier to check that it's correct, even though MySQL and some
others allow access restrictions by table or by column.

In MySQL and some others you can do joins between tables in different
databases, should that "unrelated" data become related.

If you avoid writing code that explicitly names the database in
queries, it's easy to have a "test" database and a "production"
database, and the only difference in using the two is the database
name used on connection (which can be stuck in an include file).
If you do it with different table names in the same database,
changing from "test" to "production" is more complicated and it's
easier to screw up (e.g. the item is shipped but billing doesn't
happen).

>It would SEEM easier to have a single database with multiple tables
>from a data management perspective as long as there's no risk of data
>integrity issues as a result of having multiple tables under one
>database header. TIA

Throwing together lots of unrelated data can also complicate backup
strategies.

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация