Click to See Complete Forum and Search --> : e-commerce database and foregin key?


searain
06-06-2005, 03:47 PM
I checked out the oscommerce and zen cart.

They didn't use "foreign key" in their database definatiation.

Could some friends explain why not using foregin keys there?

And the advantages and disadvantages about using foreign keys in these e-commerce web site back end database?

Thanks!

Elizabeth
06-06-2005, 03:52 PM
Because zencart (and presumably osc) uses MyISAM tables which don't yet support foreign keys:

http://dev.mysql.com/doc/mysql/en/ansi-diff-foreign-keys.html

searain
06-06-2005, 04:10 PM
use foregin key could make database structure a little bit difficult to manage. For the simple e-commerce database, is it necessary using the foregin key (if they can)? Or we could enforce that part of the the database integrity by simple php or sql programming ourselves.

thanks!

Weedpacket
06-07-2005, 06:34 AM
Originally posted by searain
Or we could enforce that part of the the database integrity by simple php or sql programming ourselves. Well, if the DBMS isn't enforcing database integrity then I don't think much of it as a DBMS....