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
);
create table festivaldays (
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)
);
create table stage (
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
);
create table slots (
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
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more