I need some advice

Reply

Join Date: May 2007
Posts: 1
Reputation: octogon is an unknown quantity at this point 
Solved Threads: 0
octogon octogon is offline Offline
Newbie Poster

I need some advice

 
0
  #1
May 2nd, 2007
Hello everyone,

I am currently developing an excursion booking system and I am looking for some advice on some matters of database design.

At the moment I have the following tables in my system :

a table 'user' which holds information such as :

login,password,firstname,lastname,address,...

Q: is it better design to store authentication credentials in a seperate table with a link to 'table user'?

Travel Agencies should also be able to log in to the system, in order to input excursions :

so I created a seperate table 'agency' which holds the same fields as table 'user' except for 2 fields:
( I also have two tables called : pending_user and pending_agency)
Q: is it better design to merge tables user and agency and create a new table 'usertype'?

the dates on which an excursion takes place I store in a table which looks like this:

excursion_id refers to table "excursion"
month
day

it should be possible to get a discount depending on the age of the participant, so I created the following table :

excursion_discounts :

excursion_id
start_age
end_age
discount

the shoppingcart system consist of following tables:

pending_ordered_excursion:
(stores information about ordered excursions)
session_id
excursion_id
date
amount of adults

pending_ordered_excursion_amount_children:

(stores information about the amount of children in order to calculate the price)

refers to pending_ordered_excursion:
session_id
excursion_id
date

refers to excursion_discounts:
excursion
discount_id

amount_of_children

after confirming the order: the information is moved to tables:

order :

order_id auto_increment
user_id
billingaddress,...
total

ordered_excursion:

order_id
excursion_id
date
amount_of_adults
price

ordered_excursion_participant:

order_id
excursion_id
date
firstname
lastname
age

I hope u can tell me if what I am doing is the right way. Thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 114
Reputation: davidcairns is an unknown quantity at this point 
Solved Threads: 8
davidcairns davidcairns is offline Offline
Junior Poster

Re: I need some advice

 
0
  #2
May 3rd, 2007
1. If you are concerned about a security issue with authentication details you should limit access to the user table to the authentication and new user routines and use a view which exludes these fields for all other access.

2. It is usually better to use a user type, but that is not an absolute, it depends on the situation.

3. Change the fields month and day in teh excursion table to be a single date field (which can include time)

Aside from that I would say try and draw this as an ER diagram (personally I use a pencil and a large piece of paper)
and see if it looks good

Cheers

D
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 146
Reputation: Stylish is an unknown quantity at this point 
Solved Threads: 14
Stylish's Avatar
Stylish Stylish is offline Offline
Junior Poster

Re: I need some advice

 
0
  #3
May 6th, 2007
I would also move pending_ tables into a column within the user table, with values 0 or 1. This is assuming the pending_ tables do not have any additional columns.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,185
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 532
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: I need some advice

 
0
  #4
May 6th, 2007
What DBMS will you use?
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Database Design Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC