SlideShare a Scribd company logo
Rupesh Chaulagain 160409 DB
1
Table of Contents
Task 1 – Design..........................................................................................................................................3
a) Produce an entity relationship model for the proposed database system for ..........................3
Synergy Exhibition Services. This should be a fully normalized model to 3rd .............................3
normal form.............................................................................................................................................3
b) Discuss how you have identified primary and foreign keys for your entity...............................3
relationship model. You could mention data integrity, referential integrity and ............................3
functional dependence in your discussion. ........................................................................................3
c) Produce a data dictionary for the entity relationship model showing all attributes, with data
types and identifying primary and foreign keys. ................................................................................4
Task 2 – Data Entry and Data Manipulation ..........................................................................................7
a) Create all the tables using SQL. Show your create table scripts and the finished..................7
tables........................................................................................................................................................7
b) Enter data on all the exhibitions shown in the assignment. ......................................................11
c) Enter data for all the customers and associate them with exhibitions. Note that a customer
might have more than one exhibition associated with them..........................................................12
d) Enter data on staff and exhibitions they are working at taken from the..................................13
assignment. Give a listing of this information. .................................................................................13
e) Write a query that selects all the exhibitions for the Travel Association of Great..................15
Britain.....................................................................................................................................................15
f) Write a query that selects the staff that work in software support. ...........................................15
g) Write a query that selects all the exhibition details for exhibitions at Olympia.......................15
h) Write a query that counts all the trade exhibitions. ....................................................................16
i) Write a query that shows the staff working at stamp exhibitions...............................................16
j) Update the item table so that Sharon Smith has changed jobs to Software ...........................16
Project Manager...................................................................................................................................16
k) Update the staff table so that Pauline West is now known as Pauline Yardley.....................17
l) Update the lesson title of the exhibition ‘Stampex’ to ‘Stampex 2017’.....................................18
m) Update any exhibitions that involve Sandy Niles so that now they have Diana ...................18
West assigned to them........................................................................................................................18
n) Delete the staff record for Sandy Niles. .......................................................................................19
Task 3 – Assessment ..........................................................................................................................19
Rupesh Chaulagain 160409 DB
2
Rupesh Chaulagain 160409 DB
3
Task 1 – Design
a) Produce an entity relationship model for the proposed database system
for
Synergy Exhibition Services. This should be a fully normalized model to 3rd
normal form. (NCC uploads)
Normalization is removing repeating groups and making relation between the data. We must
normalize any given data to make a reliable database. There are certain steps performed during
normalization. Most used normal form are: 1NF, 2NF, 3NF.
ER model is the pictorial representation of data which contains table and entities inside each
and table are related to each other. The main components of ER model are entity set and
relation set. I have used CROWS FEET to make ER diagram in Visual paradigm.
The required ER model which is in 3rd
normal form is:
Screenshot: Fully normalized ER diagram
b) Discuss how you have identified primary and foreign keys for your entity
relationship model. You could mention data integrity, referential integrity
and
functional dependence in your discussion. (NCC uploads)
Primary key:
It is a column in a table which uniquely defines every entity of a table. It must not be null. It must
be index and unique. From using primary key we can retrieve all the other data from the table.
There is always one primary key in every table but cannot be more than one. To choose a
primary key we look for all the column which can uniquely define other column and from those
columns we select the suitable one, For example, in table Rupesh31_Exhibition there are two
Rupesh Chaulagain 160409 DB
4
possible primary key there Exhibition_id, Exhibition_name are the possible primary key
because from these columns we can retrieve all the other data. But, Exhibition_name can
occur twice in the table thus Exhibition_id is suitable for primary key.
Foreign key:
Foreign key is a column which relates a table to another. Usually primary key of one table
becomes foreign key in another table. When we relate the table the table with many relation
holds foreign key. Foreign key can be identified by looking relationship between two tables. The
foreign key is formed in the table with many relation. For example, in three tables
Rupesh31_Exhibition, Rupesh31_Customer, Rupesh31_Exhibition type, the relation
between Rupesh31_Exhibition and Rupesh31_Customer the relation is many to one
respectively. So, the foreign key is Rupesh31_Exhibition. In table Rupesh31_Exhibition and
Rupesh31_Exhibition_type the relation is many to one respectively. So, foreign key lies in
Rupesh31_Exhibition. To create foreign key, it must be primary key is previously created
table. There can be one or more foreign keys in a single table.
Data integrity:
It means the precision and reliability of data. We should maintain the data integrity to guarantee
recoverability and to relate data between each other.
Relational integrity:
This integrity is used to make relation between two tables. When we make foreign key in a table
then it must be primary key in another table which must be created first. It also defines that the
primary key and foreign of two related tables must be same. For example, in tables
Rupesh31_Exhibition_type and Rupesh31_Exhibition Exhibition_type_id is primary key
and foreign key in respected table. Here, we must create the table Rupesh31_Exhibition_type
first then only we can create Rupesh31_Exhibition. Due to relational integrity, we cannot
delete or update Exhibition_type_id in Rupesh31_Exhibition table. Hence, we maintained
relational integrity while making primary key and foreign key.
Functional dependency:
The elements of a table are functionally dependent if one column of a table can define another
column of table. In other words, it is constraints which describes relation between attributes. It is
important to maintain functional dependency during normalization. Here, for Exhibition Summary
Sheet Exhibition_id can define Exhibition_name, Exhibition_address and Exhibition_dates
so one table is formed having Exhibition_id as primary key. Similarly, Customer_no defines
customer_name and forms table with Customer_no as primary key and Exhibition_type_id
defines Exhibition_type and forms another table with Exhibition_type_id as primary key.
Hence, the functional dependency is maintaining and also helps to find out primary key.
c) Produce a data dictionary for the entity relationship model showing all
attributes, with data types and identifying primary and foreign keys. (NCC
uploads)
A place where metadata (data of data) is stored is data dictionary. This is mostly behind
the scenes data. It defines the data type of any data. It also contains length, range,
formatting and any other data about this data.
Rupesh Chaulagain 160409 DB
5
For table Rupesh31_Staff_roll
DD for Rupesh31_Staff_roll
For table Rupesh31_Customer
DD for Rupesh31_Customer
For table Rupesh31_Exhibition_type
DD for Rupesh31_Exhibition_type
For table Rupesh31_Exhibition
DD for Rupesh31_Exhibition
For table Rupesh31_Staff
Rupesh Chaulagain 160409 DB
6
DD for Rupesh31_Staff
For table Rupesh31_Exhibition_Staff
DD for Rupesh31_Exhibition_Staff
For table Rupesh31_Software_type
DD for Rupesh31_Software_type
For table Rupesh31_Installation_type
DD for Rupesh31_Installation_type
Rupesh Chaulagain 160409 DB
7
Task 2 – Data Entry and Data Manipulation
a) Create all the tables using SQL. Show your create table scripts and the
finished
tables. (NCC uploads)
• Creating all table
To create Rupesh31_Staff_roll
Create Rupesh31_Staff_roll
To create Rupesh31_Customer
Create Rupesh31_Customer
To create Rupesh31_Exhibition_type
Create Rupesh31_Exhibition_type
To create Rupesh31_Exhibition
Rupesh Chaulagain 160409 DB
8
Create Rupesh31_Exhibition
To create Rupesh31_Staff
Create Rupesh31_Staff
To create Rupesh31_Exhibition_Staff
Create Rupesh31_Exhibition_Staff
To create Rupesh31_Software_type
Create Rupesh31_Software_type
To create Rupesh31_Installation_type
Rupesh Chaulagain 160409 DB
9
Create Rupesh31_Installation_type
• All created table
Desc Rupesh31_Staff_roll
Showing Rupesh31_Staff_roll created table
Desc Rupesh31_Customer
Showing Rupesh31_Customer created table
Desc Rupesh31_Exhibition_type
Showing Rupesh31_Exhibition_type created table
Desc Rupesh31_Exhibition
Rupesh Chaulagain 160409 DB
10
Showing Rupesh31_Exhibition created table
Desc Rupesh31_Staff
Showing Rupesh31_Staff created table
Desc Rupesh31_Exhibition_Staff
Showing Rupesh31_Exhibition_Staff created table
Desc Rupesh31_Software_type
Rupesh Chaulagain 160409 DB
11
Showing Rupesh31_Software_type created table
Desc Rupesh31_Installation_type
Showing Rupesh31_Installlation_type created table
b) Enter data on all the exhibitions shown in the assignment. (NCC
uploads)
Entering data to table Rupesh31_Exhibition
Entering data to table Rupesh31_Exhibition_type
Data entered in table Rupesh31_Exhibition
Rupesh Chaulagain 160409 DB
12
Data entered in Rupesh31_Exhibition_type
c) Enter data for all the customers and associate them with exhibitions.
Note that a customer might have more than one exhibition associated with
them. (NCC uploads)
Entering data to Rupesh31_Customer
Entering data to Rupesh31_Software_type
Rupesh Chaulagain 160409 DB
13
Entering data to Rupesh31_Installation_type
Data entered in Rupesh31_Customer
Data entered in Rupesh31_Software_type
Data entered in Rupesh31_Installation_type
d) Enter data on staff and exhibitions they are working at taken from the
assignment. Give a listing of this information. (NCC uploads)
Entering data to table Rupesh31_Staff
Rupesh Chaulagain 160409 DB
14
Entering data to Rupesh31_Exhibition_Staff
Entering data to Rupesh31_Staff_roll
Data entered in Rupesh31_Staff
Data entered in Rupesh31_Exhibition_Staff
Data entered in Rupesh31_Staff_roll
Rupesh Chaulagain 160409 DB
15
e) Write a query that selects all the exhibitions for the Travel Association of
Great
Britain. (NCC uploads)
Query needed is:
Screenshot: Query to select required data
Result:
Screenshot: data selected
f) Write a query that selects the staff that work in software support. (NCC
uploads)
Query needed is:
Screenshot: Query to select required data
Result:
Screenshot: data selected
g) Write a query that selects all the exhibition details for exhibitions at
Olympia. (NCC uploads)
Query needed is:
Rupesh Chaulagain 160409 DB
16
Screenshot: Query to select required data
Result:
Screenshot: data selected
h) Write a query that counts all the trade exhibitions. (NCC uploads)
Query needed is:
Screenshot: Query to count required data
Result:
Screenshot: data counted
i) Write a query that shows the staff working at stamp exhibitions. (NCC
uploads)
Query needed is:
Screenshot: Query to select required data
Screenshot: selected data
j) Update the item table so that Sharon Smith has changed jobs to
Software
Project Manager. (NCC uploads)
Query needed is:
Rupesh Chaulagain 160409 DB
17
Screenshot: Query to update required data
Updated table:
select SR.Staff_roll,S.Staff_name from Rupesh31_Staff_roll SR , Rupesh31_Staff S
where SR.Staff_roll_id=S.Staff_roll_id;
Screenshot: updated table
k) Update the staff table so that Pauline West is now known as Pauline
Yardley. (NCC uploads)
Query needed is:
Screenshot: Query to update required data
Updated table:
select Staff_id,Staff_name from Rupesh31_Staff;
Rupesh Chaulagain 160409 DB
18
Screenshot: updated table
l) Update the lesson title of the exhibition ‘Stampex’ to ‘Stampex 2017’.
(NCC uploads)
Query needed is:
Screenshot: Query to delete required data
Updated table:
select Exhibition_id,Exhibition_name from Rupesh31_Exhibition;
Screenshot: updated table
m) Update any exhibitions that involve Sandy Niles so that now they have
Diana
West assigned to them. (NCC uploads)
Query needed is:
Screenshot: Query to update required data
Rupesh Chaulagain 160409 DB
19
Updated table:
select o.Staff_id, o.Staff_name, b.Exhibition_name
from Rupesh31_staff o, Rupesh31_exhibition_type et, Rupesh31_exhibition b,
Rupesh31_exhibition_staff es
where o.staff_id = es.staff_id
and b.exhibition_type_id = et.exhibition_type_id
and b.exhibition_id = es.exhibition_id
and s.staff_name = 'Diana West';
Screenshot: updated table
n) Delete the staff record for Sandy Niles. (NCC uploads)
Query needed is:
Screenshot : Query to delete required data.
Table after deleting:
select* from Rupesh31_staff;
Screenshot: deleted table
Task 3 – Assessment (NCC uploads)
A company called Synergy Exhibition Services which provides facilities for putting on displays
and demonstrations at exhibitions for promotions purposes. Public hires them to conduct
exhibitions and a customer is provided with an exhibition only. This company has given me a job
Rupesh Chaulagain 160409 DB
20
to prepare a database which meets all the needs to its data. So, here I must design a database
which can be useful and effective to this company. To make the database we should have good
knowledge in Normalization, should know how make ER and then we should know to create
table and insert values in tables using SQL.
Understanding of requirements:
First of all, we must understand all the essential components to carry out this task. Here, I must
understand the scenario that I have been provided. Then, all the given tables given table should
to normalized to 3rd
normal form by removing functional dependency, partial dependency and
non-keys dependency. This is compulsory to remove data replication and to maintain data
integrity. The all the tables which are formed during normalization should be combine to form a
relation by looking the relationship between those data.
How the initial design attempted to meet the requirements:
Here, I have collected all the ideas and I am about to make a suitable database. The given data
is repeated and random. I must manage all the data properly and make different tables by the
concept of normalization. Normalization helps us to remove repeating data separates
functionally, partially dependent data. At last I have separated the non-keys values to make a
separate table. Here I have separated those types of data and formed many tables. Then, I
have related all the tables to each other by looking the data in the table. Also, I have made a ER
diagram in Visual paradigm using CROWS FEET. These diagram gives us the clear relation
between tables or data. Then, I have made data dictionary (table holding all the properties if
entity). From dictionary, we can know the nature of data. I have created the tables
Rupesh31_Staff_roll, Rupesh31_Customer, Rupesh31_Exhibition_type,
Rupesh31_Exhibition, Rupesh31_Staff, Rupesh31_Exhibition_Satff,
Rupesh31_Software_type, Rupesh31_Installation_type and inserted the all the data we are
provided with. Then I have selected and update some data. Here, my work is finished. Since,
this my first time to design a database I had tried my best for its completion. But there can be
some errors.
Conclusion:
By the process of normalization and making ER diagrams I could make an excellent data base
to the company. I could remove all the replication of data. From the database, I have made we
can easily retrieve, modify data. Here I have made relation between data. The work to make a
data base for Synergy Exhibition Services company is completed. Therefore, from this task we
can conclude that we can make data base for any one by using Normalization process, making
ER diagram and implementing it in SQL developer.
Rupesh Chaulagain 160409 DB
21
References
1. Anon, (2017). [online] Available at: https://connect.nccedu.com/NCCEdu/upload [Accessed 22
Apr. 2017].

More Related Content

DOCX
database Assingment NCC Education l4dc
DOCX
ddw NCC education assingment l4dc
DOCX
NCC assingment l4dc ddoocp
DOCX
osd ncc education assingment l4dc
DOCX
computer network NCC l4dc assingment
DOCX
sfc Assingment l4dc NCC education
DOC
Database design and Development
database Assingment NCC Education l4dc
ddw NCC education assingment l4dc
NCC assingment l4dc ddoocp
osd ncc education assingment l4dc
computer network NCC l4dc assingment
sfc Assingment l4dc NCC education
Database design and Development

What's hot (20)

PDF
Ddoocp assignment qp spring winter 2021 final
DOCX
Software architect design documentation template
DOCX
Online board documentation
PDF
SDD-FinalYearProject
DOCX
TRIBHUVAN UNIVERSITY BCA INTERNSHIP REPORT FOR 7 SEM.docx
PPTX
Ch7-Software Engineering 9
PDF
Example Software Requirements Specification Document for ReqView
DOCX
Student management system analysis document
PDF
Powershell
DOC
Srs example webapp
DOCX
2.1 project management srs
PDF
Sample SRS format
DOCX
Computer science internship report
PDF
Example for SDS document in Software engineering
PPT
Slide 5 Class Diagram
PPT
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
PPTX
Ch13 security engineering
PDF
Software Architecture Document Final
PPT
PPTX
College Department Management System
Ddoocp assignment qp spring winter 2021 final
Software architect design documentation template
Online board documentation
SDD-FinalYearProject
TRIBHUVAN UNIVERSITY BCA INTERNSHIP REPORT FOR 7 SEM.docx
Ch7-Software Engineering 9
Example Software Requirements Specification Document for ReqView
Student management system analysis document
Powershell
Srs example webapp
2.1 project management srs
Sample SRS format
Computer science internship report
Example for SDS document in Software engineering
Slide 5 Class Diagram
Introduction to Unix operating system Chapter 1-PPT Mrs.Sowmya Jyothi
Ch13 security engineering
Software Architecture Document Final
College Department Management System
Ad

Similar to Database (20)

PDF
Unit_2.pdf
PDF
Advance database system(part 5)
PPTX
data base u2 dfhjhdbgjhbfxjjkgfbjkg.pptx
PPTX
DATABASE DESIGN.pptx
PPTX
Relational Database Design
PPTX
Relation Model Database Pertemuan k.pptx
PPTX
Database Basics
DOCX
Bc0041
PPT
Nunes database
PPTX
SQL-queries-for-Data-Analysts-Updated.pptx
PPT
Chapter 9
PDF
Unit 4 Design_a system analysis and design Designing Database.pdf
PPTX
Chapter 9
PPTX
RELATIONALfsaaaaaaaaaaaakyagsgs MODEL.pptx
PPT
Database management system
ODP
BIS06 Physical Database Models
ODP
BIS06 Physical Database Models
PPT
Chapter12 designing databases
PPTX
04 CHAPTER FOUR - INTEGRITY CONSTRAINTS AND NORMALIZATION.pptx
PPTX
Relational Database Design Functional Dependency – definition, trivial and no...
Unit_2.pdf
Advance database system(part 5)
data base u2 dfhjhdbgjhbfxjjkgfbjkg.pptx
DATABASE DESIGN.pptx
Relational Database Design
Relation Model Database Pertemuan k.pptx
Database Basics
Bc0041
Nunes database
SQL-queries-for-Data-Analysts-Updated.pptx
Chapter 9
Unit 4 Design_a system analysis and design Designing Database.pdf
Chapter 9
RELATIONALfsaaaaaaaaaaaakyagsgs MODEL.pptx
Database management system
BIS06 Physical Database Models
BIS06 Physical Database Models
Chapter12 designing databases
04 CHAPTER FOUR - INTEGRITY CONSTRAINTS AND NORMALIZATION.pptx
Relational Database Design Functional Dependency – definition, trivial and no...
Ad

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
The AUB Centre for AI in Media Proposal.docx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
sap open course for s4hana steps from ECC to s4
Agricultural_Statistics_at_a_Glance_2022_0.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm

Database

  • 1. Rupesh Chaulagain 160409 DB 1 Table of Contents Task 1 – Design..........................................................................................................................................3 a) Produce an entity relationship model for the proposed database system for ..........................3 Synergy Exhibition Services. This should be a fully normalized model to 3rd .............................3 normal form.............................................................................................................................................3 b) Discuss how you have identified primary and foreign keys for your entity...............................3 relationship model. You could mention data integrity, referential integrity and ............................3 functional dependence in your discussion. ........................................................................................3 c) Produce a data dictionary for the entity relationship model showing all attributes, with data types and identifying primary and foreign keys. ................................................................................4 Task 2 – Data Entry and Data Manipulation ..........................................................................................7 a) Create all the tables using SQL. Show your create table scripts and the finished..................7 tables........................................................................................................................................................7 b) Enter data on all the exhibitions shown in the assignment. ......................................................11 c) Enter data for all the customers and associate them with exhibitions. Note that a customer might have more than one exhibition associated with them..........................................................12 d) Enter data on staff and exhibitions they are working at taken from the..................................13 assignment. Give a listing of this information. .................................................................................13 e) Write a query that selects all the exhibitions for the Travel Association of Great..................15 Britain.....................................................................................................................................................15 f) Write a query that selects the staff that work in software support. ...........................................15 g) Write a query that selects all the exhibition details for exhibitions at Olympia.......................15 h) Write a query that counts all the trade exhibitions. ....................................................................16 i) Write a query that shows the staff working at stamp exhibitions...............................................16 j) Update the item table so that Sharon Smith has changed jobs to Software ...........................16 Project Manager...................................................................................................................................16 k) Update the staff table so that Pauline West is now known as Pauline Yardley.....................17 l) Update the lesson title of the exhibition ‘Stampex’ to ‘Stampex 2017’.....................................18 m) Update any exhibitions that involve Sandy Niles so that now they have Diana ...................18 West assigned to them........................................................................................................................18 n) Delete the staff record for Sandy Niles. .......................................................................................19 Task 3 – Assessment ..........................................................................................................................19
  • 3. Rupesh Chaulagain 160409 DB 3 Task 1 – Design a) Produce an entity relationship model for the proposed database system for Synergy Exhibition Services. This should be a fully normalized model to 3rd normal form. (NCC uploads) Normalization is removing repeating groups and making relation between the data. We must normalize any given data to make a reliable database. There are certain steps performed during normalization. Most used normal form are: 1NF, 2NF, 3NF. ER model is the pictorial representation of data which contains table and entities inside each and table are related to each other. The main components of ER model are entity set and relation set. I have used CROWS FEET to make ER diagram in Visual paradigm. The required ER model which is in 3rd normal form is: Screenshot: Fully normalized ER diagram b) Discuss how you have identified primary and foreign keys for your entity relationship model. You could mention data integrity, referential integrity and functional dependence in your discussion. (NCC uploads) Primary key: It is a column in a table which uniquely defines every entity of a table. It must not be null. It must be index and unique. From using primary key we can retrieve all the other data from the table. There is always one primary key in every table but cannot be more than one. To choose a primary key we look for all the column which can uniquely define other column and from those columns we select the suitable one, For example, in table Rupesh31_Exhibition there are two
  • 4. Rupesh Chaulagain 160409 DB 4 possible primary key there Exhibition_id, Exhibition_name are the possible primary key because from these columns we can retrieve all the other data. But, Exhibition_name can occur twice in the table thus Exhibition_id is suitable for primary key. Foreign key: Foreign key is a column which relates a table to another. Usually primary key of one table becomes foreign key in another table. When we relate the table the table with many relation holds foreign key. Foreign key can be identified by looking relationship between two tables. The foreign key is formed in the table with many relation. For example, in three tables Rupesh31_Exhibition, Rupesh31_Customer, Rupesh31_Exhibition type, the relation between Rupesh31_Exhibition and Rupesh31_Customer the relation is many to one respectively. So, the foreign key is Rupesh31_Exhibition. In table Rupesh31_Exhibition and Rupesh31_Exhibition_type the relation is many to one respectively. So, foreign key lies in Rupesh31_Exhibition. To create foreign key, it must be primary key is previously created table. There can be one or more foreign keys in a single table. Data integrity: It means the precision and reliability of data. We should maintain the data integrity to guarantee recoverability and to relate data between each other. Relational integrity: This integrity is used to make relation between two tables. When we make foreign key in a table then it must be primary key in another table which must be created first. It also defines that the primary key and foreign of two related tables must be same. For example, in tables Rupesh31_Exhibition_type and Rupesh31_Exhibition Exhibition_type_id is primary key and foreign key in respected table. Here, we must create the table Rupesh31_Exhibition_type first then only we can create Rupesh31_Exhibition. Due to relational integrity, we cannot delete or update Exhibition_type_id in Rupesh31_Exhibition table. Hence, we maintained relational integrity while making primary key and foreign key. Functional dependency: The elements of a table are functionally dependent if one column of a table can define another column of table. In other words, it is constraints which describes relation between attributes. It is important to maintain functional dependency during normalization. Here, for Exhibition Summary Sheet Exhibition_id can define Exhibition_name, Exhibition_address and Exhibition_dates so one table is formed having Exhibition_id as primary key. Similarly, Customer_no defines customer_name and forms table with Customer_no as primary key and Exhibition_type_id defines Exhibition_type and forms another table with Exhibition_type_id as primary key. Hence, the functional dependency is maintaining and also helps to find out primary key. c) Produce a data dictionary for the entity relationship model showing all attributes, with data types and identifying primary and foreign keys. (NCC uploads) A place where metadata (data of data) is stored is data dictionary. This is mostly behind the scenes data. It defines the data type of any data. It also contains length, range, formatting and any other data about this data.
  • 5. Rupesh Chaulagain 160409 DB 5 For table Rupesh31_Staff_roll DD for Rupesh31_Staff_roll For table Rupesh31_Customer DD for Rupesh31_Customer For table Rupesh31_Exhibition_type DD for Rupesh31_Exhibition_type For table Rupesh31_Exhibition DD for Rupesh31_Exhibition For table Rupesh31_Staff
  • 6. Rupesh Chaulagain 160409 DB 6 DD for Rupesh31_Staff For table Rupesh31_Exhibition_Staff DD for Rupesh31_Exhibition_Staff For table Rupesh31_Software_type DD for Rupesh31_Software_type For table Rupesh31_Installation_type DD for Rupesh31_Installation_type
  • 7. Rupesh Chaulagain 160409 DB 7 Task 2 – Data Entry and Data Manipulation a) Create all the tables using SQL. Show your create table scripts and the finished tables. (NCC uploads) • Creating all table To create Rupesh31_Staff_roll Create Rupesh31_Staff_roll To create Rupesh31_Customer Create Rupesh31_Customer To create Rupesh31_Exhibition_type Create Rupesh31_Exhibition_type To create Rupesh31_Exhibition
  • 8. Rupesh Chaulagain 160409 DB 8 Create Rupesh31_Exhibition To create Rupesh31_Staff Create Rupesh31_Staff To create Rupesh31_Exhibition_Staff Create Rupesh31_Exhibition_Staff To create Rupesh31_Software_type Create Rupesh31_Software_type To create Rupesh31_Installation_type
  • 9. Rupesh Chaulagain 160409 DB 9 Create Rupesh31_Installation_type • All created table Desc Rupesh31_Staff_roll Showing Rupesh31_Staff_roll created table Desc Rupesh31_Customer Showing Rupesh31_Customer created table Desc Rupesh31_Exhibition_type Showing Rupesh31_Exhibition_type created table Desc Rupesh31_Exhibition
  • 10. Rupesh Chaulagain 160409 DB 10 Showing Rupesh31_Exhibition created table Desc Rupesh31_Staff Showing Rupesh31_Staff created table Desc Rupesh31_Exhibition_Staff Showing Rupesh31_Exhibition_Staff created table Desc Rupesh31_Software_type
  • 11. Rupesh Chaulagain 160409 DB 11 Showing Rupesh31_Software_type created table Desc Rupesh31_Installation_type Showing Rupesh31_Installlation_type created table b) Enter data on all the exhibitions shown in the assignment. (NCC uploads) Entering data to table Rupesh31_Exhibition Entering data to table Rupesh31_Exhibition_type Data entered in table Rupesh31_Exhibition
  • 12. Rupesh Chaulagain 160409 DB 12 Data entered in Rupesh31_Exhibition_type c) Enter data for all the customers and associate them with exhibitions. Note that a customer might have more than one exhibition associated with them. (NCC uploads) Entering data to Rupesh31_Customer Entering data to Rupesh31_Software_type
  • 13. Rupesh Chaulagain 160409 DB 13 Entering data to Rupesh31_Installation_type Data entered in Rupesh31_Customer Data entered in Rupesh31_Software_type Data entered in Rupesh31_Installation_type d) Enter data on staff and exhibitions they are working at taken from the assignment. Give a listing of this information. (NCC uploads) Entering data to table Rupesh31_Staff
  • 14. Rupesh Chaulagain 160409 DB 14 Entering data to Rupesh31_Exhibition_Staff Entering data to Rupesh31_Staff_roll Data entered in Rupesh31_Staff Data entered in Rupesh31_Exhibition_Staff Data entered in Rupesh31_Staff_roll
  • 15. Rupesh Chaulagain 160409 DB 15 e) Write a query that selects all the exhibitions for the Travel Association of Great Britain. (NCC uploads) Query needed is: Screenshot: Query to select required data Result: Screenshot: data selected f) Write a query that selects the staff that work in software support. (NCC uploads) Query needed is: Screenshot: Query to select required data Result: Screenshot: data selected g) Write a query that selects all the exhibition details for exhibitions at Olympia. (NCC uploads) Query needed is:
  • 16. Rupesh Chaulagain 160409 DB 16 Screenshot: Query to select required data Result: Screenshot: data selected h) Write a query that counts all the trade exhibitions. (NCC uploads) Query needed is: Screenshot: Query to count required data Result: Screenshot: data counted i) Write a query that shows the staff working at stamp exhibitions. (NCC uploads) Query needed is: Screenshot: Query to select required data Screenshot: selected data j) Update the item table so that Sharon Smith has changed jobs to Software Project Manager. (NCC uploads) Query needed is:
  • 17. Rupesh Chaulagain 160409 DB 17 Screenshot: Query to update required data Updated table: select SR.Staff_roll,S.Staff_name from Rupesh31_Staff_roll SR , Rupesh31_Staff S where SR.Staff_roll_id=S.Staff_roll_id; Screenshot: updated table k) Update the staff table so that Pauline West is now known as Pauline Yardley. (NCC uploads) Query needed is: Screenshot: Query to update required data Updated table: select Staff_id,Staff_name from Rupesh31_Staff;
  • 18. Rupesh Chaulagain 160409 DB 18 Screenshot: updated table l) Update the lesson title of the exhibition ‘Stampex’ to ‘Stampex 2017’. (NCC uploads) Query needed is: Screenshot: Query to delete required data Updated table: select Exhibition_id,Exhibition_name from Rupesh31_Exhibition; Screenshot: updated table m) Update any exhibitions that involve Sandy Niles so that now they have Diana West assigned to them. (NCC uploads) Query needed is: Screenshot: Query to update required data
  • 19. Rupesh Chaulagain 160409 DB 19 Updated table: select o.Staff_id, o.Staff_name, b.Exhibition_name from Rupesh31_staff o, Rupesh31_exhibition_type et, Rupesh31_exhibition b, Rupesh31_exhibition_staff es where o.staff_id = es.staff_id and b.exhibition_type_id = et.exhibition_type_id and b.exhibition_id = es.exhibition_id and s.staff_name = 'Diana West'; Screenshot: updated table n) Delete the staff record for Sandy Niles. (NCC uploads) Query needed is: Screenshot : Query to delete required data. Table after deleting: select* from Rupesh31_staff; Screenshot: deleted table Task 3 – Assessment (NCC uploads) A company called Synergy Exhibition Services which provides facilities for putting on displays and demonstrations at exhibitions for promotions purposes. Public hires them to conduct exhibitions and a customer is provided with an exhibition only. This company has given me a job
  • 20. Rupesh Chaulagain 160409 DB 20 to prepare a database which meets all the needs to its data. So, here I must design a database which can be useful and effective to this company. To make the database we should have good knowledge in Normalization, should know how make ER and then we should know to create table and insert values in tables using SQL. Understanding of requirements: First of all, we must understand all the essential components to carry out this task. Here, I must understand the scenario that I have been provided. Then, all the given tables given table should to normalized to 3rd normal form by removing functional dependency, partial dependency and non-keys dependency. This is compulsory to remove data replication and to maintain data integrity. The all the tables which are formed during normalization should be combine to form a relation by looking the relationship between those data. How the initial design attempted to meet the requirements: Here, I have collected all the ideas and I am about to make a suitable database. The given data is repeated and random. I must manage all the data properly and make different tables by the concept of normalization. Normalization helps us to remove repeating data separates functionally, partially dependent data. At last I have separated the non-keys values to make a separate table. Here I have separated those types of data and formed many tables. Then, I have related all the tables to each other by looking the data in the table. Also, I have made a ER diagram in Visual paradigm using CROWS FEET. These diagram gives us the clear relation between tables or data. Then, I have made data dictionary (table holding all the properties if entity). From dictionary, we can know the nature of data. I have created the tables Rupesh31_Staff_roll, Rupesh31_Customer, Rupesh31_Exhibition_type, Rupesh31_Exhibition, Rupesh31_Staff, Rupesh31_Exhibition_Satff, Rupesh31_Software_type, Rupesh31_Installation_type and inserted the all the data we are provided with. Then I have selected and update some data. Here, my work is finished. Since, this my first time to design a database I had tried my best for its completion. But there can be some errors. Conclusion: By the process of normalization and making ER diagrams I could make an excellent data base to the company. I could remove all the replication of data. From the database, I have made we can easily retrieve, modify data. Here I have made relation between data. The work to make a data base for Synergy Exhibition Services company is completed. Therefore, from this task we can conclude that we can make data base for any one by using Normalization process, making ER diagram and implementing it in SQL developer.
  • 21. Rupesh Chaulagain 160409 DB 21 References 1. Anon, (2017). [online] Available at: https://connect.nccedu.com/NCCEdu/upload [Accessed 22 Apr. 2017].