Vous êtes sur la page 1sur 22

ACKNOWLEDGEMENT

Today, we have completed the design of our project, the database design and development, and
we worked on it with our efforts and presented it with beautiful ideas and worked on it in
cooperation with Professor Jaspal Singh, who helped us and encouraged us to work actively and
creativity in this project. So we offer you our project and we have gained useful skills and
information in the database
Table of Contents
TASK 1 ........................................................................................................................................................ 3
a) ERD .................................................................................................................................................. 3

b) NORMALIZATION ......................................................................................................................... 4

c) DATA DICTIONARY...................................................................................................................... 6

TASK 2 SQL QUERIES ............................................................................................................................ 7


TASK 3 COSTING INFORMATION ...................................................................................................... 16
TASK 4 DISTIBUTED DATABASE ...................................................................................................... 16
TASK 5 EVALUATION ........................................................................................................................... 19
REFERENCES ......................................................................................................................................... 21
List of figures:

Figure 1 ERD DIAGRAM............................................................................................................ 3


Figure 2Create table owner ........................................................................................................ 7
Figure 3Create table collection................................................................................................... 7
Figure 4 Create table expert....................................................................................................... 8
Figure 5Create table restorer ..................................................................................................... 8
Figure 6create table restoration ................................................................................................. 9
Figure 7create table objects ....................................................................................................... 9
Figure 8Create table resident expert .........................................................................................10
Figure 9Create table object provenance ...................................................................................10
Figure 10 results1 .....................................................................................................................11
Figure 11 results2 ....................................................................................................................11
Figure 12 results3 .....................................................................................................................11
Figure 13 results4 .....................................................................................................................12
Figure 14 results5 .....................................................................................................................12
Figure 15 results6 .....................................................................................................................12
Figure 16 results H ....................................................................................................................13
Figure 17 results I .....................................................................................................................13
Figure 18results j ......................................................................................................................13
Figure 19 results k ....................................................................................................................13
Figure 20 results L ....................................................................................................................14
Figure 21 results M ...................................................................................................................14
Figure 22 results M ...................................................................................................................14
Figure 23results N.....................................................................................................................15
Figure 24results N.....................................................................................................................15
TASK 1

a) ERD
The ERD diagram for POP collectables is represented using Chen’s database notation

Figure 1 ERD DIAGRAM


The entities of ERD are as under.

Owner

Collection

Expert

Restorer

Object Restoration

Objects

Object Provenance

The relationships between entities are based on case study and tables shown in case study. The
normalization of ERD is as under.

b) NORMALIZATION

The ERD is already normalized based on that the attributes are taken from case study data.
Primary Keys are shown as bold and underline and Foreign Keys relation is shown by joining
parent attribute with child attribute.
Owner

Owner FirstName Surname Address1 Address2 Postcodes Telephone


number

Collection
Collection no Owner number

Expert
Expertid Staff name Specialistinobject

Restorer
Restorerid Restorer Name

Object Restoration
Restoration id Refferalnumber Treatment Restorerid

Objects
Object id Object type Object Collection Owner Expertid restoration
description no number ID

Object Provenance
Provenance ID Provenance type Provenance detail object id
c) DATA DICTIONARY

Based on normalization identification of tables and their attributes the data dictionary explaining
data types and Constraint is as under

Table Name Attributes Data Type Constraint Explanation


Owner Owner number Varchar(30) Primary-Key Primary-Key in table
First name Varchar(30) NOT NULL Field cannot be empty
Surname Varchar(30) NOT NULL Field cannot be empty
Address1 Varchar(100) NOT NULL Field cannot be empty
Address2 Varchar(100) NOT NULL Field cannot be empty
Postcodes Varchar(30) NOT NULL Field cannot be empty
Telephone Varchar(30) NOT NULL Field cannot be empty

Collection Collection no Int Primary-Key Primary-Key in table


Owner number Varchar(30) Foreign-Key Foreign-Key in table

Expert Expertid Int Primary-Key


Staff name Varchar(30) NOT NULL Field cannot be empty
Specialistinobject Varchar(30) NOT NULL Field cannot be empty

Restorer Restorerid Int Primary Key Primary Key in table


Name Varchar(30) NOT NULL Field cannot be empty

Restoration restoration ID Int Primary-Key Primary-Key in table


Restorerid Int Foreign Key Foreign-Key in table
Treatment Varchar(30) NOT NULL Field cannot be empty
Refferalnumber Varchar(30) NOT NULL Field cannot be empty

Objects Object id Varchar(30) Primary-Key Primary Key in table


Object type Varchar(30) NOT NULL Field cannot be empty
Object description Varchar(100) NOT NULL Field cannot be empty
Collection no Int NOT NULL Field cannot be empty
Owner number Varchar(30) NOT NULL Field cannot be empty
Expertid Int Foreign-Key Foreign-Key in table
restoration ID Int Foreign-Key Foreign-Key in table

Object Provenance ID Int Primary-Key Primary-Key in table


Provenance
Provenance type Varchar(30) NOT NULL Field cannot be empty
Provenance detail Varchar(200) NOT NULL Field cannot be empty
Object id Varchar(30) Foreign Key Foreign Key in table
TASK 2 SQL QUERIES
a)

The create.sql script file is provided which has all tables created the screen shots of command is
as under oracle 10g Express Edition is used to create these statements and script file. The
insert.sql script file has all rows inserted in it.

Figure 2Create table owner

Figure 3Create table collection


Figure 4 Create table expert

Figure 5Create table restorer


Figure 6create table restoration

Figure 7create table objects


Figure 8Create table resident expert

Figure 9Create table object provenance

b)

Select a.collection no, a.objectid, an object description, an object type, b.provenancetype,


provenance detail, c.refferalnumber, c.restorationid from objects a, object provenance b,
restoration c where c.restorationid = a restoration ID AND a.objectid = b object id;
Figure 10 results1

C)

Select * from owner;

Figure 11 results2

D)

Select * from owner a, objects b where a.ownernumber=b.ownernumber AND a.firstname='Eric';

Figure 12 results3
E)

Select * from expert a, objects b where a.expertid=b.expertid;

Figure 13 results4

F)

Select firstname, surname from owner;

Figure 14 results5

G)

Select * from owner a, objects b where a.ownernumber=b.ownernumber AND a.firstname='Eric';

Figure 15 results6
H)

Select c.objectid, c.objectdescription from restorer a, restoration b, objects c where


a.restorerid=b.restorerid AND b.restorationid=c.restorationid AND a.name LIKE'%Amelia%';

Figure 16 results H

I)

SELECT count (*) as totalfilmsnumber from objects where objecttype='Film';

Figure 17 results I

J)

Select surname, address1, address2 from owner where address1 LIKE '%Kent%' OR address2
LIKE '%Kent%';

Figure 18results j

K)

Select * from expert a, objects b where a.expertid=b.expertid AND a.Specialsinobject LIKE


'%Autographs%';

Figure 19 results k

L)

Select a.ownernumber, a.objectid, a.objectdescription from objects a, objectprovenance b


where a.objectid=b.objectid AND b.provenancedetail='N/A' OR b.provenancedetail IS NULL;
Figure 20 results L

M)

UPDATE owner SET address1='17 Gordon Road, Nun head, London SE15 6RR' WHERE
ownernumber=0231;

Figure 21 results M

Select * from owner where ownernumber=0231;

Figure 22 results M
N)

Alter table collection ADD price estimation Number(10,4);

Figure 23results N

Describe collection

Figure 24results N
TASK 3 COSTING INFORMATION

To add costing information we can create a new table name costing which can have attributes
related to it and that table should have relationship with object table. This will enable database to
record costing information and each object will be recorded with its costing information.

TASK 4 DISTIBUTED DATABASE

The factors which POP collections can consider to update to distributed database include:

1. Making data centralized. With time the data will grow and POP collection may extend their
branches than they will want a data to be centralized for that they have to update there
database to distributed database.
2. They would want their data to be reliable and available 24/7 with ease of access for that
they will have to shift to distributed database.
3. And most importantly for the betterment of performance they will want to shift their existing
system to distributed database to retrieve quick result.
4. Distributed database systems helps to access the data from the local as well as the remote
location databases.
5. Various applications can access data with ease not only from the remote database but
also from the local database, a feature made possible by the distributed database. It is
important to note that the difference between a homogenous and a heterogeneous
distributed database system is the fact whereas a heterogeneous distributed database at
least a single database is not an Oracle database, the case is different for the homogenous
database since each of the databases is an Oracle database. Client or server structures
are in use in distributed databases since they aid to process various information requests.

A Homogenous Distributed Database System

Ideally, a homogenously distributed database system is composed of two or more Oracle


Databases that are designed to reside in one or more machines. A comprehensive illustration
showing the connection of various databases that include hg, mfg. and sales can be seen in
Figure 29-1. The connection enhances the ability of an application on a single distributed
environment to access or modify data from various databases simultaneously. For instance,
a from the manufacturing client specifically on the mfg local database can retrieve data jointly
from products table on a local database and the depth table on a hg database that is remote.

On the other hand, platforms and locations of databases are made transparent in the case of
a client application. Synonyms for remote objects in the distributed system can easily be
created to enable users to access them with similar syntax as local objects. For instance, a
synonym on mfg for the remote dept table can be created to access data on the hg database
even when one is connected to the mfg database. The distinct meanings between distributed
database and distributed processing terminologies are:

A Distributed Database

In this system, it is possible to have several sets of database appearing in the system for
applications as a single source of data. When the heterogeneous distributed database system
is in play, at least one of the databases has to be a non-Oracle database system. A
heterogeneous distributed database system appears as a single local Oracle database for an
application. The Local Oracle database server plays the role of hiding the data’s distribution
and heterogeneity.

The Oracle heterogeneous services can be jointly used with a proxy by the Oracle database
server to enable access to a non-Oracle database system. In the situation that the access of
a non-Oracle database data store has been achieved through the Oracle Transparent
Gateway, the proxy is considered to be a system-specific application. For instance, a
transparent Portal for Sybase is required when a Sybase database in an Oracle Database
distribution system is included in order to allow connection to an Oracle database.

A database link is a term that describes a pointer that is used to specify a one-way
communication path between a particular database server and an Oracle database server.
Normally, a link pointer is defined in the data dictionary table as an entry. Connection to the
local database contains data dictionary entry is required to access the link.

A. one-way path exists in the connection to the database link and therefore only users
connected to local database A can use a link stored in database A to retrieve information from
a remote database B. For this reason, users connected to database B are limited from using
the same link to access the database’s data. The only possibility for users on database B to
access data on database A is through having a cookie stored in the data dictionary in database
B.

Data from a remote database can be accessed by users through database connections. The
connection is achieved when every database in the distributed system bears a unique global
database name in the network domain. The global database names serve as unique identities
for database servers in any distributed systems.
TASK 5 EVALUATION

The table below evaluates the performance


Requirements Done Successfully May be not up to mark
Creating conceptual This is done successfully as
schema all tables are created based
on case study and they are
required for POP collection
scenario.
Normalization This is done successfully as
based on ERD
normalization is done
Primary and Foreign Keys
are defined
Data Dictionary This is done successfully
Based on data provided in
case study exact datatypes
and constraints are mapped
in data dictionary
Create table script This is achieved
successfully all statements
are executing
Insert rows script This is achieved
successfully all statements
are executing
Task 2 All Queries Almost most of queries are
Execution executing perfectly based
on POP collections task 2
requirement.
Task 3 costing I have followed questions
instructions but I feel that
there may be some points
skipped
Task 4 Distributed database I have followed questions
instructions but I feel that
there may be some points
skipped

The company data is standardizing as I have done proper Normalization of it the data is
splitted in multiple tables and Primary and Foreign Keys relations is established
REFERENCES

CODEXPRESSIONS. (2018, February 20). ERD CONCEPTS. Retrieved February 5, 2019, from POLDERIJT
ICT: https://www.erdconcepts.com/

techopedia. (2019, January 20). Distributed Database Management System (DDBMS). Retrieved
February 5, 2019, from TECHOPEDIA:
https://www.techopedia.com/definition/14686/distributed-database-management-system-
ddbms

Vous aimerez peut-être aussi