0% found this document useful (0 votes)
39 views

Advaced Database Tutorials.

This document outlines an assignment to create a database for an event management company. Students are instructed to: 1) Create an ER diagram modeling the relationships between events, engagements, clients, equipment, and event managers. 2) Develop the logical relational schema from the ER diagram. 3) Define appropriate data types and constraints for table attributes. 4) Implement the database in IBM DB2. 5) Add new columns to the engagements table. 6) Create a view to show only outdoor events. 7) Identify the command to see created tables. 8) Write SQL to show integrity constraints for each table.

Uploaded by

Abdulaziz Gamal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Advaced Database Tutorials.

This document outlines an assignment to create a database for an event management company. Students are instructed to: 1) Create an ER diagram modeling the relationships between events, engagements, clients, equipment, and event managers. 2) Develop the logical relational schema from the ER diagram. 3) Define appropriate data types and constraints for table attributes. 4) Implement the database in IBM DB2. 5) Add new columns to the engagements table. 6) Create a view to show only outdoor events. 7) Identify the command to see created tables. 8) Write SQL to show integrity constraints for each table.

Uploaded by

Abdulaziz Gamal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

TIS3351 Advanced Database

Tutorial 1,2 – Advanced SQL

Instruction: You are required to create a database on DB2 for the following conceptual schema
for an event management company. The attributes for each entity are listed in the table below.

Event Manager

assign Equipment
Event

include Engagement use

make

Client

Entity Attributes Sample Values 1 Sample Values 2


Event Event ID E001 E011
Description Birthday Party for Kids Corporate Dinner
Event Type Outdoor Indoor
Target Audience Family Adults
Engagement Engagement ID G0001 G0909
Date of Engagement 20 June 2015 25 June 2015
Time of Event 10am 8pm
Date of Event 31 August 2015 17 July 2015
Duration (hours) 3 4
Capacity (pax) 100 200
Location Hilton KL MMU Grand Hall
Entity Attributes Sample Values 1 Sample Values 2
Client Client ID C1001 C2001
Client Name Sunlight Tadika MMU
Contact Person Nina Choo Sabri Yusoff
Phone 03-89898987 03-83123456
Email NULL [email protected]
Equipment Equipment No 10000 89000
Description Sound Systems Camera
Charge per day 1500.50 500.00
Event Staff ID 1008900 1007890
Manager Name Edline Young Hafiz Hashim
Phone 012-9876543 013-1234567

1
TIS3351 Advanced Database

Email [email protected] [email protected]


Gender F M

1. Complete the ER-diagram above with appropriate connectivity and cardinality based on
the following business rules:
a. Each event has many engagements. An engagement is associated with one and
only one event.
b. Each engagement is handled by an event manager. But, an event manager
handles more than one engagement.
c. Each engagement is associated with one and only one client, but a client has
many engagements.
d. Each engagement uses a many pieces of equipment. Each piece of Equipment
can used in many engagements.

2. Create the relational schema (logical model) for the ER-diagram above. How many
relations does it have? Identify the primary keys and foreign keys in the relations, if any.

3. For each attributes in the relations:


a. Identify the suitable data type
b. Identify and suggest the appropriate constraint(s), if any. (E.g. automatically
generated values, default values, CHECK constraint, nullable, and etc.)

4. Implement a database using IBM DB2 based on the outcome of Step #1 and #2.

5. Add two columns named Fee and Discount into Engagement table.

6. Create a view which shows only the events that is conducted outdoor. In your view
creation, make sure that it does not accept or process any events that are conducted
indoor.

7. What is the command used to see all the tables that you have created in the database?

8. Write a SQL command to show the entity integrity and referential integrity constraints of
all the tables (one by one) that you have created.

You should demonstrate your answers from Step #4 to Step #8 to your tutor.

You might also like