MySQL Forums
Forum List  »  Newbie

Database design
Posted by: Dave McDougall
Date: June 09, 2005 02:16AM

Hello,

I am just planning a database an want some advise about db design if someone doesn't mind.

I have three table's a customer table, a notes table and a complaint table.

A customer can have many notes and many complaints. The problem I am having is that I would like the complaints to appear when you view the notes. I guess I have two options -

Option one is to have two sql's, one for the notes and one for the complaints table with the where clause looking for the primary key of the customer table in both th complaints and notes tables; then order by date and display the complaints with the notes.

The other is to have a relationship between the two tables notes and complaints.

I think option one is better but wanted some input if possible.

Thanks
Dave

Options: ReplyQuote


Subject
Written By
Posted
Database design
June 09, 2005 02:16AM
June 09, 2005 06:39AM
June 09, 2005 06:43AM
June 09, 2005 06:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.