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

IT417 Wu Jian Min

150100000698

Advanced Diploma in Information Technology

Project Documentation

ADIT-IT417 Relational Database Design [Book Borrowing System]

Name: Wu Jian Min Student ID: 150100000698 Class: IT417- Relational Database Design Country: Brunei Darussalam Lecturer Name: Mrs. Vangie Wenceslao

Wu Jian Min Page 1

IT417 Wu Jian Min

150100000698

Contents
1. Proposal

Page

1.1 Introduction ..............................................................................................................3 1.2 Problem background.................................................................................................4 1.3 Proposed system........................................................................................................5 2. Initial E-R Model ..................................................................................................6 3. Design Specification 3.1 Entity specification & Attributes specification.........................................................7 3.2 Relationship Specification......................................................................................14 3.3 Constraints Specification........................................................................................16 4. Business Rules.........................................................................................................17 5. Normalization the relationship 5.1 Normalization between Member and Librarian entity.....................................18 5.2 Normalization between super type and subtype......................................................19 5.3 Normalization between Member and Book entity...........................................20 5.4 Normalization between Rental and Fine entity................................................21 5.5 Normalization between Book and Department entity......................................22 5.6 Normalization between Book and Supplier entity...........................................23 5.7 Normalization between Section and Department entity..................................24 6. Final E-R Model......................................................................................................25 7. Critical Appraisal....................................................................................................26
Wu Jian Min Page 2

IT417 Wu Jian Min

150100000698

8. Reference..................................................................................................................27 9. Appendix................................................................................................................B-1

Wu Jian Min Page 3

IT417 Wu Jian Min

150100000698

1. Proposal
1.1 Introduction

Chung Hua School was established in 19th century by Mr. Tan. It is located in Brunei Darussalam and it offers various courses for primary and secondary students that are awarded by the Ministry of Education of Brunei. There are 3000 students and 300 teachers in CHS. Nowadays, our society kept changing quickly and becoming more modern. The needs for education also increased. The skills of facing higher-level questions and answering effectively with efficacy are compulsory for students and teachers. One of avenues is through reading various kinds of reference books related on subjects. As such, CHS opened a library for teachers and all students to borrow different reference books. Teachers are automatically a member, but students must register to the librarian to become a member. CHS has collected 1400 various kinds of reference books in its own library and each section has 200 books. CHS library is more organized as the librarian sorts all books to different departments, such as primary department, secondary department and teachers department. Each department includes different sections, such as Mathematics, English, Science and so on. Students are allowed to borrow up to 3 reference books from school library during school days. Each book is required to return in one week. Meanwhile each book can be renewed if they need to. However, fine is necessary for students and teachers if books are not returned on the due date. The advantages of reading various kinds of reference books are as below: 1. It provides students and teachers with lots of information sources. 2. It provides creative for students and teachers thinking and problem-solving activities. 3. It provides extra knowledge for students and teachers to know more about a topic prior.

Wu Jian Min Page 4

IT417 Wu Jian Min

150100000698

1.2 Problem Background

Description of operations The current system of CHS is an offline database where data are recorded by handwriting. Each student is allowed to borrow 3 books from library. The librarian needs to record book title, quantity and other information in current students file. Afterwards, the librarian is responsible for updating records once the student has returned certain borrowed books. As CHS have an increased number of students, the database has increased too. Therefore, many problems encounter by offline database. It has a lot of repetitive work to do. The librarian is responsible to check and update records from time to time. The records of borrowed book information would be written wrongly. Sometimes, the files of students would be misplaced too. It is not properly organized due to human error, misplaced file and so on.

Wu Jian Min Page 5

IT417 Wu Jian Min

150100000698

1.3 Proposed New System

Based on the existing problems of the offline system, I propose to use a computerized book borrowing system. Meanwhile, every student holds a member card. The computerized book borrowing system is going to use seven tables to organize data. 1. The information of librarian. 2. The information of members. 3. The information of books. 4. The information of supplier. 5. The information of fine. 6. The information of section. 7. The information of department.

The implementation of this computerized management system will have a lot of advantages. 1. The data records are more organized. 2. Human error or file misplaced will be reduced. 3. Tracking the information of book borrowed will be faster and accurate. 4. It will be easy for librarian to retrieve files. 5. It will allow to automatically update records.

Wu Jian Min Page 6

IT417 Wu Jian Min

150100000698

2. Initial E-R Model


Libraria n Attends to

Membe r

Rents

Fin e

Supplie r

Supp lies

Book

Belongs to

Departme nt

h a s

Sectio n

Wu Jian Min Page 7

IT417 Wu Jian Min

150100000698

3. Design Specification
3.1 Entity specification & Attributes specification
1. Librarian Entity is used to store the information of librarian. There are 8 attributes in Librarian Entity.
DO BB Libraria n Gend er

National ity Libraria n ID Date Hired

IC No First Name Last Name

Primary Foreign Data Key Key Type Librarian ID First Name Last Name Gender IC NO Date Hired Yes No int

Size Null Description 10 No To record the information of librarian in sequential number. To record the first name of the librarian. To record the last name of the librarian. To identify the gender of librarian. To record the IC No of librarian. To record the beginning date of hiring of every librarian. To identify the DOB of librarian. To identify the nationality of librarian.

No No No No No

No No No No No

char char char text date/time

20 20 1 20 -

No No No No No

DOB Nationality

No No

No No

date char

10 20

No No

Wu Jian Min Page 8

IT417 Wu Jian Min

150100000698

2. Member Entity is used to store the information of teachers and students. There are 7 attributes.
First Name Mem ID Libraria n ID Last Name Membe r Lev el

DO B Cla ss

Primary Foreign Key Key Mem ID Yes No

Data Type int

Size Null Description 10 No To record the information of member in sequential number. To record the first name of the member. To record the last name of the member. To identify the DOB of member. To record students class. To identify which level the teacher is teaching whether Primary or Secondary level. To identify the Librarian who attends to the member.

First Name Last Name DOB Class Level

No No No No No

No No No No No

char char date Text Text

20 20 10 20 20

No No No No No

Librarian ID

No

Yes

int

10

No

Wu Jian Min Page 9

IT417 Wu Jian Min

150100000698

3. Book Entity is used to record the information of book. There are 7 attributes.
Book ID ISB N Titl e Auth or Book Publish er

Supplier ID Depart ID

Primary Foreign Data Key Key Type Book ID Yes No int

Size Null Description 10 No To record the information of Book in sequential number. To record the title of book. To record book identifier code To record the author of book. To record the publisher of book. To identify which Department the book belongs to. To identify who supplied the particular book.

Title ISBN Author Publisher Depart ID

No No No No No

No No No No Yes

char char text text int

20 20 20 20 10

No No No No No

Supplier ID

No

Yes

int

10

No

Wu Jian Min Page 10

IT417 Wu Jian Min

150100000698

4. Fine Entity is used to record the payment of books which have not been returned on time. There are 4 attributes.

Fine ID Fin e Mem ID ID

Payme nt

Book ID

Primary Foreign Data Key Key Type Fine ID Payment Mem ID Book ID Yes No No No No No Yes Yes int

Size Null 10 No No No No

Description To record the information of Fine in sequential number. To record the information of payment. To record the information of member who paid the fine. To record the information of Book borrowed by a member and has fine.

currency int Int 20 20

Wu Jian Min Page 11

IT417 Wu Jian Min

150100000698

5. Supplier Entity is used to store the information of supplier. There are 4 attributes.

Addre ss

Supplier ID Supplie r

Contact No

Supplier Name

Primary Foreign Data Key Key Type Supplier ID Yes No int

Size Null 10 No

Description To record the information of supplier in sequential number. To record the name of supplier. To record the address of supplier. To record the contact no of supplier.

Supplier Name Address Contact No

No No No

No No No

text text int

225 20 10

No No No

Wu Jian Min Page 12

IT417 Wu Jian Min

150100000698

6. Department Entity is used to record the information of department. Primary Department and Secondary Department are two types of Department. There are 2 attributes.

Depart ID

Departme nt Depart Name

Primary Foreign Data Key Key Type Depart ID Yes No int

Size Null 10 No

Description To record the information of department in sequential number. To record the name of department.

Depart Name

No

No

text

225

No

Wu Jian Min Page 13

IT417 Wu Jian Min

150100000698

7. Section Entity is used to categorize the books. There are 4 attributes.

Section ID No of books Sectio n Section Name Depart ID

Primary Foreign Key Key Section ID Yes No

Data Size Null Type int 10 No

Description To record the information of section in sequential number. To record the name of department where the section belongs to. To categorize books. To record number of books in each section

Depart ID

No

No

text

225

No

Section Name No. of books

No No

No No

text int

225 5

No No

Wu Jian Min Page 14

IT417 Wu Jian Min

150100000698

3.2 Relationship Specification


1. Librarian Entity and Member Entity One librarian may attend to zero, one or many members. One member is attended by one librarian.

Libraria n

Attends to

Membe r

2. Member Entity and Book Entity and Fine Entity One member may rent zero, one or many books. One book can be rented by zero or many members.
Membe r Book

R ents

3. Rental Entity and Fine Entity One rental may have zero or one fine. One fine must have one rental.
Rent Overd ue Fin e

4. Book Entity and Department Entity One book must belong to one department. One department can have one or many books.
Book
Belongs to

Departme nt

Wu Jian Min Page 15

IT417 Wu Jian Min 5. Book Entity and Supplier Entity One supplier may supply one or many books. One book can be supplied by one supplier only.
Supplie r Suppl ies

150100000698

Book

6. Department Entity and Section Entity One department may have one or many sections. One section can have one department only.

Departme nt

h a s

Sectio n

Wu Jian Min Page 16

IT417 Wu Jian Min

150100000698

3.3 Constraints Specification


Member Entity subdivided into two subtypes. The two subtypes are Teacher Entity and Student Entity. Teacher entity and Student entity are disjoined generalization. The attribute CLASS is unique for Student entity. The information for class is used to identify which class the student belongs to, such as primary 1, primary 2 and so on. The attribute LEVEL is unique for Teacher entity. The information for level is used to identify which level the teacher is teaching, such as primary level or secondary level.

Mem ID Libraria n ID

DO B Membe r G

Last Name First Name

Student

Teache r Lev el

Cla ss

Wu Jian Min Page 17

IT417 Wu Jian Min

150100000698

4. Business Rules
1. Librarian entity
Librarian is responsible for checking quantity of books every month and the information of fine. Librarian is responsible to record the information of each member. Librarian is responsible to shelve library books correctly.

2. Member entity
Every student and teacher must register as a member before borrowing books. Every member is allowed to borrow three books once.

3. Rental entity
Each borrowed book must be returned within a week. If the book is returned over a week, the member will be fined $0.10 per day. Each book is allowed to renew. Maximum extension is 7 days.

4. Department entity
Primary and secondary are two types of department. Each book must be stored in appropriate department.

5. Section entity
There are different sections in each department. As for primary department, primary 1, primary 2 until primary 6 are the sections of primary department. As for secondary department, secondary 1, secondary 2 until secondary 4 are the sections of secondary department. Books need to arrange based on title, publisher or author in each section.

6. Supplier, entity
Each supplier must give its name, contact no and address so that librarian will know which books are from which supplier.

7. Book entity
Wu Jian Min Page 18

IT417 Wu Jian Min

150100000698

The information of every book, such as title and author, must be recorded so readers can easily find what they want to borrow.

Wu Jian Min Page 19

IT417 Wu Jian Min

150100000698

5. Normalization the relationship


1. Normalization between Member entity and Librarian entity UNF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID, First Name, Last Name, DOB, Nationality, Gender, IC No, Date Hired) 1NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID, First Name, Last Name, DOB, Nationality, Gender, IC No, Date Hired) 2NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID, First Name, Last Name, DOB, Nationality, Gender, IC No, Date Hired) 3NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID) Librarian (Librarian ID, First Name, Last Name, DOB, Nationality, Gender, IC No, Date Hired)

Wu Jian Min Page 20

IT417 Wu Jian Min 2. Normalization between super type and subtype UNF

150100000698

Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID) 1NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID) 2NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID) 3NF Teacher (Mem ID, First Name, Last Name, DOB, Level, Librarian ID) Student (Mem ID, First Name, Last Name, DOB, Class, Librarian ID)

Wu Jian Min Page 21

IT417 Wu Jian Min

150100000698

3. Normalization between Member entity and Book entity UNF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID, Book ID, Author, Title, ISBN, publisher, Borrow Date, Due Date, Qty, extension) 1NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID, Book ID, Author, Title, ISBN, publisher, Borrow Date, Due Date, Qty, extension) 2NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID) Book (Book ID, Author, Title, ISBN, publisher) Rental (Rental ID, Mem ID, Book ID, Borrow Date, Due Date, Qty, extension) 3NF Member (Mem ID, First Name, Last Name, DOB, Level, Class, Librarian ID) Book (Book ID, Author, Title, ISBN, publisher) Rental (Rental ID, Mem ID, Book ID, Borrow Date, Due Date, Qty, extension)

Wu Jian Min Page 22

IT417 Wu Jian Min 4. Normalization between Rental entity and Fine entity UNF

150100000698

Fine (Fine ID, Payment, Rental ID, Borrow Date, Due Date, Mem ID, Book ID, Qty, Extension) 1NF Fine (Fine ID, Payment, Rental ID, Borrow Date, Due Date, Mem ID, Book ID, Qty, Extension) 2NF Fine (Fine ID, Payment, Rental ID, Mem ID, Book ID) Rental (Rental ID, Borrow Date, Due Date, Mem ID, Book ID, Qty, Extension) 3NF Fine (Fine ID, Payment, Rental ID, Borrow Date, Due Date, Mem ID, Book ID, Qty, Extension) Rental (Rental ID, Borrow Date, Due Date, Mem ID, Book ID, Qty, Extension)

Wu Jian Min Page 23

IT417 Wu Jian Min

150100000698

5. Normalization between Book entity and Department entity UNF Book (Book ID, Author, Title, ISBN, publisher, Depart ID, Depart Name) 1NF Book (Book ID, Author, Title, ISBN, publisher, Depart ID, Depart Name) 2NF Book (Book ID, Author, Title, ISBN, publisher, Depart ID, Depart Name) 3NF Book (Book ID, Author, Title, ISBN, publisher, Depart ID) Department (Depart ID, Depart Name)

Wu Jian Min Page 24

IT417 Wu Jian Min

150100000698

6. Normalization between Book entity and Supplier entity UNF Book (Book ID, Author, Title, ISBN, publisher, Supplier ID, Supplier Name, Contact No, Address) 1NF Book (Book ID, Author, Title, ISBN, publisher, Supplier ID, Supplier Name, Contact No, Address) 2NF Book (Book ID, Author, Title, ISBN, publisher, Supplier ID, Supplier Name, Contact No, Address) 3NF Book (Book ID, Author, Title, ISBN, publisher, Supplier ID) Supplier (Supplier ID, Supplier Name, Contact No, Address)

Wu Jian Min Page 25

IT417 Wu Jian Min

150100000698

7. Normalization between Section entity and Department entity UNF Section (Section ID, Section Name, Depart ID, Depart Name) 1NF Section (Section ID, Section Name, Depart ID, Depart Name) 2NF Section (Section ID, Section Name, Depart ID, Depart Name) 3NF Section (Section ID, Section Name, Depart ID) Department (Depart ID, Depart Name)

Wu Jian Min Page 26

IT417 Wu Jian Min

150100000698

6. Finial E-R Model

Wu Jian Min Page 27

IT417 Wu Jian Min

150100000698

7. Critical Appraisal
I have absorbed a lot of knowledge from my lecturer who has taught us <Relational Database Design> in details. I am familiar and understand the definition of entity, attribute, and relationships and so on now. From what I learnt, I can be able to create an E-R diagram, normalize entities based on business rules.

Wu Jian Min Page 28

IT417 Wu Jian Min

150100000698

8. Reference
-

Relational Database Design Guideline


http://www.nmstatelibrary.org/services-libraries/programsservices/source-book/library-job-descriptions http://www.freetutes.com/systemanalysis/sa7-designing-basic-model-erdiagrams.html

Wu Jian Min Page 29

You might also like