If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Normalised DB and constraints

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-20-08, 05:02
girish_mu girish_mu is offline
Registered User
 
Join Date: Jun 2005
Posts: 4
Normalised DB and constraints

Hi! I am making a database application around a reservation system for a company that offers reservation of tickets for several events.
The 3NF i've come out with is as follows:
Code:
Customer (CustomerID, FirstName, LastName, Street, City, TelNo)
Event (EventID, EventName, EventType, Organiser, Venue, Date, Time)
Ticket (TicketID, EventID, Class, Price, Issued, Reserved, Sold) [EventID is FK]
Reservation (CustomerID, TicketID, NoOfTickets, Date, ConfirmDate, TotalPrice)
Is it correct or should I make another table for Organiser?

Concerning the constraints,what should I do if a customer or a type of ticket is deleted? Should I delete the relative info from the Reservation table?
Reply With Quote
  #2 (permalink)  
Old 03-20-08, 05:08
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
First one - depends - do you record any info about the organiser? What goes in that field (e.g. an ID, company name etc)? Does your app require a list of organisers to select from?

The latter depends on business requirements. If you need to delete a customer entered in error then yes. If you need to remove customer details because, for example, of data protection issues then I prefer to leave the records and clear off all the attributes (name, dob, gender, address etc) leaving just an ID. That way you retain reservation info.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #3 (permalink)  
Old 03-20-08, 06:02
girish_mu girish_mu is offline
Registered User
 
Join Date: Jun 2005
Posts: 4
For the Organiser, I am recording the name of the company. Will it be better if I assign each of them an ID in another table and then link it to the Event table?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On