0% found this document useful (0 votes)
42 views

Project Report On Dbms

The document describes a project report created by Team 8 on a Human Resource Management Database application. It includes an ER diagram and discusses ordered indexing vs hashing, algorithms for calculating canonical covers of functional dependencies, and procedures in PL/SQL. It also provides the data dictionary for the database including tables for employees, departments, jobs, and more.

Uploaded by

Hello
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Project Report On Dbms

The document describes a project report created by Team 8 on a Human Resource Management Database application. It includes an ER diagram and discusses ordered indexing vs hashing, algorithms for calculating canonical covers of functional dependencies, and procedures in PL/SQL. It also provides the data dictionary for the database including tables for employees, departments, jobs, and more.

Uploaded by

Hello
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Kishinchand Chellaram College, Mumbai – 20.

FY/SY/TY B. Sc. (I.T.) Semester_________

Project Report
Database Management System
Team 8

Topic:
1. Human Resource Management Database application.
2. Comparison of Ordered Indexing and Hashing.
3. Canonical Cover of FDs with algorithm.
4. Procedure in PL/SQL.

Members:
Name Roll_No
Shaikh Usama 69
Khan Iffat 25
Malik Fatima 06
Shaikh Nadim 46
Kishinchand Chellaram College, Mumbai – 20.
FY/SY/TY B. Sc. (I.T.) Semester_________
1. Human Resource Management Database application:

----ER DIAGRAM

2. Comparison of Ordered Indexing and Hashing:

Ordered indexing is a technique for organizing data in a way that allows for efficient
retrieval of records. It works by creating a tree-like structure of the data, where each
node in the tree represents a record. The tree is sorted by the value of a particular
field, such as the record's primary key. This allows for efficient retrieval of records by
searching the tree for the desired value.
Hashing is a technique for mapping data to a unique value, called a hash code. This
hash code can then be used to quickly retrieve the corresponding data record. Hashing
is typically used for large databases, where ordered indexing would be inefficient.
The main difference between ordered indexing and hashing is the way that they search
for data. Ordered indexing searches for data sequentially, while hashing searches for
Kishinchand Chellaram College, Mumbai – 20.
FY/SY/TY B. Sc. (I.T.) Semester_________
data directly by using the hash code. This makes hashing faster for most queries, but it
can be less efficient for range queries.
Ordered indexing is also more suitable for small to medium databases, while hashing
is more suitable for large databases. This is because ordered indexing requires more
memory than hashing, and it can be more difficult to manage.
In general, ordered indexing is a good choice for databases where range queries are
common, while hashing is a good choice for databases where most queries are for a
single record.

3. Canonical Cover of FDs with algorithm:

Finding the canonical cover of a set of functional dependencies (FDs) is an important


step in database normalization. The canonical cover represents a minimal set of FDs
that is logically equivalent to the original set, without any redundant or extraneous
dependencies. There are algorithms that can be used to compute the canonical cover
of a given set of FDs.
Steps;
1. Input: Given a set of functional dependencies (FDs).
2. Step 1: Reduce the FDs to remove extraneous attributes on the right-hand side
(RHS). For each FD X → Y in the set, check if Y is a subset of any other attribute
set Z. If it is, remove Y from X → Y. Repeat this process until no further
reductions are possible.
3. Step 2: Break down FDs with multiple attributes on the left-hand side (LHS). For
each FD X → Y with multiple attributes in X, create new FDs for all possible
single attribute combinations on the LHS that imply Y.
4. Step 3: Remove redundant FDs. For each FD X → Y, check if it can be inferred
from the closure of other FDs. If it can, remove X → Y from the set.
5. Output: The resulting set of FDs is the canonical cover.

4. Procedure in PL/SQL.

----Procedure is a PL/SQL block which performs one or more specific tasks. It is just
like procedures in other programming languages.
Syntax for Creating Procedure;

1. CREATE [OR REPLACE] PROCEDURE procedure_name


2. [ (parameter [,parameter]) ]
3. IS
4. [declaration_section]
5. BEGIN
6. executable_section
7. [EXCEPTION
8. exception_section]
9. END [procedure_name];
Kishinchand Chellaram College, Mumbai – 20.
FY/SY/TY B. Sc. (I.T.) Semester_________
Example;
1. create or replace procedure "INSERTUSER"
2. (id IN NUMBER,
3. name IN VARCHAR2)
4. is
5. begin
6. insert into user values(id,name);
7. end;

Let's see the code to call created procedure;


1. BEGIN
2. insertuser(101,'Rahul');
3. dbms_output.put_line('record inserted successfully');
4. END;

Syntax for drop procedure;


1. DROP PROCEDURE procedure_name;

5. DATABASE:
----DATA DICTIONARY;

Column Field Type Field Size Description


HR ADMIN

HR_ID (PK) INT --- ADMIN ID


HR_NAME VARCHAR 20 ADMIN NAME
HR_ADDRESS VARCHAR 20 ADMIN ADDRESS
DEPARTMENT
DEPT_ID (PK) INT --- DEPARTMENT ID
DEPT_NAME VARCHAR 20 DEPARTMENT
NAME
DEPT_ADDRESS VARCHAR 20 DEPARTMENT
LOCATION
HR_ID (FK) INT --- HR ADMIN OF
DEPARTMENT
EMPLOYEE
EMP_ID (PK) VARCHAR 20 EMPLOYEE ID
EMP_NAME VARCHAR 20 EMPLOYEE
NAME
EMP_ADDRESS VARCHAR 20 EMPLOYEE
LOCATION
Kishinchand Chellaram College, Mumbai – 20.
FY/SY/TY B. Sc. (I.T.) Semester_________
DEPT_ID (FK) INT --- DEPARTMENT IN
WHICH
EMPLOYEE
WORK
PROJECT
PRJ_ID (PK) VARCHAR 10 PROJECT ID
PRJ_NAME VARCHAR 20 PROJECT NAME
DURATION VARCHAR 20 TIME PERIOD OF
PROJECT
DEPT_ID (FK) INT --- PROJECT
OFFERED BY
DEPARTMENT
TRAINING
TRN_ID (PK) VARCHAR 10 TRAINING ID
TRN_NAME VARCHAR 20 TRAINING NAME
DURATION VARCHAR 20 TIME PERIOD OF
TRAINING
DEPT_ID (FK) INT --- TRAINING
OFFERED BY
DEPARTMENT
PROJECT_ALLOCATION
PRJ_ID (FK) VARCHAR 10 ID OF PROJECT
FOR ALLOCATION
TO IDENTIFY
EMP_ID (FK) VARCHAR 20 PROJECT
ALLOCATE TO
WHICH
EMPLOYEE
TRAINING_ALLOCATION
TRN_ID (FK) VARCHAR 10 ID OF TRAINING
FOR ALLOCATION
TO IDENTIFY
EMP_ID (FK) VARCHAR 20 TRAINING
ALLOCATE TO
WHICH
EMPLOYEE
JOB
J_ID (PK) VARCHAR 20 JOB ID
J_TITLE VARCHAR 20 JOB NAME
SALARY BIGINT --- SALARY
ALLOCATE TO
THAT JOB
JH_ID (FK) VARCHAR 20 JOB WHICH
EMPLOYEE
JOB_HISTORY
JH_ID (PK) VARCHAR 20 ID OF JOB
BACKGROUND
START_D DATE --- WHEN
EMPLOYEE
Kishinchand Chellaram College, Mumbai – 20.
FY/SY/TY B. Sc. (I.T.) Semester_________
STARTED
WORKING
END_D DATE --- EMPLOYEE
RESIGN OR END
OF PROJECT
EMP_ID (FK) VARCHAR 20 JOB ID FOR
DECLARING
WHICH JOB
HISTORY
LEAVE
L_ID (PK) VARCHAR 20 LEAVE ID
DATE_L DATE --- FROM WHICH
DATE THE
PERSON WANT
LEAVE
DAYS_L VARCHAR 20 FOR HOW MANY
DAYS
EMP_ID (FK) VARCHAR 20 LEAVE ASK BY
WHICH
EMPLOYEE
LEAVE_STATUS
L_ID (FK) VARCHAR 20 LEAVE ID FOR ITS
STATUS
CHECKING
ACCEPT VARCHAR 5 LEAVE IS
GRANTED OR
NOT
Kishinchand Chellaram College, Mumbai – 20.
FY/SY/TY B. Sc. (I.T.) Semester_________
----TABLE;

You might also like