Beruflich Dokumente
Kultur Dokumente
Table of Figures
Illustration 1: ER Diagram ............................................................................................... 5
Illustration 2: Normalization ............................................................................................. 8
Illustration 3: Query to create a user named seasalter .................................................. 13
Illustration 4: Query to create table named Courses ..................................................... 13
Illustration 5: Query to create table named modules ..................................................... 14
Illustration 6: Query to create table named Courses_modules ...................................... 14
Illustration 7: Query to create table named Equipment_type ......................................... 15
Illustration 8: Query to create table named Equipment.................................................. 15
Illustration 9: Query to create table named Module_type .............................................. 16
Illustration 10: Query to create table named Laboratories ............................................. 16
Illustration 11: Query to create table named Laboratories_modules ............................. 17
Illustration 12: Query to create table named Modules_Module_type ............................. 17
Illustration 13: Query to create table named Staff_type................................................. 18
Illustration 14: Query to create table named Staff ......................................................... 18
Illustration 15: Query to create table named Staff_Courses .......................................... 19
Illustration 16: Query to create table named Laboratories_equipment .......................... 19
Illustration 17: inserting values in table Courses ........................................................... 20
Illustration 18: inserting data in table modules. ............................................................. 20
Illustration 19: inserting data in table Courses_modules ............................................... 21
Illustration 20: inserting data in table Equipment_type .................................................. 21
Illustration 21: inserting data in table equipment ........................................................... 22
Illustration 22: inserting data in table Laboratories ........................................................ 23
Illustration 23: inserting data in table Laboratories_modules ......................................... 23
Illustration 24: inserting data in table Module_type ....................................................... 24
Illustration 25: inserting data in table Modules_module_type ........................................ 24
Illustration 26: inserting data in table staff_type ............................................................ 25
Illustration 27: inserting data in table staff ..................................................................... 25
Illustration 28: inserting data in table staff_courses ....................................................... 26
Illustration 29: inserting data in table laboratories_equipment....................................... 27
Illustration 30: Queries to show all the data of table courses and teacher .................... 28
Illustration 31: Query to show data for modules with its teachers .................................. 29
Illustration 32: Query to list all the data on laboratories table ........................................ 30
Illustration 33: Query to list the equipment found in laboratories ................................... 31
Illustration 34: Query to show all the teachers teaching chemistry ................................ 32
Illustration 35: Query changing plant biology to core unit .............................................. 32
Illustration 36: Query to edit the name of a teacher ....................................................... 33
Illustration 37: Query to shows all equipment in the chemistry laboratories .................. 34
Illustration 38: Query that shows all the teachers who might be using a microscope. ... 35
Illustration 39: Queries showing details of all courses and the modules including the
teachers for them .......................................................................................................... 36
Illustration 40: Query showing how many types of item are classified as Chemistry
Experiment. ................................................................................................................... 37
1
00168692-Bishes-Upadhyaya-DDD
2
00168692-Bishes-Upadhyaya-DDD
Introduction
Seasalter College is a further education college based on Kent, United Kingdom that
specialize in science education wants a standard database to manage teaching and
resources for their various courses. Based on the scenario a system is designed to
address the indispensable requirements of the college. Initially the scenario is to be
normalized to for making a proper Entity Relationship diagram from which a data
dictionary is auto generated using reverse engineering function. This will make writing the
queries easier and efficient. ER diagram and data dictionary is made using Visual
paradigm and all the queries are written using SQL tools and the database is stored in
ORACLE 11g.
3
00168692-Bishes-Upadhyaya-DDD
Task 1
Question A:
Entities
Relationships
Attributes
Entity
In regards to database, an entity is any object in a system that is singular, distinguishable
and distinct. Usually, entities are easily identifiable as it refers to individuals, organizations
or even distinct system component which are significant to themselves. (Rouse and Flanigan)
Attribute
Attributes are the characteristics of the entities. In a database management system an
attribute denotes a database element such as table. They describe the instances in the
row of a database. For example, the attributes in staff might be first_name, DOB or
contact_number. (Rouse)
Relationship
In the background of databases, a relationship are the state that occurs amongst two
relational database tables when one table has a foreign key that references the primary
key of other tables. Relationship authorities relational databases to divide and store data
in different tables, while linking desperate data.
Types of relationship
In databases there are a total of three types of relationship. They are as follows:
4
00168692-Bishes-Upadhyaya-DDD
One-to-many relationships: This relationship is applied using two tables with primary
key and foreign key relationships.
Explanation of ER diagram
Illustration 1: ER Diagram
5
00168692-Bishes-Upadhyaya-DDD
Centered on the given scenario and sample data an Entity Relationship Diagram for
Seasalter College is developed. The above ER shows that a staff might be allocated in
teaching one or more than one course and a course might be taught by many staffs
therefore to resolve this issue a linking table is created. Similarly a staff’s first name has
been made not null because a staff cannot be without a first name and their phone number
and email address is made to be unique because they must always be exclusive and
cannot be similar to each other. Module_type table is made and shares a many to many
relationship with modules table because a module type can have many modules in them
and a module can be a part of many module types. In the modules table module_code
is set to be the primary key and in the Courses table course_code is made as the primary
key. Since they have many to many relationship a linking table Courses_module is
created where the primary key of both table are made into foreign key. In the
Equipment_type table Equipment_type_id is set as the primary key and equipment_type
is made unique because in the scenario this field is already defined. This table shares a
one to many relationship with Equipment table because equipment_type can have many
equipment in it. Therefore the Equipment_type_id is made to be the foreign key in the
Equipment table. Laboratory_ID is the primary key in the Laboratories table and
Laboratory_Name is made to be unique since there cannot be more than one laboratory
with the same name. Similarly a laboratory can have many equipment in it and many
equipment can be found in many laboratories therefore there is a many to many
relationship among these two tables where the primary key of the parent table is made to
be the foreign key and a new field quantity is added and made as not null to find out the
number of equipment in a laboratory. The entities for the table were carefully chosen
using Natural Language Analysis and for every many to many relationship a linking table
is created. Constraints are given to the attributes based to the tables.
6
00168692-Bishes-Upadhyaya-DDD
Question B:
Normalization
Normalization is a procedure of reordering data in a database in order to decrease the
redundancy of data and to make sure that the data dependencies are reasonable.
Normalization is performed because it allows the database to take up as little disk space
as possible which results in improved performance.
There are three main types of normalization which are explained below:
7
00168692-Bishes-Upadhyaya-DDD
Normalization
Illustration 2: Normalization
8
00168692-Bishes-Upadhyaya-DDD
Question C:
Data Dictionary
A data dictionary is a group of database tables used to collect evidence about a
database’s description. It covers information such as tables, datatypes, rows, indexes,
etc. It’s used to execute queries and is updated by design whenever changes to an object
within the database is made. (Wenzel)
Meta data
Metadata characterizes data. It offers documentation about data so that it can be
understood and consumed more willingly by an organization. It answers who, what, when,
where, why and how questions for users data. (Mullins)
Constraints
Constraints are rules on data. What data is valid and what is invalid can be defined using
constraints. Its main importance is to maintain data integrity. The constraints that are
widely used in database are: NOT NULL, Primary key, Foreign key, Check, Default.
(Garcia-Molina, Ullman and Widom)
9
00168692-Bishes-Upadhyaya-DDD
Data Dictionary
10
00168692-Bishes-Upadhyaya-DDD
11
00168692-Bishes-Upadhyaya-DDD
12
00168692-Bishes-Upadhyaya-DDD
Task 2
Query to
create a
user named
seasalter
Query to
create table
named
Courses
13
00168692-Bishes-Upadhyaya-DDD
Query to
create table
named
modules
Mo
Query to create
table named
Courses_modules
14
00168692-Bishes-Upadhyaya-DDD
Query to create
table named
Equipment_type
Query to
create table
named
Equipment
15
00168692-Bishes-Upadhyaya-DDD
Query to
create table
named
Module_type
Query to
create table
named
Laboratories
16
00168692-Bishes-Upadhyaya-DDD
Query to
create table
named
Laboratories
_modules
Query to create
table named
Modules_Module_
type
17
00168692-Bishes-Upadhyaya-DDD
Query to
create table
named
Staff_type
Query to
create table
named Staff
18
00168692-Bishes-Upadhyaya-DDD
Query to create
table named
Staff_Courses
Query to
create table
named
Laboratories_
equipment
19
00168692-Bishes-Upadhyaya-DDD
Inserting
values in table
Courses
Inserting
data in
table
modules
20
00168692-Bishes-Upadhyaya-DDD
inserting data in
table
Courses_modules
inserting data in
table
Equipment_type
21
00168692-Bishes-Upadhyaya-DDD
Inserting
data in
table
Equipment
22
00168692-Bishes-Upadhyaya-DDD
Inserting data
in table
Laboratories
Inserting
data in table
Laboratories
_modules
23
00168692-Bishes-Upadhyaya-DDD
Inserting data in
table
Module_type
Inserting data in
table
Modules_module
_type
24
00168692-Bishes-Upadhyaya-DDD
Inserting data in
table staff_type
Inserting
data in
table
staff
25
00168692-Bishes-Upadhyaya-DDD
Inserting data in
table
Staff_courses
26
00168692-Bishes-Upadhyaya-DDD
Inserting data
in table
laboratories_
equipment
27
00168692-Bishes-Upadhyaya-DDD
Queries to show
all the data of
table courses
and teacher
Illustration 30: Queries to show all the data of table courses and teacher
28
00168692-Bishes-Upadhyaya-DDD
Query to
show data for
modules with
its teachers
Illustration 31: Query to show data for modules with its teachers
29
00168692-Bishes-Upadhyaya-DDD
Query to list
all the data on
laboratories
table
30
00168692-Bishes-Upadhyaya-DDD
Query to list
the
equipment
found in
laboratories
31
00168692-Bishes-Upadhyaya-DDD
Query to show
all the teachers
teaching
chemistry
Query changing
plant biology to
core unit
32
00168692-Bishes-Upadhyaya-DDD
33
00168692-Bishes-Upadhyaya-DDD
34
00168692-Bishes-Upadhyaya-DDD
Query that
shows all the
teachers who
might be using
a microscope.
Illustration 38: Query that shows all the teachers who might be using a microscope.
35
00168692-Bishes-Upadhyaya-DDD
Illustration 39: Queries showing details of all courses and the modules including the teachers for them
36
00168692-Bishes-Upadhyaya-DDD
Query showing
how many types
of item are
classified as
Chemistry
Experiment.
Illustration 40: Query showing how many types of item are classified as Chemistry Experiment.
37
00168692-Bishes-Upadhyaya-DDD
TASK 3
Question A:
A new table maintenance has been added to this diagram because Seasalter College
wants to save information regarding the maintenance work on the college’s database
system. In the maintenance table maintenance_type_id is made to be the primary key
with maintence_type_name, cost_per_unit and staff_requirement included. There is a
many to many relationship between the laboratories and maintenance table therefore a
new linking table is formed named Laboratories_maintenance where the laboratory and
their equivalent maintenance type is stockpiled.
38
00168692-Bishes-Upadhyaya-DDD
Query to create
table
maintenance_type
Query to
insert data
into table
maintenance_
type
Query to create
table
lab_maintenance
39
00168692-Bishes-Upadhyaya-DDD
Query to insert
data into
lab_maintenance
A view is a virtual table founded on the result-set of an SQL statement. A view covers
rows and columns and the fields in a view are fields from one or more real tables in the
database. It constantly shows the up to date data which makes it more explanatory.
(W3schools.com)
Grant view
to seasalter.
40
00168692-Bishes-Upadhyaya-DDD
Query to
create view for
cost
information
41
00168692-Bishes-Upadhyaya-DDD
TASK 4
In this age of technological advancement data and computing environment have created
a paradigm shift in data management from centralized working to decentralized working.
Data is only going to get larger and larger. It is hard to store all the data in on server
sometimes. Centralized database is a single point of failure whereas a distributed
database will improve the availability, reliability and performance. Splitting the database
into fragments that is assigned to one site will definitely improve the read output.
If Seasalter College wants to expand and merge with other colleges they must definitely
use a distributed database system because of the following reasons:
As the name suggest the database is distributed due to which the data becomes more
safe and reliable on different systems.
Migration of data becomes easy.
Distributed database supports both OLTP and OLAP work upon diversified systems
by providing synchronized data.
Since most organization use variety of software with its specific database support.
Distributed DBMS will provide a uniform functionality for multiple application software
and
In case of database failure the system will continue to function may be at a reduced
performance.
Disadvantages of implementing DDBMS
42
Distributed 00168692-Bishes-Upadhyaya-DDD
database system
TASK 5
According to the given scenario Seasalter Education College wants to implement a proper
normalized database to help them manage teaching and resources for various courses.
Various steps were carried out to standardize the database this process are given below:
Initially as per the request of Seasalter College a new database was made to carry out
the information about staff, module, course, laboratories, and equipment and later a new
table maintenance was added to store the information about maintenance of the
laboratories.
Normalization process (1NF – 3NF) was carried out to minimize the data redundancy as
much as possible. Partial and functional dependencies were removed in this process and
the database was standardized.
Following applications were used to reduce the design the database for Seasalter
College:
43
00168692-Bishes-Upadhyaya-DDD
Oracle 11g
Oracle 11g was the software used for the storing the database of Seasalter College. This
particular software was used because of its well renowned market presence, portability
options and performance.
Visual Paradigm
Visual paradigm was the tool used to design the database because of its extensive
database coverage and reverse engineering feature. After the completion of
normalization process entities were linked with each other and an Entity Relationship
diagram was finalized.
Microsoft Excel
Microsoft Excel was used for inserting query in the database. This was made easy
through its automation feature.
SQLTools
All the queries were written and executed through the SQL tool. This software was
preferred because of its well define standards that helps to make the database
standardized, its fast execution and versatility in writing the codes to execute the
information from the database.
44
00168692-Bishes-Upadhyaya-DDD
Conclusion
Finally a standard database proposed by Seasalter College is made. This database
manages the teaching and resources for various courses. All together 15 entities were
used to complete this process which was made easy after performing normalization on
the scenario which would help in making a standardized database by reducing
redundancy. The ER diagram was created using Visual paradigm and a data dictionary
was generated using reverse engineering function available on the software whilst the
query part was written in SQL tools and the database was stored in ORACLE 11g.
45
00168692-Bishes-Upadhyaya-DDD
References
Connolly, T. and Begg, C. (n.d.). Database systems. 4th ed. PEARSON, p.23.
Elmasri, R. and Navathe, S. (2014). Fundamentals of database systems. 6th ed. Boston: Addison wesley,
p.342.
Garcia-Molina, H., Ullman, J. and Widom, J. (n.d.). Database systems. PEARSON, p.315.
46
00168692-Bishes-Upadhyaya-DDD
Appendix
47
00168692-Bishes-Upadhyaya-DDD
48
00168692-Bishes-Upadhyaya-DDD
49
00168692-Bishes-Upadhyaya-DDD
50
00168692-Bishes-Upadhyaya-DDD
51
00168692-Bishes-Upadhyaya-DDD
52
00168692-Bishes-Upadhyaya-DDD
53
00168692-Bishes-Upadhyaya-DDD
54
00168692-Bishes-Upadhyaya-DDD
55
00168692-Bishes-Upadhyaya-DDD
56
00168692-Bishes-Upadhyaya-DDD
57
00168692-Bishes-Upadhyaya-DDD
58
00168692-Bishes-Upadhyaya-DDD
59
00168692-Bishes-Upadhyaya-DDD
60
00168692-Bishes-Upadhyaya-DDD
61
00168692-Bishes-Upadhyaya-DDD
62
00168692-Bishes-Upadhyaya-DDD
63