> >3) create the customer table with a FK for people and a FK for
> >companies, and decide on the customer type in the application based on
> >the presence of that key
> [JS] I'm not sure why you need a foreign key. Surely you won't be entering
> customers using the MySQL CLI client on a routine basis, so your user
> interface could (and should) be responsible for checking the data.
Ehm, no, if it's possible, put the constraints -on the database- ... Never
ever rely on the application alone to enforce data consistency.
> If you really feel the need to constrain the data, define the column as a
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Sybase
SQL Anywhere, Oracle & MS SQL Server
Database development questions? Check the forum!