Hi all,

I'm an absolute newbie on the site, first ever post! I have been scratching my head for a while now so hopefully one of you DB pro's will be ableto help me :)

I have a friend that has asked me to design a database for his small venue to cater for taking bookings for different seats in his venue. This type of project is completely new to me so therefore I am unsure how each seat should be stored properly. Well I suppose I know a very long winded version which would be a field for each seat and another field for that seat type which would correspond with a costing table. Surely this is not the way to tackle this as it would be extremely long winded as there would be numerous different seat types etc not too mention a ridicules number of fields!

Any help on this would be extremely welcomed as I have been mulling this over for quite sometime and no definite solution seems to be coming to me :confused:

M

The way I see it is you need two groups of tables in your database, one for the seating and the other to record bookings. Your seating tables would be tables like Seat and SeatType that record the details of each seat in the venue, while the booking tables would be Customer, Booking, BookingDetails and maybe even CustomerType. Here is what I was thinking:

TABLE Seat
SeatID int,
Row varchar(2),
SeatNumber smallint,
SeatTypeID int

TABLE SeatType
SeatTypeID int,
SeatType varchar(20),
BaseCost smallmoney

TABLE Customer
CustomerID int,
CustomerTypeID int,
FirstName varchar(15),
Surname varchar(15),
TelephoneNumber varchar(20),
CellPhoneNumber varchar(20),
Email varchar(50),
AddressLine1 varchar(30),
AddressLine2 varchar(30),
Suburb varchar(20),
State varchar(5),
ZipCode varchar(10)

TABLE Booking
BookingID int,
NumberSeats smallint,
TotalCost smallmoney,
BookingTime smalldatetime,
Paid boolean

TABLE BookingDetails
BookingID int,
CustomerID int,
SeatID int,
EventTime smalldatetime

TABLE CustomerType
CustomerTypeID int,
CustomerType varchar(20),
DiscountApplicable boolean,
DiscountPercentage decimal(2, 4),
DiscountAmount smallmoney

Anyways, that's a start...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.