Академический Документы
Профессиональный Документы
Культура Документы
Introduction .................................................................................................................................................. 2
Task 1 ............................................................................................................................................................ 4
Entity-Relationship diagram...................................................................................................................... 4
Task 2 ............................................................................................................................................................ 5
Data Dictionary ......................................................................................................................................... 5
Relationship .................................................................................................................................................. 7
Task3 ........................................................................................................................................................... 12
Task 4 .......................................................................................................................................................... 14
Creating SQL Table .................................................................................................................................. 14
Task 5 .......................................................................................................................................................... 18
Task 6 .......................................................................................................................................................... 20
Task 7 .......................................................................................................................................................... 24
Task 8 .......................................................................................................................................................... 27
Transactions ............................................................................................................................................ 27
Concurrency control ............................................................................................................................... 28
Recovery control ..................................................................................................................................... 28
Task 9 .......................................................................................................................................................... 28
Reflective Overview ................................................................................................................................ 28
Candidate Name: LANG DANE
Qualification: B.Sc(Hons)BCIS(UCLAN)
ADVANCED DATABASE MANAGEMENT SYSTEMS
Module
I have read and understood both NCC Educations Academic Misconduct Policy and the Referencing and
Bibliographies document. To the best of my knowledge my work has been accurately referenced and all
sources cited correctly.
I confirm that this is my own work and that I have not colluded or plagiarised any part of
it.
Date: 5/11/2017
Introduction
I am Lang Dane, I am studying BIT Degree class at IBCT campus Mandalay. This Assignment
Title is Hyperion Boats. I am very interested in Computer Science. Databases is my favorite
subject. This subject is essential for IT Student. If a student wants to be an IT Professional, must
study and well know about databases, nowadays. My responsibility is to accomplish this
assignment to familiarize with databases.
Task 1
Entity-Relationship diagram
External_Contract
Workers or
external_contractor_V
Repair Type essel
Job_title_Ve
ssel
Vessel Customer
Job title
Entity : Customer
Description : Details of Customer
Identification Attribute : Customer_id (PK)
Other Attributes : Customer_name, Customer_address, Customer_Telephone,
Customer_email, Customer_postcode
Entity : Vessel_type
Description : Details of Vessel_type
Identification Attribute : Vessel_type_id (PK)
Other Attributes : Vessel_type_name
Entity : Vessel_Model
Description : Details of Vessel_Model
Identification Attribute : Vessel_Model_id (PK)
Other Attributes : Vessel_type_id(FK), Vessel_Model_name
Entity : Lying_at(Port)
Description : Details of Lying_at(Port)
Identification Attribute : Lying_at(Port)_id (PK)
Other Attributes : Lying_at(Port)_name
Entity : Workers
Description : Details of Workers
Identification Attribute : Workers _id (PK)
Other Attributes : Job_title_id(FK), Workers _name
Entity : Job_title
Description : Details of Job_title
Identification Attribute : Job_title _id (PK)
Other Attributes : Job_title_name
Entity : Repair_type
Description : Details of Repair_type
Identification Attribute : Repair_type _id (PK)
Other Attributes : Job_title_id(FK),Description
Entity : External_Contractor_Vessel
Description : Details of External_Contractor_Vessel
Identification Attribute :-
Other Attributes : External_Contractor_id(FK), Vessel_id(FK)
Entity : External_Contractor
Description : Details of External_Contractor
Identification Attribute : External_Contractor_ id (PK)
Other Attributes : External_Contractor_name
Entity : Job_title_vessel
Description : Details of Job_title_vessel
Identification Attribute :-
Other Attributes : Job_title_id(FK), Vessel_id(FK)
Relationship
Customer Vessel
Relationship ID: R1
Cardinality: one
Optionality: Mandatory
Cardinality: many
Optionality: Mandatory
Lying_at(port) Vessel
Relationship ID: R2
Cardinality: one
Optionality: Mandatory
Cardinality: many
Optionality: Mandatory
Vessel_Type Vessel
Relationship ID: R3
Cardinality: one
Optionality: Mandatory
Cardinality: many
Optionality: Mandatory
Vessel_Type Vessel_Model
Relationship ID: R4
Cardinality: one
Optionality: Mandatory
Cardinality: many
Optionality: Mandatory
Job_title Workers
Relationship ID: R5
Cardinality: one
Optionality: Mandatory
Cardinality: many
Optionality: Mandatory
Job_title Repair_Type
Relationship ID: R6
Cardinality: one
Optionality: Mandatory
Cardinality: many
Optionality: Mandatory
Job_title Job_title_Vessel
Relationship ID : R7
Relationship Name : Job_title and Job_title_Vessel relationship
Description : Each Job_title and Job_title_Vessel are depended one to many
relationship
Participating Entity : Job_title
Cardinality : One
Optionality : Mandatory
Paritcipating Entity : Job_title_Vessel
Cardinality : Many
Optinality : Mandatory
Vessel Job_title_Vessel
Relationship ID : R8
Relationship Name : Vessel and Job_title_Vessel relationship
Description : Each Vessel and Job_title_Vessel are depended one to many
relationship
Participating Entity : Vessel
Cardinality : One
Optionality : Mandatory
Paritcipating Entity : Job_title_Vessel
Cardinality : Many
Optinality : Mandatory
Vessel External_contractor_Vessel
Relationship ID : R9
Relationship Name : Vessel and External_Contractor_Vessel relationship
Description : Vessel and External_Contractor_Vessel are one to many
relationship
Participating Entity : Vessel
Cardinality : One
Optionality : Mandatory
Paritcipating Entity : External_Contractor_Vessel
Cardinality : Many
Optinality : Mandatory
External_Contractor External_contractor_Vessel
Relationship ID : R10
Relationship Name : External_Contractor and External_Contractor_Vessel relationship
Description : External_Contractor and External_Contractor_Vessel are one to
many
relationship
Participating Entity : External_Contractor
Cardinality : One
Optionality : Mandatory
Paritcipating Entity : External_Contractor_Vessel
Cardinality : Many
Optinality : Mandatory
Task3
3rd Normal Form
Customer
Customer_id (PK)
Customer _name
address
telephone_number
postCode
Vessel
Vessel_id (PK)
Vessel_type_id (FK)
Customer_id (FK)
Lying_at(Port)_id (FK)
Vessel_Name
length
colour
Job_title
Job_title_id(PK)
Job_title_name
Workers
Workers_id(PK)
Worker_name
Job_title_id(FK)
Repair_type
Repair_type_id(PK)
Job_title_id(FK)
Description
Job_title_Vessel
Job_title_id(FK)
Vessel_id(FK)
External_Contractor_Vessel
External_Contractor_id(FK)
Vessel_id(FK)
External_Contractor
External_Contractor_id(PK)
External_Contractor_name
referral for
Lying_at(Port)
Lying_at(Port)_id(PK)
Lying_at(Port)_name
Vessel_type
Vessel_type_id(PK)
Vessel_type_name
Vessel_Model
Vessel_Model_id(PK)
Vessel_Model_name
Task 4
Creating SQL Table
desc customer;
desc vessel;
desc vessel_type;
desc vessel_model;
desc workers;
desc repair_type;
desc external_contrator;
desc external_contrator_vessel;
desc job_title_vessel;
Task 6
a)select
customer.customer_id,customer.First_name,customer.Surname,vessel.vessel_id,vessel.vessel_name
from customer,vessel
where customer.customer_id=vessel.customer_id;
b) select job_title.job_title_id,job_title.job_title,repair_type.Description
from job_title,repair_type
job_title.job_title='chief mechanic';
c)
select customer.customer_id,customer.First_name,customer.Surname,vessel.vessel_id,job_title
from customer,vessel,job_title_vessel,job_title
job_title.job_title_id=job_title_vessel.job_title_id and
customer.First_name='Evan'and
customer.Surname='Zigomalas';
d) select vessel.vessel_id,vessel.vessel_name,lying_at
from vessel,lying_at
lying_at.lying_at='Weymouth';
e)
select vessel.vessel_id,vessel.vessel_name,name_of_contractor
from vessel,external_contrator_vessel,external_contrator
external_contrator.external_contrator_id=external_contrator_vessel.external_contrator_id and
external_contrator.name_of_contractor='star software';
f) select job_title.job_title_id,job_title.job_title,repair_type.repair_type_id,repair_type.description
from job_title,repair_type
repair_type.description='Hull repair';
g) select
customer.customer_id,customer.First_name,customer.Surname,customer.County,vessel.vessel_id,vesse
l.vessel_name
from customer,vessel
customer.county='kent';
from job_title,workers
job_title.job_title='fitter';
Task 7
Transactions
Transactions are events that occur on the database. Typically, a transaction reads a value from a
database or writes a value to a database. If you have any operating system concept, then we can say
that a transaction is similar to a process. Although the transaction can read and write the database, but
there are some fundamental differences between these two types of operations. The read operation
does not change the image of the database in any way. However, whether the write from the database,
update or delete the data to perform the write operation will change the database image. That is, we
can say that these transactions will be the database from the transaction before the existence of the
image (called Before Image or BFIM) to the transaction occurred after the existence of the image (called
After Image or AFIM).1
Concurrency control
When multiple transactions try to access the same shareable resources, if the access control is not
correct, there may be many problems. There are some important mechanisms that can maintain access
control. Earlier we discussed the concept of serializable theory, but we could implement this concept by
using locks and timestamps. Here, we will discuss some protocols in which locks and timestamps can be
used to provide an environment in which concurrent transactions can maintain their consistency and
isolate attributes.2
Recovery control
Logs are staggered when multiple transactions are executed in parallel. At recovery time, restoring the
system will be difficult to trace back all the logs and then resume. To alleviate this situation, most
modern DBMSs use the "checkpoint" concept.
Check point
Maintaining and maintaining logs in real-time and real-world environments may fill in all the
memory available in the system. As time goes by, the log file may grow too much to handle. A
checkpoint is a mechanism in which all previous logs are removed from the system and stored
permanently on the storage disk. The checkpoint declares a point where the DBMS is in a consistent
state and all transactions are committed.3
Task 9
Reflective Overview
I think this situation the integrity of information, detailed system requirements, requests
or the needs of users of the system point. In the Task 1, I draw ERD. In task 2 data dictionary
after the case and create a relational schema. And I carried out the standardization of data, so I
normalized these ERD to ensure that all are in normalizing status in task 3. In Task 4, I use the
Structure Query Language (SQL) to create tables and insert the test data into tables. And I make
1
http://www.eazynotes.com/pages/database-management-system/transaction-management.html
2
http://www.eazynotes.com/pages/database-management-system/concurrency-control.html
3
https://www.tutorialspoint.com/dbms/dbms_data_recovery.htm
a screen shoot for the SQL codes and output tables including data and print out them. In task- 6 I
show the data queries from my database. By the requirement of problem, I also make data
output and print out them. In Task -8 I show the transction management, concurrency control
and recovery. In task-9 I report my database.