Professional Documents
Culture Documents
Database Dev
Database Dev
Database Design
Database Name: ShowmanHouse Number of Schemas: 3 Schema Names:
1) Management 2) HumanResources 3) Event
Table Design
Database Name: ShowmanHouse
Field Name EmployeeID First Name LastName Address Phone Data Type int Varchar Varchar Varchar Char Width 30 30 50 15 25 Description Employees Name Employees Name Employees address Employees phone number Employees position
Field Name CustomerID Name Address City State Phone Event .Customers
Width 30 50 25 25 15
Description Customer Number Customers name Customers Home Address Customers city of residence Customers state of residence Customers phone number
Width
15
Management.PaymentMethods
Field Name EventID Event Name EventTypeID Location StartDate EndDate StaffRequired EmployeeID CustomerID
Data Type Int Varchar Int Varchar Datetime Datetime Int Int Int
Width 30 30
NoOfPeople Management.Events
Int
Description Event I.D Number Name of event Type of event I.D Place of event Date event is starting Date event is ending Number of staff needed at the event I.D of the employee managing the event CustomerID of the person paying for the event Number of people attending the event
Width 30
Description I.D for type of event Detail of event Admission cost at the event
Field Name PaymentID EventID PaymentAmount PaymentDate CreditCardNumber CardHoldersName CreditCardExpDate PaymentMethodID ChequeNo Management.Payments
Data Type Int Int Money Datetime Char Varchar Datetime Int Char
Width
20 30
10
Description Payment Number ID for event being paid for Cost of Event Date payment made Customers credit card number Name on card Expiry date on card ID number of payment type Number on cheque
Validations Performed
Validation Required
EmployeeID should be auto generated EmployeeID should be primary key First Name ,Last Name,Address and Phone should not be left blank Title should have one of the following values: Executive, Senior Executive ,Management Trainee, Event Manager or Senior Event Manager Phone should be in the following format: [0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[09][0-9][0-9]-[0-9][0-9][0-9] HumanResources.Employee
Check constraint
Validation Required
EventID Should be primary key EventID should be auto generated EventName,StartDate, EndDate,Location,NoOfPeople and StaffRequired should not be left blank StaffRequired should be greater than 0 StartDate should be greater than current date NoOPeople should be greater than 50 Start date should be less than EndDate Management.Events
Validation Required
PaymentID should be primary key PaymentID should be auto generated Payment Date cannot be less than current date If the client wants to pay by using a credit card, its details need to be entered in the record. If a credit card is not being used it must be ensured that the credit card details are blank ExpiryDate on credit should be greater than the current date PaymentAmount must be calculated using the following formula : PaymentAmount=ChargePerPerson*NoOfPeople Cheque No should be entered if payment is done through cheque. Management.Payments
trigger
Validation Required
CustomerID must be primary key CustomerID must be auto generated Name, Address, City, State and Phone should not be left blank Phone should be in the following format: [0-9][09]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][09]-[0-9][0-9][0-9] Events.Customers
Validation Required
EventTypeID must be Primary key EventTypeID must be auto generated Description should not be left blank ChargePerPerson must be greater than 0 Event.EventTypes
Validation Required
PaymentMethodID should be primary key PaymentMethoID must be auto generated Description must contain any of the three values: cash, cheque or credit card Management.PaymentMethods