a) Entity relationship diagram
b) Normalization up to 3NF
Normalization up to 3NF involves performing three steps on the relations described in the entity relation diagram. The following are the steps followed in order to achieve relations in 3NF.
For the festival database, the relations described were normalized up to 3nF by following the steps described above to achieve the following relations that are in 3NF. At this level, the relations can be converted into tables to form the complete festival database.
Entity |
Attribute |
Data Type |
Constraints |
Festival |
festivalID |
Integer |
PK (festivalID) |
name |
VARCHAR2(50) |
||
festivalcredate |
Date |
||
FestivalDays |
daySerialNO |
Integer |
PK (daySerialNO) |
day |
Integer |
||
festivalID |
Integer |
FK (festivalID) References festival (festivalID) |
|
vendor |
vendorID |
Integer |
PK (vendorID) |
name |
VARCHAR2(50) |
||
Type |
VARCHAR2(50) |
||
festivalVendors |
festivalID |
Integer |
PK (festivalID, vendorID) FK (festivalID) References festival (festivalID) |
vendorID |
Integer |
PK (festivalID, vendorID) FK (vendorID) References vendor (vendorID) |
|
stage |
stageID |
Integer |
PK (stageID) |
Name |
VARCHAR2(50) |
||
festivalID |
Integer |
FK (festivalID) References festival (festivalID) |
|
equipment |
EquipmentID |
Integer |
PK (EquipmentID) |
Name |
VARCHAR2(50) |
||
Type |
VARCHAR2(50) |
||
Stage_equipments |
stageID |
Integer |
PK (stageID,equipmentID) FK (stageID) References Stage (stageID) |
equipmentID |
Integer |
PK (stageID,equipmentID) FK (equipmentID) References equipment (equipmentID) |
|
artist |
artisID |
Integer |
PK (artistID) |
name |
VARCHAR2(50) |
||
typeOfMusic |
VARCHAR2(50) |
||
Slots |
slotID |
Integer |
PK (slotID,daySerialNO) |
daySerialNO |
Integer |
PK (slotID,daySerialNO) FK (daySerialNO) references festivalDays (daySerialNO) |
|
stageID |
Integer |
FK (stageID) References Stage (stageID) |
|
startTime |
VARCHAR (15) |
||
artistID |
Integer |
FK (artistID) References artist (artistID) |
a) Tables using SQL
create table festival (
festivalID integer NOT NULL PRIMARY KEY,
name varchar2(50) NOT NULL,
festivaldate Date NOT NULL
);
dayserialNO integer NOT NULL PRIMARY KEY,
day integer NOT NULL,
festivalID int NOT NULL,
constraint festivaldays_fk foreign key (festivalID) references festival (festivalID)
);
create table vendor (
vendorid integer primary key,
name varchar2(50) not null,
type varchar2(50) not null
);
create table festivalvendors (
festivalID integer,
vendorID integer,
constraint festivalVendors_pk primary key (festivalID,vendorID),
constraint festivalvendorsfk_1 foreign key (festivalID) references festival (festivalID),
constraint festivalvendorsfk_2 foreign key (vendorID) references vendor (vendorID)
);
stageID int primary key,
name varchar2(50) not null,
festivalID int not null,
constraint stage_fk1 foreign key (festivalID) references festival (festivalID)
);
create table equipment (
equipmentID int primary key,
name varchar2(50) not null,
type varchar2(50) not null
);
create table stageequipments (
equipmentID int not null,
stageID int not null,
constraint stageequiments_pk primary key (equipmentID,stageID),
constraint stageequipments_fk1 foreign key (equipmentID) references equipment(equipmentID),
constraint stageequipments_fk2 foreign key (stageID) references stage(stageID)
);
create table artist (
artistID integer primary key,
name varchar2(50) not null,
typeofmusic varchar2(50) not null
);
slotID integer not null,
dayserialno integer not null,
stageID integer not null,
startTime varchar2(25) not null,
artistID integer not null,
constraint slots_pk primary key (slotID,dayserialno),
constraint slots_fk1 foreign key (dayserialno) references festivaldays (dayserialno),
constraint slots_fk2 foreign key (stageID) references stage (stageID),
constraint slots_fk3 foreign key (artistID) references artist (artistID)
);
OUTPUT
OUTPUT
Output
Insert statements
Output
Output
Output
output
Table Slots
Output
select name,festivalDate from festival;
select a.name from artist a
inner join slots s on s.artistID=a.artistID
inner join festivaldays fd on fd.dayserialno=s.dayserialno
inner join festival f on f.festivalid=fd.festivalid
where f.festivalid=1;
select a.name,f.festivaldate,s.starttime from artist a
inner join slots s on s.artistID=a.artistID
inner join festivaldays fd on fd.dayserialno=s.dayserialno
inner join festival f on f.festivalid=fd.festivalid
where a.typeofmusic=’Jazz’;
select e.name from equipment e
inner join stageequipments se on se.equipmentid=e.equipmentID
inner join stage s on s.stageid=se.stageid
inner join festival f on f.festivalid=s.festivalid
where f.name=’Carson Festival’ and s.name=’CF-Stage 2′;
select f.name,count(v.vendorID) FROM festivalvendors v
inner join festival f on f.festivalid=v.festivalID
where f.name=’Wonderland Rock festival’
group by f.name;
select ve.name FROM festivalvendors v
inner join festival f on f.festivalid=v.festivalID
inner join vendor ve on ve.vendorID=v.vendorID
where f.festivaldate between ’01-July-2018′ AND ’31-July-2018′
AND ve.Type=’Food and Drink’;
INSERT INTO “ARTIST” (ARTISTID, NAME, TYPEOFMUSIC) VALUES (’17’, ‘Alonso’, ‘Rock’);
update slots set artistID=17 where artistID=10;
alter table festival add ticketPrice Number DEFAULT 0 NOT NULL ;
To generate revenue data the database would have to be extended to keep records of ticket sales and payment by vendors. For the ticket sales it means that the database would have to capture the details of the customer who bought the ticket. Thus expanding the database would mean creating a table for the customers buying the tickets and then another table for vendor payments. For the expenditures the database would have to be expanded to capture all expenditures where by an expenditure is associated to a certain festival.
Using the new added tables, it’s possible to produce a report showing the income and the expenditure of the business.
Edge entertainment needed a database to manage their business activities. Edge organizes and facilitates festivals. For every festival there is important information crucial to the business that is generated. For example the details of the festival have to be captured. Facilitation involves making sure that the festival has the required stages. Details about the stage should be captured in the database. Each stage is assigned to one or more equipment’s and this record should be saved in a table to show which stage has which equipment. For every festival there are vendors who open up tents and the business wants to keep a record of the vendors and which festival they attended. A festival is performed by different artists who are allocated a time slot. This information should be recorded in the database.
To make sure that the database captured all the requirements of the business an thorough analysis was done on the case study and all entities were identified. The next step was coming with an entity relationship diagram to map out the entities. From the ERD relations were derived and normalized up to 3NF.
Implementation of the relations in 3NF was done Oracle SQL. All the relations were created and the relationship between them created to ensure the data integrity for all the data stored in the datab
Essay Writing Service Features
Our Experience
No matter how complex your assignment is, we can find the right professional for your specific task. Contact Essay is an essay writing company that hires only the smartest minds to help you with your projects. Our expertise allows us to provide students with high-quality academic writing, editing & proofreading services.Free Features
Free revision policy
$10Free bibliography & reference
$8Free title page
$8Free formatting
$8How Our Essay Writing Service Works
First, you will need to complete an order form. It's not difficult but, in case there is anything you find not to be clear, you may always call us so that we can guide you through it. On the order form, you will need to include some basic information concerning your order: subject, topic, number of pages, etc. We also encourage our clients to upload any relevant information or sources that will help.
Complete the order formOnce we have all the information and instructions that we need, we select the most suitable writer for your assignment. While everything seems to be clear, the writer, who has complete knowledge of the subject, may need clarification from you. It is at that point that you would receive a call or email from us.
Writer’s assignmentAs soon as the writer has finished, it will be delivered both to the website and to your email address so that you will not miss it. If your deadline is close at hand, we will place a call to you to make sure that you receive the paper on time.
Completing the order and download