Vous êtes sur la page 1sur 26

Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.

com)

Contents
Part 1, i .................................................................................................................................................... 2
Scenario .................................................................................................................................................. 2
Create a E-R diagram following these steps ........................................................................................... 3
Part 1. ii ................................................................................................................................................... 5
Entity Types ............................................................................................................................................ 5
Main relationship to obtain a license ...................................................................................................... 5
Attributes ................................................................................................................................................ 5
Constraints: ............................................................................................................................................. 6
Degree of a Relationship (cardinality) .................................................................................................... 6
Keys ........................................................................................................................................................ 6
Entity integrity ........................................................................................................................................ 6
Referential integrity ................................................................................................................................ 7
It is referred to as foreign key in an entity suffixed “FK” ...................................................................... 7
Part 1, iii .................................................................................................................................................. 8
Normalisation.......................................................................................................................................... 8
First normal form (1NF) .......................................................................................................................... 9
Second normal form (2NF)...................................................................................................................... 9
Third normal form (3NF) ......................................................................................................................... 9
Part 2A................................................................................................................................................... 10
PART 2A. i .............................................................................................................................................. 10
Entity Relational Diagram (ERD) ......................................................................................................... 10
Structured Query Language (SQL) ....................................................................................................... 11
PART-2A .ii ............................................................................................................................................. 14
PART-2A (iii) .......................................................................................................................................... 15
PART-2A .iv ............................................................................................................................................ 15
Part 2B................................................................................................................................................... 15
PART-2B................................................................................................................................................. 16
PART-2B (i) ............................................................................................................................................ 21
PART 2B. i .............................................................................................................................................. 21
PART 2B. iii ............................................................................................................................................ 22
PART 2B.iv ............................................................................................................................................. 22
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

PART 2B.v .............................................................................................................................................. 22


PART 2B .vii ........................................................................................................................................... 23
PART2B.VIII ........................................................................................................................................... 23
Part 2C Management of DBM .............................................................................................................. 24
Reference .............................................................................................................................................. 25

Part 1, i

Scenario
Each office has a Manager [who tends to also be a Senior Instructor], several Senior
Instructors, Instructors, and administrative staff. The Manager is responsible for
the day-to-day running of the office. Clients must first register at an office and this
requires that they complete an application form, which records their personal
details. Before the first lesson, a client is requested to attend an interview with an
Instructor to assess the needs of the client and to ensure that the client holds a
valid provisional driving license. A client is free to ask for a particular Instructor or
to request that an Instructor to be changed at any stage throughout the process of
learning to drive. After the interview, the first lesson is booked. A client may
request individual lessons or book a block of lessons for a reduced fee. An
individual lesson is for one hour, which begins and ends at the office. A lesson is
with a particular Instructor in a particular car at a given time. Lessons can start
as early as 8am and as late as 6:30pm. After each lesson, the Instructor records the
progress made by the client and notes the mileage used during the lesson. The
School has a pool of cars, which are adapted for the purposes of teaching. Each
Instructor is allocated to a particular car. As well as teaching, the Instructors are
free to use the cars for personal use. The cars are inspected at regular intervals for
faults. Once ready, a client applies for a driving test date. To obtain a full driving
license the client must pass both the practical and theoretical parts of the test. It is
the responsibility of the Instructor to ensure that the client is best prepared for all
parts of the test. The Instructor is not responsible for testing the client and is not in
the car during the test but should be available to drop off and pick up the client
before and after the test at the DVLA Testing Centre. If a client fails to pass, the
Instructor must record the reasons for the failure.
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Create a E-R diagram following these steps


1. Find out the entities.

2. Find out the relationships among the entities.

3. Figure out attributes of the entities and (if any) of the relationships.

4. Figure out constraints between entities and relationships.


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Employee
School emp_id
school_id emp_fname
emp_lname
school_address emp_dob
school_loc emp_adress
emp_sex
emp_salary
emp_grade
school_id (FK)

Car
Addmin_Staff Teaching_Staff car_number Maintenance

emp_id (FK) emp_id (FK) car_model main_id


car_mileage main_date
car_details main_time
car-model faultFound
emp_id (FK) remarks
school_id (FK) car_number (FK)
Instructor Senior_Inst
Registration
emp_id (FK) emp_id (FK)
Interview inst_StartDate snr_inst_startDate
interview_id school_id (FK) bonus
emp_id (FK)
interview_date
interview_time
driver_id (FK)
Lesson
emp_id (FK) Progress_report
lessom_code
driver_id
Driver_client lesson_name
lesson_time lesson_code
driver_id lesson_duration emp_id
lesson_fee lessom_code (FK)
driver_fname
driver_lname emp_id (FK)
driver_dob driver_id (FK)
driver_email
driver_address
driver_contact

Driving_test
Branch_DVLA test_code
Branch_id test_description
Branch_name test_place
Branch_contact test_time
Branch_address test_date
Branch_Loc test_centre
test_code (FK) test_duration
driver_id (FK) test_result
driver_id (FK)

License
license_id
license_type
license_issue_date
license_expiry_date
Branch_id (FK)
test_code (FK)

Driver's_License Learner's_License
license_id (FK) license_id (FK)
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Part 1. ii

Entity Types

An entity type is any type of object that we wish to store data about. Which entity types you
decide to include on your diagram depends on your application. In an accounting application
for a business you would store data about customers, suppliers, products, invoices and
payments and if the business manufactured the products, you would need to store data about
materials and production steps. Each of these would be classified as an entity type because
you would want to store data about each one. In an entity-relationship diagram an entity type
is shown as a box. Some entities in fig1.1 are as follows:

a. Driver (strong Entity)

b. License (strong Entity)

c. Branch (strong Entity)

d. Learner’s License (strong Entity)

e. Driver’s License (strong Entity)

f. Employee (strong Entity)

g. Lesson (strong Entity)

h. Interview (strong Entity)

i. Driving test (strong Entity)

j. School (strong Entity)

Main relationship to obtain a license


k. DriverOwn License

l. DriverTake ExamBranch

m. Branchissues License

Attributes
The data that we want to keep about each entity within an entity type is

contained in attributes. An attribute is some quality about the entities that we are

interested in and want to hold on the database. In fact we store the value of the
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

attributes on the database. Each entity within the entity type will have the same

set of attributes, but in general different attribute values. They are declared in fig 1.1

in the box of each entity

Constraints:
n. Each [driver] should <own>at least one [license].

o. [Branch] should <issues>only one license to the [driver].

p. [Driver] should<take> at-least one [exam].

Degree of a Relationship (cardinality)


q. 1:1  (Driver, License) , (License, Branch).

r. 1: M (Driver, Exam).

Keys
It declare the Entity integrity and Referential integrity rule

Entity integrity
It is a Primary Key which is uniquely identify in an entity eg: Driver ID, Branch ID, License ID,

car_number, emp_id, client_id, interview_id, etc.

In the above model it is suffixed as “PK”. Entity Integrity certifies that there are no identical

records in a relation and that the field that finds each record within the table is not null.
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Referential integrity

It is referred to as foreign key in an entity suffixed “FK”


Referential integrity is also FK directing to a record from different relation, the record is not in

existence. When an FK directs to a record that doesn't occur, referential integrity is destroyed.

Referential integrity by adding foreign keys constraints to data model in fig1.1

ALTER TABLE Addministrative

ADD FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE CASCADE

ON UPDATE CASCADE;

ALTER TABLE Department

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE Driver_client

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Teaching(emp_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE Employee

ADD CONSTRAINT FOREIGN KEY (interview_id) REFERENCES Interview(interview_id)

ON DELETE NO ACTION ON UPDATE NO ACTION;

ALTER TABLE Interview

ADD CONSTRAINT FOREIGN KEY (driver_id) REFERENCES Driver_client(driver_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE School


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE School

ADD CONSTRAINT FOREIGN KEY (department_id) REFERENCES Department(department_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE Teaching

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE CASCADE

ON UPDATE CASCADE;

show tables;

show databases;

Part 1, iii

Normalisation
Normalization is the process by which a given set of relations are transformed to a new set of
relations with a more solid structure.
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

First normal form (1NF)


When we transform entities or relationships into tabular relations, there may be some relations
which there are more values in the intersection of a row or column (Behrouz and Firouz 2007).

Order
Car
orderNumber
carSerialNumber
orderDate
customerName carColourNames
orderCreationMethodName carMakeModelYearNote
verifyingEmployeeName

Second normal form (2NF)


In each relation we need to have a key (called a primary key) on which all other attributes (column
values) need to depend. For example, if the ID of a student is given, it should be possible to find the
student’s name (Behrouz and Firouz 2007).

Orders
orderNumber Customer
Car
orderDate customerNumber
carSerialNumber
customerName customerName
orderCreationMethodName carColourNames
verifyingEmployeeName carMakeModelYearNote

Third normal form (3NF)


A relation that is in first and second normal form in which no non-candidate-key attribute is
transitively dependent on any candidate key (Thomas and Connolly 2010).

Car
carSerialNumber
carColourNames
Order_car
carMakeModelYearNote
orderNumber (FK) customerNumber (FK)
orderDate
orderCreationMethodName
verifyingEmployeeName
carSerialNumber (FK)

Orders
Customer_oders
orderNumber
customerNumber
orderDate
customerName customerName
orderCreationMethodName orderNumber (FK)
verifyingEmployeeName
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Part 2A

PART 2A. i
Entity Relational Diagram (ERD) Part 1 into relational database tables

Introduction

In this part a Structured Query Language (SQL) data definition language, write a query to
transform any six (6) entities in ERD in part 1 into relational database tables.

Entity Relational Diagram (ERD)


The diagram in fig1.2 show how the ERD is transformed.

School
Employee
school_id
emp_id
school_address
school_loc emp_fname
emp_id (FK) emp_lname
department_id (FK) emp_dob
emp_adress
emp_sex
emp_salary
Interview emp_grade
interview_id (FK)
Department interview_id
department_id interview_date
interview_time
department_name
driver_id (FK)
department_contact
emp_id
emp_id (FK)
Addministrative
Teaching
emp_id (FK)
emp_id (FK)
Driver_client
driver_id
driver_fname
driver_lname
driver_dob
driver_email
driver_address
driver_contact
emp_id (FK)
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Fig 1.3: ERD-diagram

Structured Query Language (SQL)


This section use the SQL to transform fig 1.3 into relational tables

Creating the tables in the schema including the primary key

CREATE SCHEMA QTM_2;

use QTM_2;

CREATE TABLE Addministrative

( emp_id char(18) NOT NULL ,

PRIMARY KEY (emp_id)

);

CREATE TABLE Department

( department_id char(18) NOT NULL ,

department_name char(18) NOT NULL ,

department_contact char(18) NOT NULL ,

emp_id char(18) NOT NULL ,

PRIMARY KEY (department_id)

);

CREATE TABLE Driver_client

( driver_fname char(18) NOT NULL ,

driver_lname char(18) NOT NULL ,

driver_dob char(18) NOT NULL ,

driver_email char(18) NOT NULL ,


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

driver_address char(18) NOT NULL ,

driver_contact integer NOT NULL ,

driver_id char(18) NOT NULL ,

emp_id char(18) NOT NULL ,

PRIMARY KEY (driver_id) );

CREATE TABLE Employee

( emp_id char(18) NOT NULL ,

emp_fname char(18) NOT NULL ,

emp_lname char(18) NOT NULL ,

emp_dob datetime ,

emp_adress char(18) NOT NULL ,

emp_sex char(5) NOT NULL ,

emp_salary integer NOT NULL ,

emp_grade char(18) NOT NULL ,

interview_id char(18) NULL ,

PRIMARY KEY (emp_id)

);

CREATE TABLE Interview

interview_id char(18) NULL ,

interview_date datetime NOT NULL ,

interview_time datetime NOT NULL ,

driver_id char(18) NOT NULL ,

emp_id char(18) NOT NULL ,

PRIMARY KEY (interview_id)

);

CREATE TABLE School


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

( school_id char(18) NOT NULL ,

school_address char(18) NOT NULL ,

school_loc char(18) NOT NULL ,

emp_id char(18) NOT NULL ,

department_id char(18) NULL , PRIMARY KEY (school_id) );

CREATE TABLE Teaching

( emp_id char(18) NULL ,

PRIMARY KEY (emp_id ASC)

);

/* Adding foreign keys constraints to the tables */

ALTER TABLE Addministrative

ADD FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE CASCADE

ON UPDATE CASCADE;

ALTER TABLE Department

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE Driver_client

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Teaching(emp_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE Employee


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

ADD CONSTRAINT FOREIGN KEY (interview_id) REFERENCES Interview(interview_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE Interview

ADD CONSTRAINT FOREIGN KEY (driver_id) REFERENCES Driver_client(driver_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE School

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE School

ADD CONSTRAINT FOREIGN KEY (department_id) REFERENCES Department( department_id)

ON DELETE NO ACTION

ON UPDATE NO ACTION;

ALTER TABLE Teaching

ADD CONSTRAINT FOREIGN KEY (emp_id) REFERENCES Employee(emp_id)

ON DELETE CASCADE

ON UPDATE CASCADE;

PART-2A .ii
Creating a view that lists students with their corresponding department names.

create view driver_dept AS

SELECT driver_client.*, department_name FROM driver_client, department

WHERE driver_id = department_id;


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

show create view driver_dept;

PART-2A (iii)
Creating a course table and add a timestamp to ensure easy record keeping of changes to
courses in the department
ALTER TABLE driver_client

ADD driver_job char(20) not null;

PART-2A .iv
Add a constraint to employee’s salary to ensure it is always positive

ALTER table employee

ADD employee_salary double (10,2) check (employee_salary >0);

Part 2B
Implement a database application for QTM using SQL RDBMS
In the relational database management system (RDBMS), the data is represented as a set of
relations.
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Department
Department_Location
dept_id
loc_id
dept_fname
Office dept_id (FK)
dept_lname
dept_loc
client_id (FK) office_id
office_name Maintenance_inspection
staff_id (FK) main_id (FK)

Client inspec_date
inspec_remarks
client_id
client_fname Driving_test
client_lname
client_age test_code Test_Results
client_loc
test_type test_code (FK)
test_date
test_result Staff_Client
test_time
Staff test_remarks
test_loc staff_id (FK)
staff_id client_id (FK)
client_id
staff_fname
staff_lname
salary

Vehicle__Registration
maintenance
car_regisnumber (FK)
main_id
year
main_type Vehicle
fault_recorddate car_regisnumber
staff_id (FK)
Staff_grade
model
make staff_id (FK)
dept_id (FK)
staff_grade

Fig2.1: Entity relational diagram for RDBMS

PART-2B
RDBMS MYSQL script for fig2.1

Creating an RDBMS with MSQL

*Declaring schema*

create schema RDBMS_2;

use RDBMS_2;

CREATE TABLE Client

( client_id CHAR(18) NOT NULL,

client_fname CHAR(18) NULL,


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

client_lname CHAR(18) NULL,

client_age CHAR(18) NULL,

client_loc CHAR(18) NULL,

PRIMARY KEY (client_id)

);

CREATE TABLE Department

( dept_id CHAR(18) NOT NULL,

dept_fname CHAR(18) NULL,

dept_lname CHAR(18) NULL,

client_id CHAR(18) NULL,

PRIMARY KEY (dept_id)

);

CREATE TABLE Department_Location

( loc_id CHAR(18) NOT NULL,

dept_id CHAR(18) NOT NULL,

dept_loc CHAR(18) NULL,

PRIMARY KEY (loc_id)

);

CREATE TABLE Driving_test

( test_code CHAR(18) NOT NULL,

test_type CHAR(18) NULL,

test_date CHAR(18) NULL,

test_time CHAR(18) NULL,

test_loc CHAR(18) NULL,

client_id CHAR(18) NULL,

PRIMARY KEY (test_code)


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

);

CREATE TABLE maintenance

( main_id CHAR(18) NOT NULL,

main_type CHAR(18) NULL,

fault_recorddate CHAR(18) NULL,

staff_id CHAR(18) NULL,

PRIMARY KEY (main_id)

);

CREATE TABLE Maintenance_inspection

( main_id CHAR(18) NOT NULL,

inspec_date CHAR(18) NULL,

inspec_remarks CHAR(18) NULL,

PRIMARY KEY (main_id)

);

CREATE TABLE Office

office_id CHAR(18) NOT NULL,

office_name CHAR(18) NULL,

staff_id CHAR(18) NULL, PRIMARY KEY (office_id) );

CREATE TABLE Staff

( staff_id CHAR(18) NOT NULL,

staff_fname CHAR(18) NULL,

staff_lname CHAR(18) NULL,

salary CHAR(18) NULL,

PRIMARY KEY (staff_id)

);

CREATE TABLE Staff_Client


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

( staff_id CHAR(18) NOT NULL,

client_id CHAR(18) NULL,

PRIMARY KEY (staff_id)

);

CREATE TABLE Staff_grade

( staff_id CHAR(18) NOT NULL,

staff_grade CHAR(18) NULL,

PRIMARY KEY (staff_id)

);

CREATE TABLE Test_Results

( test_code CHAR(18) NOT NULL,

test_result CHAR(18) NULL,

test_remarks CHAR(18) NULL,

PRIMARY KEY (test_code)

);

CREATE TABLE Vehicle

( car_regisnumber CHAR(18) NOT NULL,

model CHAR(18) NULL,

make CHAR(18) NULL,

dept_id CHAR(18) NULL,

PRIMARY KEY (car_regisnumber)

);

CREATE TABLE Vehicle__Registration


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

( car_regisnumber CHAR(18) NOT NULL,

year CHAR(18) NULL,

PRIMARY KEY (car_regisnumber)

);

/*Adding constraints*/

ALTER TABLE Department

ADD FOREIGN KEY (client_id) REFERENCES Client (client_id);

ALTER TABLE Department_Location

ADD FOREIGN KEY (dept_id) REFERENCES Department (dept_id);

ALTER TABLE Driving_test

ADD FOREIGN KEY (client_id) REFERENCES Client (client_id);

ALTER TABLE maintenance

ADD FOREIGN KEY (staff_id) REFERENCES Staff (staff_id);

ALTER TABLE Maintenance_inspection

ADD FOREIGN KEY (main_id) REFERENCES maintenance (main_id);

ALTER TABLE Office

ADD FOREIGN KEY (staff_id) REFERENCES Staff (staff_id);

ALTER TABLE Staff_Client

ADD FOREIGN KEY (staff_id) REFERENCES Staff (staff_id);


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

ALTER TABLE Staff_grade

ADD FOREIGN KEY (staff_id) REFERENCES Staff (staff_id);

ALTER TABLE Test_Results

ADD FOREIGN KEY (test_code) REFERENCES Driving_test (test_code);

ALTER TABLE Vehicle

ADD FOREIGN KEY (dept_id) REFERENCES Department (dept_id);

ALTER TABLE Vehicle__Registration

ADD FOREIGN KEY (car_regisnumber) REFERENCES Vehicle (car_regisnumber);

PART-2B (i)
Create a Cartesian product by using two tables.

SELECT client_fname, client_lname, dept_fname, dept_lname

from Client, Department;

PART 2B. i
How many staff is hired currently and what is their average salary. What is the smallest
and biggest monthly salary? How much must be paid each month for the salaries?

/*AVERAGE SALARY FROM STAFF*/

select staff_id, staff_fname, staff_lname, avg (salary) from staff;


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

/*SMAALEST AND BIGGEST MONTHLY SALARY FROM STAFF*/

select max(salary) from staff

where salary = 'monthly';

select min(salary) from staff

where salary = 'monthly';

PART 2B. iii


List staff with the vehicles they inspect or vehicles they manage under their offices.

/* STAFF AND INSPECTION OF VEHICLE*/

select staff_fname, staff_lname, inspec_remarks, inspec_date

from staff, maintenance_inspection

PART 2B.iv
List all clients that took driving test in Accra centre but came from Tema

/* all client who took test in Accra but came from Tema*/

select client_fname, client_lname,client_age, client_loc,

test_code, test_loc from client, driving_test

where test_loc <> 'Tema';

PART 2B.v
Generate a table that lists all vehicles that has been assigned to a lesson and all clients
who have enrolled for that lesson.
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

/* IF ALL OF ALL VEHICLES ARE ASSIGNED FOR LESSON

AND ALL CLIENTS HAVE ENROLLED ON THAT LESSON. IMPLIES ALL VEHICLES = ALL CLIENTS

SINCE A CLINT IN QTM IS ASSGINED TO AN INSTRUCTOR AND A VEHICLE*/

select client_fname, client_lname,

car_regisnumber from client, vehicle

PART 2B. vi

Create a readable view that contains all data.

/* READABLE VIEW CONTAINING ALL DATA*/

SHOW TABLES;

PART 2B .vii
Select the first 10 Toyota Avensis vehicles for inspection.

select car_regisnumber, model, make, inspec_remarks from

vehicle, maintenance_inspection where

model = 'ToyotaAvensis' and inspec_remarks <= 10;

PART2B.VIII
Select all clients who have their first name as the first name of the staff who interviewed
them.

/* GET ALL CLIENTS WHOSE FNAME IS SAME AS ALL


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

FNAME OF THE STAFF WHO INTERVIEWED THEM*/

select client_fname,client_lname, client_age, staff_fname staff_lname from client, staff

where Client_fname = staff_fname;

Part 2C Management of DBM


i. End-user support

Is the external user needs dynamic results from of one or more relational operations

operating on the base relations to produce personal records, this is virtual does not exist

in the main database but obtain upon query by end user. This has to be managed well to

avoid intrusion or deletion of important data from the database. Hence there should be

certain restriction to control end user from breaking into privacy.

ii. Data security, privacy and integrity

In recent times there has being great Increase in the level of attacks from both inside and

outside organisations. More sophisticated password breakers and database rootkits available.

Hence Data is a valuable resource that must be strictly controlled and managed, as with any

corporate resource. Most part of the company data may have strategic importance and

therefore needs to be kept secure and private. Measures have to be put in place that must

protect the database against intentional or internal threats. Security considerations do not only

relate to the data held in a database but breaches of security may affect other parts of the

system, which may in turn affect the database.

This involves measures to avoid theft and fraud, Loss of confidentiality (secrecy) and Loss

of privacy.
Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

For a better management practice one has to look at the following to cater for effective

security:

Journaling: Process of keeping and maintaining a log file (or journal) of all changes made to

database to enable effective recovery in event of failure.

Integrity: Prevents data from becoming invalid, and hence giving misleading or incorrect

results.

Encryption: The encoding of the data by a special algorithm that renders the data unreadable

by any program without the decryption key.

iii. Data backup and recovery

It is a process of occasionally taking a duplicate of the database and log file to offline storage

media to serve as a means to keep data from being lost in terms of any eventualities.

Approaches used in backups include; eencryption data in the backup, password protect access

to the backup, test and validate the backups to ensure integrity, store in safe place away from

database and perform trial recoveries.

Reference
"database, n". OED Online. Oxford University Press. June 2013. [Assessed on June 12, 2014]

Beynon-Davies, P. (2004) Database Systems 3rd Edition. Palgrave Basingstoke, UK.


Mamudu.eee@k.poly, 2014_07 (drsennet@gmail.com)

Childs, D. L., (1968) Description of a set-theoretic data structure, Technical Report 3 of the

CONCOMP (Research in Conversational Use of Computers) Project, University of Michigan,

Ann Arbor, Michigan, USA

Jeffrey, U (1997) First course in database systems Prentice–Hall Inc.

Kahn, D.L. etal (1977)MICRO Information Management System (Version 5.0) Reference

Manual., Institute of Labor and Industrial Relations (ILIR), University of Michigan and

Wayne State University

Raul et al (3 July 2008) Introduction to DB2. IBM Book Press USA

Thomas and Begg, C (2010) Database Systems a practical approach to design,

implementation and management. Pearson U.S.A

Tsitchizris, D. C and Lochovsky F. H (1982) Data Models. Englewood-Cliffs. Prentice–Hall.

Wagner, M (2010) SQL/XML:2006 – Evaluierung der Standardkonformität ausgewählter

Datenbanksysteme, Diplomica Verlag,

Vous aimerez peut-être aussi