Database - NCC - June2009 - Assingment - Iadcs

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 31

International Advances Diploma in Computer Studies Database Design & Development

Introduction
A have prepare this assignment to demonstrate an understanding of applying data modeling
and analysis techniques to the design and development of database solutions.
I am as a sub-contracted to design the database system supporting the Academic Human
Resources (AHR) department for the “We Are The Best - WATB” college. The college has 5
departments:
 Computer Science,
 Arts,
 Business,
 Physics and
 Mathematics.
Each department has a maximum of one Head of Department and a maximum of two Associate
Heads of Department. An academic cannot occupy the roles of Head of Department and
Associate Head of Department at the same time.
The initial analysis of the WATB College’s AHR Department has shown the following:
WATB AHR department (we are) is responsible only for academic posts. Only academics that
hold senior posts can occupy the roles of Head of Department and Associate Head of
Department. Senior posts are: Principal Lecturer, Reader, and Professor. The rest of the roles
can be occupied by any academic irrespective of the post they hold. Academics might hold the
same role more than one time.
I am “The “WATB College’s” -AHR department” will keep information for every academic who
has ever been employed:
Personal information: full name, age, address, nationality, qualifications,
Work related information: current post name and grade, starting date, previous posts, dates
of every post held, and current salary.
The rules of the my (“WATB College’s” -AHR) department state that an academic might hold
only one post per time but they might occupy more than one role;
The Posts that can be fulfilled by an academic are: Lecturer, Senior Lecturer, Principal
Lecturer, Reader, and Professor.
The Roles that can be fulfilled by an academic are: Research Leader, Program Director,
Course Leader, Head of Department, Associate Head of Department, Quality Leader, Learning
and Teaching Leader, Recruitment Officer, and Examinations Officer.

My (AHR) department holds information on who occupies these roles in each department of the
college.

Candidate Name: NCC Candidate ID: Examination Cycle: Page 1 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Aim: Draw an Entity Relationship Data Model which describes the content and structure of the
data held by the Academic Human Resources Department.

Candidate Name: NCC Candidate ID: Examination Cycle: Page 2 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Entity relationship Model: a data model originally proposed by P.P.S. Chen. Which utilities
three primary constructs: entity, relationship and attributes.
There are three primary constructs in ER models:
• Entities are the "things" about which we seek information.
• Attributes are the data we collect about the entities.
• Relationships provide the structure needed to draw information from multiple entities.

Academic Job

Role Role history

Figure: entity relationship diagram for the “WATB College’s”.

Academic Job

Primary key: Job code


Primary key: Academic ID
Foreign key: Academic ID

Role Role history

Primary key: Role ID Foreign key: Role ID


Foreign key: job code

Figure: entity relationship diagram showing primary key and foreign key

Candidate Name: NCC Candidate ID: Examination Cycle: Page 3 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

The diagrams in this figure specify the different set of data requirements, namely...
 An academic contains a number of job.

 The relation ship Between the academic and job entity there is an 1:M

 A work contains a number of job histories.

 The relation ship Between the job and role history entity there is an 1:M

 A role contains a number of Roles histories.

 The relation ship Between the role and Role history entity there is an 1:M

The attributes of above described entity:

Academic job
Attribute

Attribute
Academic ID: Job code:
DOB: Current post name:
Address: Post Grade :
Nationality: Previous post:
Qualification: Post starting date
Awarding body: Ending of contact:
Awarding date Job duration:
Current Salary:

Role history Role


Attribute

Attribute

Previous role: Role ID:


Role starting date: Role name:
Role ending date:
Extra payment for Role

Candidate Name: NCC Candidate ID: Examination Cycle: Page 4 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Aim: Produce the resulting tables clearly indicating the primary and foreign keys.

Primary key: a key or identifier is an attribute which uniquely identifies a single row within the
relation. This key often called the primary key. The key should be always be the minimum set of
attributes required to identified uniquely a row of the relation.
Candidate Name: NCC Candidate ID: Examination Cycle: Page 5 of 31
Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Foreign key: An attribute which is the primary key of one relation but appears as an attributes
in another relation is called a foreign key.
Foreign key is identified by *

Academic job
Job code
Academic ID
Academic ID*
Academic name
Current post name
DOB
Post Grade
Address
Starting date
Nationality
Previous post
Qualification
Ending of contact
Awarding body
Job duration
Awarding date
Post Salary
Department Name
Role history
Role ID*
Job Code*
Role name Resulting Role
Previous role table of Role Code
Role starting date my Role Name
Role ending date created
Extra payment for Role data base:

Academic table:

Academic
Academic BOB Academic Nationality Address Qualification
Awarding Awarding
ID name body date
101 03-03- Rahman Riaz Bangladeshi SYLHET M.Sc in LondonMet 06-06-1987
1960 Mathematics
102 02-01- Mustafa ali Bangladeshi SYLHET M.Sc in IT DHAKA uni 02-02-2002
1975
103 04-02- abidal Bangladeshi SYLHET M.Sc in SUST 07-06-1982
1955 Mathematics
104 03-01- mahmuda Bangladeshi DHAKA M.Sc in DHAKA uni 06-06-2007
Candidate Name: NCC Candidate ID: Examination Cycle: Page 6 of 31
Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

1975 Mathematics
105 08-07- sadik Bangladeshi SYLHET M.Sc in DHAKA uni '06-06-2007'
19801 Mathematics

Job table:
Job
Academ Job Current Post Previo Post starting Job Current Ending of Department
ic ID*
code post name grade us post date duration salary contact
101 1 lecturer A 10-08-1988 1000 12-03-2010 mathematics

102 2 lecturer A 12-02-2003 1000 12-01-2015 mathematics

103 3 lecturer A 02-01-1984 10000 13-01-2009 mathematics

104 4 lecturer A 13-08-2005 1000 12-01-2015 mathematics

105 5 lecturer A 10-08-2008 1000 10-01-2017 mathematics

Role History table:

Role History
Job code* Role id* Previous role Role starting date Role ending date Extra payment for role

15 1 Associate Head 01-Jun-2000 12-jan-2004 5000


of department
16 4 course leader 12-jan-2009 12-jan-2009 5000
20 1 Associate Head 01-Jun-2007 12-june-2009 5000
of department
20 3 Research 12-june-2010 12-june-2010 5000
leader
22 1 Associate Head 01-Jun-2000 12-jan-2010 5000
of department
Candidate Name: NCC Candidate ID: Examination Cycle: Page 7 of 31
Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Role table:

Role
Role ID* Role name
1 Head of department
2 Associate Head of department
3 Quality leader
4 Research leader
5 Program Director

Candidate Name: NCC Candidate ID: Examination Cycle: Page 8 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Aim: Normalize these tables to ensure that are all pa BCNF (3NF)

Normalization:
Normalization is the process of identifying the logical association between data-items and
designed a database which will represent such associations but without suffering from file
maintenance anomalies.
Stages of normalization.
Normalization carried out in the flowing stapes:
 Collect the data – the set of data items.
 Transform the un-normalized data set into tables in first normal form.
 Transform first normal form tables to second normal form.
 Transform second normal form table to third normal form..

Candidate Name: NCC Candidate ID: Examination Cycle: Page 9 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Un-Normalized data set:


UNF (Un-Normalized Form)
Academic name
Academic ID
DOB
Address
Nationality
Qualification
Awarding body
Awarding date
Post ID
Current post name
Post Grade
Starting date
Ending date
Previous post
Ending of contact
Post Salary
Department Name
Role name
Previous role
Role starting date
Role ending date
Extra payment for Role

Un-Normalized data set to first normal form.


The data set represented in to be an un-normalized data set. This can be seen, for instance, if I
choice the data “academic id” as the key of this data set and underline it to indicate the
realistically and I remove redundant information. A given cell of the table for the attributes, job
code, Current post name, Post Grade ,Starting date, Previous post, Ending of contact , Post
Salary, department name, Role ID, Role name, Previous role, Role starting date, Role ending
date, Extra payment for Role contains multiple values.
“The relation is in first normal form if and only if every non-key attribute is functionally
dependent upon the primary key. “

Candidate Name: NCC Candidate ID: Examination Cycle: Page 10 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

The attributes, Job code , Current post name, Post Grade ,Starting date, Previous post, Ending
of contact , Post Salary, department name, Role ID, Role name, Previous role, Role starting
date, Role ending date, Extra payment for Role are clearly not functionally dependent on my
chosen primary key “Department Code” . The attributes Department Name, Academic ID,
Academic name, DOB, Address, Nationality, Qualification, Awarding body, Awarding date
clearly are. This means that we form tow table: one for the functionally dependent attribute,
and one for the non –dependent attributes. I declare a compound of Department Code and post
code to the primary of this second table.

1st NF (1st Normal Form)


Academic ID
Academic name
DOB
Address
Nationality
Qualification
Awarding body
Awarding date

Academic ID
Job code
Current post name
Post Grade
First normal form:
Starting date
Previous post
Ending of contact
Post Salary
department name
Role ID
Role name
Previous role
Role starting date
Candidate Name: NCC Candidate ID: Examination Cycle: Page 11 of 31
Md. Ibrahim Amin Role ending date
00097697 June 2009
Extra payment for Role
International Advances Diploma in Computer Studies Database Design & Development

First normal form to second normal form


To move form first normal form to second normal form I remove part-key dependencies. “A
relation is in second normal form if and only if it is first normal form every non key attributes is
fully functionally dependent on the primary key”
Take for instance the table named “Role” here I have a tow compound key job code and Role
ID. Job code and Role ID has influence on the role. Hence I brake out the determinant and
dependent data items into their own table. This leads to decomposition of the table as follows:

Candidate Name: NCC Candidate ID: Examination Cycle: Page 12 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Second normal form:


2nd NF (2nd Normal Form)
Academic ID
Academic name
DOB
Address
Nationality
Qualification
Awarding body
Awarding date

Academic ID
Job code
Current post name
Post Grade
Starting date
Previous post
Ending of contact
Post Salary
Department name

Role ID
Job Code
Role name
Previous role
Role starting date
Role ending date
Extra payment for Role

Candidate Name: NCC Candidate ID: Examination Cycle: Page 13 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Second normal form to third normal form


To move form second normal forms to tired normal form I remove inter- data dependences
(non-key dependences).
“A relation is in third normal form if and only if it its in second normal form and every non-key
attribute is non-transitively dependent on the primary key”
The only place where this is relevant to my present example is in the table called Role. Here
“Previous role, Role starting date, Role ending date, Extra payment for Role” is therefore asking
to be primary key. Hence I create a separate table to be called role history with Job Code and
Role ID as composed k key for relation with Role and job table.

3rd NF (3rd Normal Form)


Academic ID
Academic name
DOB
Address
Nationality
Qualification
Awarding body
Awarding date

Academic ID*
Job code
Current post name
Post Grade
Starting date
Previous post
Ending of contact
Post Salary
Department name

Job Code*
Role ID *
Role name
Previous role
Role starting date
Role ending date
Extra payment for Role
Third normal form:
Candidate Name: NCC Candidate ID: Examination Cycle: Page 14 of 31
Md. Ibrahim Amin Role00097697
ID June 2009
Role name
International Advances Diploma in Computer Studies Database Design & Development

Academic

JOB

Role history

ROLE

A use full mnemonic for remembering the relation for normalization is the distortion of the legal
Oath presented below:
 No repeating group
 The data items depended upon the key.
 The while key And nothing but the key
 So help me code.

Candidate Name: NCC Candidate ID: Examination Cycle: Page 15 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Aim: Using a Data Base Management System (DBMS) of your choice, set-up all the above
normalized tables, and populates them with well-designed test data (minimum 5 records per
table). Provide printouts of all tables.

Using SQL (DBMS) I have create table by flowing above normalization there are below:

Candidate Name: NCC Candidate ID: Examination Cycle: Page 16 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Academic table:
Step 1: create table academic

create table academic(


Academicid varchar2(5) not null,
Academicname varchar2(30) not null,
dob date,
Nationality varchar2(15),
address varchar2(50),
qualification varchar2(20),
abody varchar2(30),
adate date,
primary key (Academicid));

Step 2: write codes to SQL for show Academic colum.


Describe academic;

Figure: Academic table Colum.

Step 3: insert Academic information.

insert into academic values('101','Rahman Riaz','03mar1960','bangladeshi',


'sylhet','M.Sc in Mathematics','DHAKA uni','06-June-1987');
Candidate Name: NCC Candidate ID: Examination Cycle: Page 17 of 31
Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

insert into academic values('102','Mustafa ali','02-Jan1975','bangladeshi',


'sylhet','M.Sc in IT','LondonMet','02-Mar-2002');
insert into academic values('103','abidal','04-feb-1955','bangladeshi','sylhet','M.Sc
in Mathematics','sust','07-June-1982');
insert into academic values('104','mahmuda_k','03Jan1977','bangladeshi',
'sylhet','M.Sc in Mathematics','DHAKA uni','06-June-2004');
insert into academic values('105','sadik','08-Aug1980','bangladeshi', 'sylhet','M.Sc in
Mathematics','DHAKA uni','06-June-2007');
insert into academic values('106','Rahman samim','03-Mar 1961','bangladeshi',
'sylhet','M.Sc in IT','DHAKA uni','06-June-1988');
insert into academic values('107','taher','23-Jan1972','bangladeshi','sylhet' ,'M.Sc in
IT','DHAKA uni','02-Jan-1999');
insert into academic values('108','furan alom','03-Mar1963','bangladeshi',
'sylhet','M.A in sociology','DHAKA uni','06-Mar-1985');
insert into academic values('109','Rahman tareq','01-Feb1979','bangladeshi', 'dhaka',
'M.A in social work','DHAKA uni','06-June-1998');

Step 4: write SQL code to SQL for show academic information.

select*from academic ;

Figure: Academic table information

JOB table:

Candidate Name: NCC Candidate ID: Examination Cycle: Page 18 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Step 1: create table JOB


create table job(
jobcode number(5),
Academicid varchar2(5),
postname varchar2(20),
pgrade varchar2(5),
sdate date,
ppost varchar2(20),
jduration varchar2(20),
csalary number(10),
econtact date,
dept varchar2(20),
primary key (jobcode),
foreign key (Academicid) references academic);

Step 2: write codes to SQL for show job column in below figure.

Describe job;

Figure: job table Column (Attribute),

Step 3: insert JOB information.

Candidate Name: NCC Candidate ID: Examination Cycle: Page 19 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

insert into job values(1,'101','lecturer','A','10-aug-1988','','',1000,'12-jan-


2010','mathematics');
insert into job values(2,'102','lecturer','B','12-feb-2003','','',1000,'12-jan-
2015','mathematics');
insert into job values(5,'105','lecturer','A','10-aug-2008','','',1000,'10-aug-
2017','mathematics');
insert into job values(6,'106','lecturer','A','10-june-1989','','',1000,'12-jan-
2010','computer science');
insert into job values(7,'107','lecturer','A','18-feb-2000','','',1000,'12-jan-
2010','computer science');
insert into job values(8,'108','lecturer','A','10-aug-1987','','',1000,'12-aug-2009','arts');
insert into job values(9,'109','lecturer','A','05-aug-1988','','',1000,'10-jan-2010','arts');
insert into job values(10,'110','lecturer','A','10-aug-1985','','',1000,'12-jan-
2010','mathematics');
insert into job values(13,'113','lecturer','A','07-aug-1996','','',1000,'12-jan-
2010','physics');
insert into job values(14,'101','senior lecturer','A','02-may-1990','lecturer','may,1988-
apr,1990',5000,'12-apr-1995','mathematics');
insert into job values(15,'101','principal lecturer','A','02-may-1995','senior
lecturer','may,1990-apr,1995',7000,'12-jan-2000','mathematics');
insert into job values(16,'101','professor','A','02-feb-2000','principal
lecturer','may,1995-jan,2000',10000,'12-jan-2010','mathematics');
insert into job values(17,'106','senior lecturer','A','06-may-1992','lecturer','june,1989-
apr,1992',5000,'12-apr-1996','computer science');
insert into job values(18,'106','principal lecturer','A','02-may-1996','senior
lecturer','may,1992-apr,1996',7000,'12-may-2000','computer science');
insert into job values(21,'107','senior lecturer','A','02-may-2005','lecturer','feb,2000-
apr,2005',5000,'12-jan-2010','computer science');
insert into job values(22,'108','senior lecturer','A','02-may-1998','lecturer','aug,1987-
apr,1998',5000,'12-jan-2010','arts');
insert into job values(23,'109','senior lecturer','A','02-may-1999','lecturer','aug,1988-
apr,1999',5000,'12-jan-2010','arts');
insert into job values(24,'110','senior lecturer','A','02-may-1995','lecturer','aug,1985-
apr,1995',5000,'12-jan-2010','business');
insert into job values(25,'111','senior lecturer','A','02-may-2008','lecturer','jan,2006-
apr,2008',5000,'12-jan-2010','business');
insert into job values(26,'112','senior lecturer','A','02-may-2000','lecturer','aug,1988-
apr,2000',5000,'12-jan-2010','physics');

Step 4: write SQL code (select*from job ;) to SQL for show academic information

Candidate Name: NCC Candidate ID: Examination Cycle: Page 20 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

select*from Job ;

Figure: JOB table information

Role_History table:
Step 1: create table Role_History.

Candidate Name: NCC Candidate ID: Examination Cycle: Page 21 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

create table role_history(


jobcode number(5),
roleid number(5),
prole varchar2(30),
sdate date,
edate date,
rsalary number(15),
primary key(jobcode,roleid),
foreign key(jobcode) references job,
foreign key(roleid) references role);

Step 2: write codes to SQL for show Role_History colum.

Describe role_history

Figure: role history table Column ,

Step 3: insert role_history information.

insert into role_history values(15,1,'Associate Head of department','01-Jun-


2000','12-jan-2004','5000');
Candidate Name: NCC Candidate ID: Examination Cycle: Page 22 of 31
Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

insert into role_history values(16,4,'course leader','01-Jun-2001','12-jan-


2009''3000');

insert into role_history values(20,1,'Associate Head of department','01-Jun-


2007','12-june-2009','5000');

insert into role_history values(20,3,'Research leader','01-Jun-2005','12-june-


2010','3000');

insert into role_history values(22,1,'Associate Head of department','01-Jun-


2000','12-jan-2010','5000');

insert into role_history values(22,7,'Examination Officer','01-Jun-2001','12-jan-


2010','2000');

insert into role_history values(22,4,'course leader','01-Jun-2000','12-jan-


2010','5000');

insert into role_history values(23,2,'','01-Jun-2002','12-jan-2012','3000');

insert into role_history values(24,1,'Associate Head of department','01-Jun-


2000','12-jan-2010','5000');

insert into role_history values(25,2,'','01-Jun-2000','12-jan-2010','3000');

insert into role_history values(26,1,'Associate Head of department','01-Jun-


2002','12-jan-2010','5000');

insert into role_history values(27,2,'','01-Jun-2008','12-jan-2010','3000');

insert into role_history values(19,1,'Associate Head of department','01-Jun-


2008','12-jan-2010','5000');

insert into role_history values(19,7,'Examination Officer','01-Jun-2008','12-jan-


2010','2000');

insert into role_history values(19,6,'Program Director','01-Jun-2008','12-jan-


2010','2000');

Step 4: write SQL code to SQL for show academic information.

select*from role_history ;

Candidate Name: NCC Candidate ID: Examination Cycle: Page 23 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Figure: Role_History table information

Role table:
Step 1: create table Role.
create table role(
roleid number(2),
Candidate Name: NCC Candidate ID: Examination Cycle: Page 24 of 31
Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

rolename varchar2(30),
primary key(roleid));
Step 2: write codes to SQL for show Role colum.
Describe role;

Figure: Role table Colum.


Step 3: insert JOB information.
insert into role values(1,'Head of department');
insert into role values(2,'Associate Head of department');
insert into role values(3,'Quality leader');
insert into role values(4,'Research leader');
insert into role values(5,'Program Director');
insert into role values(6,'Learnig and Teaching Leader');
insert into role values(7,'Recruitment officer');
insert into role values(8,'Examination Officer');

Step 4: write SQL code to SQL for show academic information

select*from Rol ;

Figure: Role table information.

Candidate Name: NCC Candidate ID: Examination Cycle: Page 25 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Aim: Set-up and test all of the following queries using Structured Query Language (SQL).
Please provide printouts of SQL code for each query and the output produced when you run
the query in the database you have developed:
● Display the name of all the heads of departments together with information on any other
Roles they might occupy and the current post they hold.
● Display the name of all the current Senior Lecturers along with the name of the
Department that they belong to and their final salary (the final salary should include the
Salary paid for the post plus any additional payments that an employee might receive
for
Roles they might occupy).
● Display all the heads of the Mathematics department from 2000 to date. The result
should
Return their name, current post and qualifications.

Candidate Name: NCC Candidate ID: Examination Cycle: Page 26 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

A)

Name of all the heads of departments together with information on any other Roles they
might occupy and the current post they hold

select academic.academicname , job.postname from academic, job, role , role_history


where academic. academicid = job.academicid and job.jobcode=role_history.jobcode and
role_history.roleid=role.roleid and role.rolename='Head of department' and job.econtact
>= '26-may-2009' ;

Candidate Name: NCC Candidate ID: Examination Cycle: Page 27 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

b)

Name of all the current Senior Lecturers along with the name of the Department that they
belong to and their final salary
select academic.academicname , job.dept,job.csalary from academic, job, role ,

role_history where academic.academicid = job.academicid and

job.jobcode=role_history.jobcode and role_history.roleid=role.roleid and

job.postname='senior lecturer' and job.econtact>='21-may-2009';

Candidate Name: NCC Candidate ID: Examination Cycle: Page 28 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

C)

All the heads of the Mathematics department from 2000 to date. The result shouldReturn
their name, current post and qualifications:

select academic.academicname, academic.qualification,job.postname, job.dept from


academic, job, role , role_history where academic.academicid = job.academicid and
job.jobcode=role_history.jobcode and role_history.roleid=role.roleid and
role.rolename='Head of department' and job.dept='mathematics' and
role_history.sdate between '01-jan-2000' and '27-may-2009';

Candidate Name: NCC Candidate ID: Examination Cycle: Page 29 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Learning outcome

During doing this assignment I had to acquire enough knowledge and experience from
various sources. In Task 1, I have drawn an Entity Relationship Data Model which
describes the content and structure of the data held by the Academic Human Resources
Department.
II have Produce the resulting tables clearly indicating the primary and foreign keys.
I have Normalized the my created tables to ensure that are all in BCNF (3NF)depend on all
attribute which described in content and structure of the data who held by the Academic Human
Resources Department.
Ii have created a Data Base Management System (DBMS) by using SQL, set-up all the above
normalized tables, and populate them with well-designed test data and I have provided
printouts of all tables.
I have Set-up and test all of the following queries using Structured Query Language (SQL). And
I have provided provide printouts of SQL code for each query and the output produced when
you run the query in the database you have developed:
• Display the name of all the heads of departments together with information on any other
roles they might occupy and the current post they hold.
• Display the name of all the current Senior Lecturers along with the name of the
department that they belong to and their final salary (the final salary should include the
salary paid for the post plus any additional payments that an employee might receive for
roles they might occupy).
• Display all the heads of the Mathematics department from 2000 to date. The result
should return their name, current post and qualifications.
After completing I have acquired enough knowledge about how to use SQL in terms of
database, and I am now familiar with new version of ORACLE, 10g .

Candidate Name: NCC Candidate ID: Examination Cycle: Page 30 of 31


Md. Ibrahim Amin 00097697 June 2009
International Advances Diploma in Computer Studies Database Design & Development

Reference
Serial No URL Date Type of reference
1 http://www.tonymarston.net 20/04/2009 Html
2 http://www.radicore.org 02/05/2009 Html
3 www.school.com/sql/ 03/05/2009 Html
4 www.wikipedia.com 12/04/2009 Html

Serial No BOOK Name Author name ISBN NO Publisher


1 Data base system NCC education ‘’’’ NCC education limited,
2002

Candidate Name: NCC Candidate ID: Examination Cycle: Page 31 of 31


Md. Ibrahim Amin 00097697 June 2009

You might also like