In: Computer Science
Please find below the steps to obtain the tables and relationship between the tables:
a. List tables in the Showman House database and assign attributes
Entities: The system will have below entities:
· EventType: To store the types of event
· Event: To store the actual event details
· Payment: To store the payment details
· Attendee: To store the attendee who organises the event
· Employee: Showman House employee to manage the event
Attributes:
· EventType(type_code, name, description)
· Event(event_code, event_name,event_type, location, start_date, end_date, description, total_ people, required_staffing, attendee_id, employee_id)
· Payment( payment_id, amount, date, payment_method_id, method_description, event_code)
· Attendee(attendee_id, attendee_name, address)
· Employee(employee_id, first_name, last_name, title, phone)
**********************************************************
b. Identifying primary and foreign keys
Primary keys are bold and underlined. Foreign key has * before the attribute name
· EventType(type_code)
Foreign key: NA
· Event(event_code)
Foreign key: *event_type, *attendee_id, *employee_id references from EventType, Attendee and Employee respectively
· Payment( payment_id)
Foreign key: event_code from Event entity
· Attendee(attendee_id)
Foreign key: NA
· Employee(employee_id)
Foreign key: NA
**********************************************************
c. Diagram to show relationship:
Relationships:
Identified entities have below relationships:
1. An Event should have one EventType whereas there can be many Event to same EventType. It is a Many to One relationship.
2. An Attendee can have atleast one to many Events, but an event will have only one attendee. It is a One to Many relationship.
3. An Event should be managed by one Employee whereas there can be many Event managed by one Employee. It is a Many to One relationship.
4. An Event can have many Payments, whereas a payment must belong to one Event. It is a One to Many relationship.
Relationship diagram is shown as below:
