Docsity

Database Design for FPT University's Online Library System, Assignments of Database Programming

Toggle sidebar
bg1
ASSIGNMENT 1
Qualification TEC Level 5 HND Diploma in Computing
Unit number and title Unit 04: Database Design & Development
Submission date 24/02/2024 Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Nguyen Trong Thiep Student ID BH01619
Class SE0630 Assessor name Nguyen Van Toan
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 Thiep
Grading grid
P1 M1 D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Database Design for FPT University's Online Library System and more Assignments Database Programming in PDF only on Docsity!

ASSIGNMENT 1

Qualification TEC Level 5 HND Diploma in Computing Unit number and title Unit 04: Database Design & Development Submission date 24/02/2024 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Nguyen Trong Thiep Student ID BH Class SE0630 Assessor name Nguyen Van Toan 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 Thiep Grading grid

P1 M1 D

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Table of Content

  • A. Intoduction
  • B. Body(Database design)
    • I. SRS (System Requirement Specification)
    • II. Logical Design (ERD)
    • III. Attribute
    • IV. Entities Relationship
    • V. Types Of Relationships
    • VI. Online Library System Logical Design (Erd)
    • VII. Why Erd Suitable For This System:
    • VIII. Physical Design
  • C. References

A. Intoduction In the upcoming future, the traditional library will be replaced by the Online Library system, which I have named the efficient fully functional database system for FPT university. I decided to develop this system after the cooperation of FPT university and NVIDIA Inc. It is essential for me to design a database for FPT university's education system, considering their concern about the growth of the number of students in the next few semesters. Most students from FPT university, as I observed through their opinions and complaints, mention the limitations of the traditional library. The increase in students has made it unable to meet their needs. There are several reasons for this:

  • Due to the pandemic, many students are unable to borrow books or access information on the spot.
  • The library is overwhelmed with the increasing number of students borrowing books, leading to information overload and issues like incorrect borrow dates and extraordinary expenses.
  • The traditional library relies on outdated methods. To address these challenges, I have developed the Online Library system, equipped with specific IDs and numerous features. This system will provide a more efficient and convenient solution for students at FPT university.
  • The system needs to ensure that no two students have the same ID and librarian and books
  • After the student logs in and searches for boolid, baborid, libraryid. The system will be able to display all the information at the same time
  • The system can demonstrate all tables at the same time
  • Detecting system when students enter wrong data types
  • Usecase Diagram:

II. Logical Design (ERD)

1. What is logical design?

  • To design an enterprise-wide database based on a specific data model, the logical design stage is implemented in the database design process. It focuses on mapping all objects in the conceptual model to the specific constructs utilized by the selected database model, while remaining independent of physical-level details. 2. Entities
  • An entity is an object that exists. It doesn’t have to do anything; it just has to exist. In database administration, an entity can be a single thing, person, place, or object. Data can be stored about such entities. A design tool that allows database administrators to view the relationships between several entities is called the entity relationship diagram (ERD)

b. Linking entities

  • Linking entities sometime use to solve m-n relationship in database ‘
  • As you can see from figure 5, Linking Entitie iss Primary Key which involve to 2 other Primary Keys: studentID and subjectID c. Lookup entities
  • Lookup entities are essentially utility entities
  • In this case, Users and Roles describe a single entity set each. Their functional dependencies are UserId  Username and RoleName RoleId d. Weak entities

- In a relational database, a weak entity is an entity that cannot be uniquely identified by its attributes alone; therefore, it must use a foreign key in conjunction with its attributes to create a primary key. It dependent on other entities for its meaning

  • User_Role is a weak entity in figure 4 because Users and Roles define its meaning.

III. Attribute

- In relational databases, attributes are the describing characteristics or properties that define all items pertaining to a certain category applied to all cells of a column. The rows, instead, are called tuples, and represent data sets applied to a single entity to uniquely identify each item. Attributes are, therefore, the characteristics of every individual tuple that help describe its unique properties. - Type of attribute:

  • Composite attribute: is an attribute composed of several other simple attributes. For example, the Address attribute of an Employee entity could consist of the Street, City, Postal code and Country attributes.
  • Multivalued attribute: is an attribute where more than one description can be provided. For example, an Employee entity may have more than one Email ID attributes in the same cell.
  • Key attribute or primary attribute: is an ID, key, letter or number that uniquely identifies that item. For example, it can be the number of a certain invoice (e.g. the individual ID of that invoice). A table that contains a single key attribute is considered a strong entity. However, a table might contain more than one key attribute if it’s derived from other tables.
  • Derived attribute : as the name implies, these are derived from other attributes, either directly or through specific formula results. For example, the Age attribute of an Employee could be derived from the Date of Birth attribute. In other instances, a formula might calculate the VAT of a certain payment, so that whenever the cell with the attribute Payment is filled, the cell with the derived attribute VAT automatically calculates its value.

IV. Entities Relationship

  • The process of logical design involves arranging data into a series of logical relationships called entities and attributes. An entity represents a chunk of information. In relational databases, an entity often maps to a table. An attribute is a component of an entity and helps define the uniqueness of the entity
  • Every student has an unique number Which is called Student ID so as Book, Author and Borrow
  • Table Student display Student ID, Student’s Name, Student Gmail, Student Phone Number
  • Table Book include Book ID, Book title, BookAuthor, BookPublisher
  • Table Librarian include Librarian ID, Full Name, Gmail and Phone Number
  • Table Borrow Books include Borrow ID, Student ID, Librarian ID, Borrow Date , Return Date
  • Table BorrowDetail include BorrowID, BookID, quantity and Book rental cost

VII. Why Erd Suitable For This System:

  • An entity-relationship diagram, or ER diagram, is essential for modeling the data stored in a database. It is the basic design upon which a database is built. ER diagrams specify what data we will store: the entities and their attributes. They also show how entities relate to other entities.
  • Visual representation: it makes database easier to design and being able to identify the flow of data and the operation of the entire system is made
  • Effective communication: Because of using given symbols to represent different types of information. This symbol allow designer to understand database properly
  • Easy to understand: Designer can easily design entity relationship diagram so all individuals can also understand them.

VIII. Physical Design

Table: Student Field name Data type Allow nulls Description studentID Nvarchar(10) No Primary Key studentFullName Nvarchar(30) No Name of the student studentGmail Nvarchar(40) Yes Student Gmail studentPhoneNumber Nvarchar(10) Yes Student Phone Number Table: Librarian Field name Data type Allow nulls Description librarianID Nvarchar(10) No Primary Key librarianName Nvarchar(20) No Name of the librarian librarianGmail Nvarchar(30) Yes Librarian Gmail librarianPhoneNumber Nvarchar(20) Yes Librarian Phone Number Table: Borrow Field name Data type Allow nulls Description borrowID Nvarchar(10) No Primary Key studentID Nvarchar(10) No Foreign Key librarianID Nvarchar(10) No Foreign Key borrowDate Date Yes Book borrow date returnDate Date Yes Book return date Table: Book Field name Data type Allow nulls Description bookID Nvarchar(10) No Primary Key bookTitle Nvarchar(30) Yes Bok title bookCategory Nvarchar(20) Yes Book category bookPublisher Nvarchar(20) Yes Book Pubisher