SlideShare a Scribd company logo
1 of 21
Download to read offline
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

What's hot

sfc Assingment l4dc NCC education
 sfc Assingment l4dc NCC education sfc Assingment l4dc NCC education
sfc Assingment l4dc NCC educationDavid Parker
 
Computer system
Computer systemComputer system
Computer systemRū Sh
 
Database design and Development
Database design and DevelopmentDatabase design and Development
Database design and DevelopmentMd. Mahbub Alam
 
Computer systems assignment frontsheet
Computer systems   assignment frontsheetComputer systems   assignment frontsheet
Computer systems assignment frontsheetbao023
 
System Analysis & Design (NCC Education)
System Analysis & Design (NCC Education)System Analysis & Design (NCC Education)
System Analysis & Design (NCC Education)Md. Mahbub Alam
 
Network security and cryptography 2018
Network security and cryptography  2018  Network security and cryptography  2018
Network security and cryptography 2018 Action Mojakwe
 
Development Framework & Methods
Development Framework & MethodsDevelopment Framework & Methods
Development Framework & MethodsNay Lynn Aung
 
NCC EDUCATION Referencing and Bibliographies
NCC EDUCATION Referencing and BibliographiesNCC EDUCATION Referencing and Bibliographies
NCC EDUCATION Referencing and BibliographiesIrfaan Bahadoor
 
No silver bullet essence and accidents of software engineering
No silver bullet essence and accidents of software engineeringNo silver bullet essence and accidents of software engineering
No silver bullet essence and accidents of software engineeringArun Banotra
 
Software Design Description (SDD) sample
Software Design Description (SDD) sampleSoftware Design Description (SDD) sample
Software Design Description (SDD) samplePeny Gama
 
Inspection of Software Requirements Specifications (srs)
Inspection of Software Requirements Specifications (srs)Inspection of Software Requirements Specifications (srs)
Inspection of Software Requirements Specifications (srs)Mohammad Emrul Hassan Emon
 
Online Helpdesk System
Online Helpdesk SystemOnline Helpdesk System
Online Helpdesk SystemJayant Gope
 

What's hot (20)

sfc Assingment l4dc NCC education
 sfc Assingment l4dc NCC education sfc Assingment l4dc NCC education
sfc Assingment l4dc NCC education
 
Computer system
Computer systemComputer system
Computer system
 
EOM
EOMEOM
EOM
 
Database design and Development
Database design and DevelopmentDatabase design and Development
Database design and Development
 
Computer systems assignment frontsheet
Computer systems   assignment frontsheetComputer systems   assignment frontsheet
Computer systems assignment frontsheet
 
System Analysis & Design (NCC Education)
System Analysis & Design (NCC Education)System Analysis & Design (NCC Education)
System Analysis & Design (NCC Education)
 
Network security and cryptography 2018
Network security and cryptography  2018  Network security and cryptography  2018
Network security and cryptography 2018
 
BIT PROJECT
BIT PROJECT BIT PROJECT
BIT PROJECT
 
Development Framework & Methods
Development Framework & MethodsDevelopment Framework & Methods
Development Framework & Methods
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Office 2010 Suite And Version Comparison Guide
Office 2010 Suite And Version Comparison GuideOffice 2010 Suite And Version Comparison Guide
Office 2010 Suite And Version Comparison Guide
 
Ch24 quality management
Ch24 quality managementCh24 quality management
Ch24 quality management
 
NCC EDUCATION Referencing and Bibliographies
NCC EDUCATION Referencing and BibliographiesNCC EDUCATION Referencing and Bibliographies
NCC EDUCATION Referencing and Bibliographies
 
No silver bullet essence and accidents of software engineering
No silver bullet essence and accidents of software engineeringNo silver bullet essence and accidents of software engineering
No silver bullet essence and accidents of software engineering
 
Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
 
Software Design Description (SDD) sample
Software Design Description (SDD) sampleSoftware Design Description (SDD) sample
Software Design Description (SDD) sample
 
Inspection of Software Requirements Specifications (srs)
Inspection of Software Requirements Specifications (srs)Inspection of Software Requirements Specifications (srs)
Inspection of Software Requirements Specifications (srs)
 
Srs
SrsSrs
Srs
 
Online Helpdesk System
Online Helpdesk SystemOnline Helpdesk System
Online Helpdesk System
 
internship report covert
internship report covertinternship report covert
internship report covert
 

Similar to Database

Physical elements of data
Physical elements of dataPhysical elements of data
Physical elements of dataDimara Hakim
 
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxAB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxbartholomeocoombs
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developerAhsan Kabir
 
04 quiz 1 answer key
04 quiz 1 answer key04 quiz 1 answer key
04 quiz 1 answer keyAnne Lee
 
Nunes database
Nunes databaseNunes database
Nunes databaseRohini17
 
What is in reality a DAX filter context
What is in reality a DAX filter contextWhat is in reality a DAX filter context
What is in reality a DAX filter contextMarco Pozzan
 
Scraping, Transforming, and Enriching Bibliographic Data with Google Sheets
Scraping, Transforming, and Enriching Bibliographic Data with Google SheetsScraping, Transforming, and Enriching Bibliographic Data with Google Sheets
Scraping, Transforming, and Enriching Bibliographic Data with Google SheetsMichael P. Williams
 
Project_2CIS405(GroupProject)
Project_2CIS405(GroupProject)Project_2CIS405(GroupProject)
Project_2CIS405(GroupProject)James Wu
 
It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.Alex Powers
 
Sql server 2012 transact sql dml reference
Sql server 2012 transact sql dml referenceSql server 2012 transact sql dml reference
Sql server 2012 transact sql dml referenceU.N.S.C
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docxjane3dyson92312
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems incMuthu Natarajan
 
Excel Training for SEOs
Excel Training for SEOsExcel Training for SEOs
Excel Training for SEOsTroyfawkes
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questionsambika93
 
evaluation of statistical expression, materialised views, evaluation plans
evaluation of statistical expression, materialised views, evaluation plansevaluation of statistical expression, materialised views, evaluation plans
evaluation of statistical expression, materialised views, evaluation plansHarsh Kotwani
 

Similar to Database (20)

Database design
Database designDatabase design
Database design
 
Physical elements of data
Physical elements of dataPhysical elements of data
Physical elements of data
 
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxAB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
 
04 quiz 1 answer key
04 quiz 1 answer key04 quiz 1 answer key
04 quiz 1 answer key
 
Nunes database
Nunes databaseNunes database
Nunes database
 
Physical Design and Development
Physical Design and DevelopmentPhysical Design and Development
Physical Design and Development
 
1. access
1. access1. access
1. access
 
What is in reality a DAX filter context
What is in reality a DAX filter contextWhat is in reality a DAX filter context
What is in reality a DAX filter context
 
Scraping, Transforming, and Enriching Bibliographic Data with Google Sheets
Scraping, Transforming, and Enriching Bibliographic Data with Google SheetsScraping, Transforming, and Enriching Bibliographic Data with Google Sheets
Scraping, Transforming, and Enriching Bibliographic Data with Google Sheets
 
Project_2CIS405(GroupProject)
Project_2CIS405(GroupProject)Project_2CIS405(GroupProject)
Project_2CIS405(GroupProject)
 
It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.
 
Sql server 2012 transact sql dml reference
Sql server 2012 transact sql dml referenceSql server 2012 transact sql dml reference
Sql server 2012 transact sql dml reference
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
Microsoft Excel Training
Microsoft Excel TrainingMicrosoft Excel Training
Microsoft Excel Training
 
Excel Training for SEOs
Excel Training for SEOsExcel Training for SEOs
Excel Training for SEOs
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questions
 
Unit 2 web technologies
Unit 2 web technologiesUnit 2 web technologies
Unit 2 web technologies
 
evaluation of statistical expression, materialised views, evaluation plans
evaluation of statistical expression, materialised views, evaluation plansevaluation of statistical expression, materialised views, evaluation plans
evaluation of statistical expression, materialised views, evaluation plans
 

Recently uploaded

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

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].