Forum Moderators: phranque
I'm designing/creating a new database for an ecommerce portal.
I need to develop the a user management system. Users log in, keep track of their moves and orders.
The site will have 2 or 3 different types of users.
The way I was taught at school was to create a parent table USER with commmon fields and another two tables (eg RESELLERS and SUPPLIERS) with its specific fields. The PK at the two last onces will be a FK of USERS(PK).
Talking to a friend. He suggested that MySQL support for FK is poor and that it can become a pain to insert and query data that way. He suggested me to have only one table with all the fields and leave NULL the ones don't belong to that particular type of users.
Whats your opinion on this?
Thanks a lot in advance ..
mySQL 4 has support for foreign keys.
Even without, you just write the SQL statement using inner or outer joins and you have no trouble updating or inserting.
I have a master mySQL database with about 75 tables and I can insert, update,select, etc with no problems