Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 22nd, 2006, 2:01 PM   #1
k4pil
Programmer
 
Join Date: Aug 2005
Location: Leeds - UK
Posts: 69
Rep Power: 4 k4pil is on a distinguished road
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
k4pil is offline   Reply With Quote
Old Feb 22nd, 2006, 5:35 PM   #2
Silvanus
Hobbyist Programmer
 
Silvanus's Avatar
 
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4 Silvanus is on a distinguished road
Why not put custID in the case table?
__________________
:wq
Silvanus is offline   Reply With Quote
Old Feb 22nd, 2006, 6:03 PM   #3
k4pil
Programmer
 
Join Date: Aug 2005
Location: Leeds - UK
Posts: 69
Rep Power: 4 k4pil is on a distinguished road
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???
k4pil is offline   Reply With Quote
Old Feb 22nd, 2006, 6:17 PM   #4
Silvanus
Hobbyist Programmer
 
Silvanus's Avatar
 
Join Date: Aug 2005
Location: Hiding from... them...
Posts: 110
Rep Power: 4 Silvanus is on a distinguished road
custID only has to be unique (i.e a primary key) in the customers table; that table structure looks better to me.
__________________
:wq
Silvanus is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:53 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC