![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Location: Leeds - UK
Posts: 69
Rep Power: 4
![]() |
Any advice on database design??
Hi there ppl!
I am designing a table in a database and am wandering if any1 has any suggestions to my (very simple) design. The scenario: I already have customer and product tables working fine. Now, want i need to implement next is a table for case, where case is an instance where a customer needs support. So everytime a cusotmer needs support i want to create a case which will have a different priority, type, description and unique caseID. This case needs to be registered to a user. My table: case(caseID,priority,type,description) caseRegistered(regID,caseID,custID) - both caseID and custID are foreign keys. Sorz about the amount of text. Thanks in advance as always |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4
![]() |
Why not put custID in the case table?
__________________
:wq |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Aug 2005
Location: Leeds - UK
Posts: 69
Rep Power: 4
![]() |
Because a customer can have more then one case.
Don't know if thats reason enough tho. If i was to change the tables to; case(caseID,custID,priority,type,description) would it be better??? |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4
![]() |
custID only has to be unique (i.e a primary key) in the customers table; that table structure looks better to me.
__________________
:wq |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|