Re: Where to learn about these topics
| From: | Ryan King | Date: | Tue, 23 Nov 2004 01:28:55 +0000 |
| Subject: | Re: Where to learn about these topics | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202708@lists.php.net to get a copy of this message | ||
On Nov 22, 2004, at 11:33 AM, Chris Lott wrote:
No, you don't.In MySQL I would say... If you have data which has to be inserted in serveral tables, you must first check if all conditions are ok. So, do some selects to check if everythin in your database is ok, and after that, execute the query. But, when you really want to make complex database driven applications, choose PostgreSQL! This database is better build for complexity (and not only that ;) ), and supports transactions and references, and more stuff like that which can be really helpful to you... And when you compare MySQL against PostgreSQL... PostgreSQL is a heavy system compared with MySQL, also free, but when you look at the functionality: SUPERIORBut even with Postgresql I have the same situation.
Let's say a user wants to enter a new contact into the database. This contact lives in a new city and has a new kind of relationship. To make that city and relationship available, I need them in the related tables. Or I need my form action to check for each one, insert if they are not there, and then finally insert the new record. This last seems preferable (one form), but no books seem to deal with the real world, only the simplest, single-table cases...This is where stored procedures, triggers and update-able views become very handy. -ryan