






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























INFORMATION TECHNOLOGY ASSIGNMENT 1
ASSIGNMENT 1 FRONT SHEET Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit: Database Design & Development Submission date November 7th^ , Date received (1st submission) November 7th^ , Re-submission date Date received (2nd submission) Student name Huynh Van Duc Student ID BD Class IT05^103 Assessor name Vu Thi Thanh Huyen Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature: Grading grid P1 M1 D
I'd like to start by thanking my mentor Vu Thi Thanh Huyen for his ongoing encouragement of my academic endeavors and for his extensive knowledge and patience. Her advice has been helpful to me as I've studied and written my thesis. Without your tremendous assistance, I could not have succeeded in doing this. I want to thank my mentor as well as my friends for helping me advance my subject knowledge. Additionally, they are constantly available to help me whenever I need it. In addition, I want to thank the school for putting everything in place so that I could have the tools I needed to do my job. Finally, I want to thank my family for being there for me from the beginning and for their spiritual support. They never fail to show concern and give me encouragement to try more.
I certify that this is my original work, based on my study, and that I have acknowledged all resources and sources, including books, papers, reports, lecture notes, and any other sort of document, electronic communication, or human communication, used in its creation. I additionally declare that I have not previously turned in this assignment for evaluation in any other unit, unless all unit coordinators concerned have given their explicit consent, or at any other time in this unit, and that I have not in any manner copied or plagiarized from the work of others. Declaration of the learner I verify that the work I've submitted for this assignment is all my own, and that all research sources have been properly credited. Signature of the student: Date: Nobember 7th^ ,
7
1NF First Normal Form 2NF Second Normal Form 3NF Third Normal Form BA Business Administration BCNF Boyce Codd Normal Form BS Business Strategy BTEC Business and Technology Education Council CMS Content Management System DB Database ERM Entity Relationship Diagram FPT Financing Promoting Technology GD Graphic Design ID Identity IT Information Technology Mar Marketing PE Pearson Education Pro Programming RAM Random Access Memory SRS System Requirement Specification Typo Typography Web Web Developm
8
First and foremost, I would like to thank my mentor Vu Thi Thanh Huyen for his ongoing encouragement of my academic endeavors and for his extensive knowledge and patience. Without your tremendous assistance, I could not have succeeded in doing this. I want to thank my mentor as well as my friends for helping me advance my subject knowledge. In addition, I want to thank the school for putting everything in place so that I could have the tools I needed to do my job. Last but not least, I want to thank my family, especially my parents. They never fail to show concern and give me the extra push I need to do the job successfully. A person's network is crucial to life. After that, we shall put our findings to the test. Finally, we will run and manage the system. Building a whole database design and development system is likewise a process. Let's investigate that in this task! Use an appropriate design tool to design a relational database system for a substantial problem (LO1) o Design a relational database system using appropriate design tools and techniques, containing at least four interrelated tables, with clear statements of user and system requirements. (P1) o Produce a comprehensive design for a fully functional system which includes interface and output designs, data validations and data normalisation. (M1) o Assess the effectiveness of the design in relation to user and system requirements. (D1)
10 1.2.2. Requirement To make the requirements easy to understand, I will use the User Story format below to describe the requirements. As a library manager, I wanted a system that could perform a number of important actions so that they help me manage the library easily. The most basic operations are entering, looking up complete information of books as well as their status, recording book loan slip with loan details, viewing reader information, can add, edit, delete information of book, last name, see the status of the returned book. View statistics of readers' borrowing, paying and interest activities. As a reader, I would like to edit and view personal information along with account password, some information such as loan date, employee name, book title should be clear so as not to be confused about the details. this information. 1.2.3. Input/Output The input/output to the system will be the data of information of readers, staffs, and books, etc. Figure 2: Information of books Figure 3: Information of staff
11 Figure 4: Information of member Figure 5: Login
13 2.2. Database design with explanations Logical design (ERD) of database: Figure 7: Entity relationship diagram Entities are joined by 1-to-many association because the same information can be used more than once and 1 - to-1 association, for example, between Login entity and Member, Staff. The book entity should have fields that record detailed and important information for easy searching and statistics such as book title, author name, publication date, total number of books in the library and its price. The foreign key is set in the IDAuthor field to refer to the Author table. The Author entity only includes the ID as the primary key and two other fields, Firstname and Lastname, to identify the author's name. The Login entity needs Gmail for each user to log in with the password in the profile along with the role and ID of the staff or member. The primary key is Gmail, the foreign key includes the IDstaff and IDmember fields, depending on the role that refer to the Member or Staff entity. For Staff, the basic data is the name, the staff code for identification purposes, the ID is set as the primary key. For Members, the ID is also set as the primary key, in addition to information that needs detailed information, add an address field, a phone number for easy contact; The date of birth field makes statistics easy.
14 Borrowing entity, some basic information is the fields of member code, employee, borrowed date, return date for easier management. IDborrow is the primary key, IDstaff and IDmember are set as secondary keys to refer to the Staff and Member entities for the purpose of getting the ID. Entity BorrowDetail has a primary key of ID to distinguish the data, IDborrow is a foreign key that refers to entity Borrow to get information of borrowed tickets, Quantity is the borrowed quantity (up to 3), 3 foreign keys Title from 1 up to 3 references to the Book entity to get the Title of the book, up to 3 books. The ReturnBook entity has a primary key that is ID to distinguish the data, IDborrow is a foreign key that refers to the Borrow entity to get information about the loan slips, QuantityReturn is the quantity returned, Status is the status of the returned book, and Note field if required. 2.3. Normalization of the database Normalization is a database design method that starts with a look at the links between attributes (known as functional dependencies) (Connolly and Begg, 2015). In normalization, a number of tests are performed to identify the best grouping for these qualities and, as a result, an appropriate set of relations to satisfy the user's data needs. 1NF Normalization: At Borrow: Key - > IDborrow Each record has 1 value and is unique. As a result, Borrow reached 1NF normalization, the same happened for all the other entities so they all met 1NF normalization. 2NF Normalization: At Member: Primary Key - > ID ID - > Firstname ID - > Lastname ID - > DoB ID - > Phone number ID - > Address The attribute fields are all dependent on the primary key. The same goes for the rest of the entities. Entities have been separated to depend entirely on the primary key, using foreign keys to preserve data integrity and the association between entities. The above condition and the condition of reaching 1NF normalization, entities have achieved 2NF normalization. 3NF Normalization: At Book: Primary Key - >Title
16 Publisher Vachar(20) X Quantity Int Cost Int X Table 4: Book Title IDAuthor^ Publication^ PublishingHouse^ Publisher^ Quantity^ Cost year Business 123 2015 Pearson Bill Gates 5 999000 Roll: Keqing 124 2021 Pearson Manh Tung 2 1000000 C Table 5: Entity Staff (physical design) Column Name Data type Allow nulls ID Char(4) Firstname Nvarchar(50) Lastname Nvarchar(50) Table 6: Staff ID Firstname Lastname G111 Hoang Long G112 Hoang Nam Table 7: Entity Member (physical design) Column Name Data type Allow nulls ID Char(6) Firstname Nvarchar(30)
17 Lastname Nvarchar(30) DoB Date X PhoneNumber Char(10) Address Nvarchar(50) X Table 8: Member ID Firstname Lastname DoB PhoneNumber Address GCH001 Pham Trong 1/1/2003 0213536732 null GCH003 Nguyen Nam Null 0213536733 null Table 9: Entity Borrow (physical design) Column Name Data type Allow nulls IDborrow Int IDmember Char(6) IDstaff Char(4) Date of borrow Date Date of return Date X Table 10: Borrow IDborrow IDmember IDstaff Date of borrow Date of return 1 GCH002 G111 12/6/2021 20/6/ 2 GCH003 G112 10/6/2021 18/6/
19 Table 14: BorrowDetail ID IDborrow Quantity Title1 Title2 Title 1 2 1 Business null null Table 15: Entity ReturnBook Column Data type Allow nulls ID int IDborrow int QuantityReturn int Status Varchar(10) Note Varchar(50) X Table 16: ReturnBook ID IDborrow QuantityReturn Status Note 1 2 1 Good null
20 2.5. Data validation Data validation is simply understood as checking the input data is correct according to the meaning of that data or not (Riolo, 1986). Here, the email will be checked according to the school's email format so that the users are only students and employees of the school. Some integer data will be formatted greater than 0; phone numbers are formatted as 10 numbers, starting with '0' followed by numbers 0 through 9. Some date data is formatted smaller than the current date so that no errors are encountered in statistics or calculations. Table 17: Data validation of fields Entity Column Name Data type Allow nulls Data Validation Login Gmail nvarchar(50) like '%@%.edu.vn' Role Varchar(10) in (‘Staff’, ‘Member’) Book Quantity Int > 0 Cost int X IDAuthor Int X Publication year Year X Like ‘[0-2][0-9][0-9][0-9]’ <= year(getdate()) Member DoB Date X < getdate() PhoneNumber Char(10) Like ‘0[0-9][0-9][0-9][0-9][0-9][0-9] [0-9][0-9][0-9]’ Borrow IDmember Char(4) X Like ‘G_H[0-9][0-9][0-9]’ IDstaff Char(4) X Like ‘G[0-9][0-9][0-9]’ Date of borrow Date < getdate() Date of return Date X >[Date of borrow] BorrowDetail Quantity Int >0 and < ReturnBook Status Varchar(10) In (‘Good’, ‘Bad’) QuantityReturn Varchar(10) Between 1 and 3