Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

ASSIGNMENT 1 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing

Unit number and title Unit 04: Database Design & Development

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Student ID

Class Assessor name

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 D1
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:


Signature & Date:

Table Of Contents
I. Introduction

In my current role as a Database Developer at a prominent IT consulting company, I have embarked on an exciting project that involves collaborating
with FPT BTEC to address the challenges posed by the school's growing student population and the increasing demand for library resources. The
primary objective of this project is to develop an efficient and user-friendly online library management system. My manager has entrusted me with
the responsibility of not only designing and developing this system but also creating a comprehensive report upon its successful implementation.

To undertake the development of an online library management system, I recognize the importance of establishing a strong foundation in database
management and becoming proficient in utilizing database design tools. This foundation is crucial as it forms the backbone of the entire project,
ensuring that the system efficiently handles the vast array of library resources, user interactions, and administrative tasks.

To achieve this, I have embarked on a journey to gain expertise in database fundamentals, which includes understanding various database types such
as SQL and NoSQL, comprehending data management principles, and mastering the art of database design. This knowledge is vital in structuring the
database schema and relationships effectively, ensuring that the online library management system can efficiently handle tasks such as cataloging
books, managing user accounts, handling book loans and returns, as well as facilitating search and reporting functionalities.

II. Design a relational database system.

1. User and system requirements.


a. Scope of request.

The online library system will facilitate BTEC FPT in managing its library system more efficiently. The software will encompass several key
functionalities, including:

1. Search and Explore: Users will have the ability to search and explore the entire library collection. They can search by book title, author, ISBN, or
book category. This feature allows users to easily identify books they wish to borrow or review.
2. Submit Borrowing Requests: Users can submit requests to borrow books through the system. These requests may include specific details about
the book and the desired borrowing period, simplifying the library's process of receiving and processing borrowing requests.
3. Extend Borrowing: Users will be able to request extensions for book borrowing if they need more time to read. The system will automatically
review and process extension requests.
4. View Borrowing History: Users can access information about their borrowing history, including a list of previously borrowed books, borrowing
dates, and return dates.
5. Provide Reviews: Users will have the option to provide reviews and ratings for books they have read. This can assist others in book selection.
6. Recommend Books: The system will have a recommendation engine that suggests books to users based on their past borrowing history, reading
preferences, and ratings. This feature will provide personalized book recommendations, enhancing the user's experience and helping them
discover new and relevant books.

Through the provision of these features, the online library system aims to enhance the experience for both students and faculty members at BTEC
FPT in terms of searching, borrowing, and utilizing library resources. Additionally, it will contribute to more effective library management by
facilitating the tracking and management of borrowing activities.

b. View of the system and its function.

The Online Library Management System (OLMS) will provide a user-friendly interface with various functions to cater to the needs of students, faculty,
and university managers. Below is an overview of the system's views and its key functions:

1. User Login View:

Function: Allows users (students, faculty, and managers) to log in using their university credentials (username and password).

2. Search and Browse View:

Function: Enables users to search and browse the library catalog by title, author, ISBN, or category. Users can explore available books and view book
details.

3. Book Details View:

Function: Provides detailed information about a selected book, including title, author, ISBN, description, availability status, and user reviews.

4. Borrowing View:
Function: Allows users to check out books, view their borrowing history, and request extensions for borrowed books.

5. Reservation View:

Function: Permits users to reserve books that are currently checked out by others. Users can view their reservation queue.

6. User Profile View:

Function: Allows users to manage their account information, including changing passwords, updating contact details, and viewing their borrowing
history and reserved books.

7. Administrative View (Managers Only):

Function: Provides university managers with advanced administrative capabilities.

Add and Manage Books: Managers can add, edit, and delete book records, including setting the number of available copies.

User Management: Managers can manage user accounts, create new accounts, reset passwords, and deactivate accounts.

Generate Reports: Managers can access statistical reports on book utilization, user activity, and overdue books for decision-making.

Data Backup and Restore: Managers have the ability to perform data backups and restore operations.

Security: Ensures data security, including encryption of sensitive user information.

8. Notifications View:

Function: Provides users with notifications related to due dates, book availability, reservation updates, and system announcements.

9. Book Recommendation View:

Function: Offers personalized book recommendations to users based on their reading history, preferences, and ratings.

These various views and functions collectively make up the Online Library Management System, enhancing the experience of library users and
streamlining library operations for efficient management.
c. Use case
Use case for user:

Search and Browse Books: Users can search for books by title, author, or genre.

Borrow Book: Users can borrow books from the library.

Return book: Users can return previously borrowed books.

Manage User Account: Users and library managers can manage user accounts, including changing passwords and updating personal information.

Use case for Library Manager:

Manage Events: Allow the library manager to create, edit, and delete library events such as book exhibitions, conferences, or other special programs.

Manage Users: Allow the library manager to manage user accounts, including creating new accounts, resetting passwords, and deactivating accounts.

Generate Report: The library manager can generate reports on the status of books, borrowing and returning activities, and the list of users.

Manage Library Inventory: The library manager can add, edit, delete books, and manage the quantity of books available in stock.
For IT staff:

Manage System: Allow IT staff to manage and oversee the library management system, including installing and updating software, system security,
and resolving technical issues.
Develop New Features: Allow IT staff to develop and implement new functionalities for the system, including creating mobile applications, integrating
payment gateways, or developing integrations with other systems.

Data Management: Allow IT staff to manage the system's database, including data backup, data recovery, and ensuring data integrity and security.

User Support: Allow IT staff to support users by resolving technical issues, answering questions, and providing guidance on using the system.

d. Synthetic

User requirements:

1. User Account Management:

Users should be able to create, update, and manage their accounts, including changing passwords and updating personal information.

2. Book Search Functionality:

Users should have the ability to search for books by title, author, or genre.

3. Borrow and Return Books:

Users should be able to borrow books from the library and return previously borrowed books.

4. Feedback and Issue Reporting:

Users should be able to provide feedback, report issues, or report errors encountered in the system to help improve the user experience.

These user requirements focus on account management, book search capabilities, borrowing and returning books, and providing feedback for
continuous improvement of the system.

System requirements:

1. User Roles and Functions:


 The system must support at least two user roles: Users and Library Managers.
 Users should have functions for account management, book search, borrowing, returning books, and providing feedback.
 Library Managers should have functions for event management, user account management, report generation, and book management.
2. Relational Database Design:

The system should have a relational database design with at least four interrelated tables to store data efficiently.

Tables should include information about users, books, events, and other relevant data.

3. Interface and Output Design:

The system should have a user-friendly interface for users to interact with.

Output design should include clear and informative displays for search results, book details, and event information.

4. Data Validation:

The system should implement data validation to ensure data integrity and accuracy, including validation for user inputs during account management
and feedback submission.

5. Data Normalization:

The database should be normalized to reduce data redundancy and improve data consistency and integrity.

6. Effectiveness Assessment:

An assessment of the system's design should be conducted to evaluate its effectiveness in meeting user and system requirements.

These system requirements outline the necessary components and functionality of the online library management system, including user roles,
database design, user interface, data validation, and effectiveness evaluation.

2. Database design:
a. Design steps
1. Requirements Analysis:

Understand and document the user and system requirements for the online library management system.

Identify the specific needs of users, including account management, book search, borrowing, returning, and providing feedback.
Define the roles and responsibilities of different system users, such as Users and Library Managers.

2. Database Design:

Create a database schema that reflects the required tables and their relationships.

Design tables to store user data, book data, event data, and other relevant information.

Implement data normalization techniques to reduce redundancy and improve data integrity.

3. User Interface Design:

Design a user-friendly interface that allows users to easily navigate the system.

Create wireframes or prototypes to visualize the layout and flow of the system.

Consider the user experience (UX) by making sure that the interface is intuitive and responsive.

4. Functionality Design:

Define the functionality of the system based on user requirements.

Specify how users can create and manage accounts, search for books, borrow and return books, and provide feedback.

Define the functions available to Library Managers, such as event management, user account management, and report generation.

5. Data Validation and Security:

Implement data validation mechanisms to ensure that user inputs are accurate and within acceptable limits.

Incorporate security measures to protect user data and system integrity, including encryption and authentication.

6. Testing and Quality Assurance:

Develop test cases to validate the functionality and performance of the system.

Conduct thorough testing, including unit testing, integration testing, and user acceptance testing.
Address and resolve any identified issues or bugs.

7. Documentation:

Create comprehensive documentation that includes system specifications, database schema, user guides, and any other relevant information.

Ensure that documentation is easily accessible to users and developers.

8. User Training:

Provide training and support for users and Library Managers to help them effectively use and manage the system.

9. Deployment:

Deploy the online library management system to a production environment, making it accessible to users.

Monitor the system for any issues or performance concerns during the initial deployment phase.

10. Maintenance and Updates:

Establish a maintenance plan to address ongoing system updates, bug fixes, and enhancements.

Continuously gather user feedback and make improvements to the system based on user suggestions and changing requirements.

These design steps will help ensure that the online library management system is well-planned, user-friendly, secure, and capable of meeting the
needs of both users and administrators.

b. Entity-relationship Diagram
The Entity Relationship Diagram (ERD) part plays an extremely important role in designing the Database system for the Online Library system.

1. Entity and Attribute Identification: The ERD helps you identify entities in your system, such as books, authors, members, genres, and book
borrowings. It also specifies the attributes of each entity, such as book_id, author_name, member_email, and more.
2. Relationship Definition: The ERD illustrates the relationships between entities. For instance, it clarifies that each book has an author, each author
may write multiple books, and each book belongs to a specific genre.
3. Primary Key Definition: The ERD defines primary keys for each entity to ensure the uniqueness of each record in the data tables.
4. Support for Database Design: The ERD serves as the basis for database design. It helps you understand the database's structure and relationships
between data tables.
5. Support for Data Querying: The ERD allows you to easily determine how to query data from the database. By understanding the relationships
between entities, you can write complex SQL queries to retrieve specific information.
6. Support for Expansion and Maintenance: The ERD enables you to add new entities or make adjustments to the existing database easily. This is
essential for system expansion or changing data requirements.

c. Database Relational Model

The Relational Model of databases is indeed a crucial part of designing the five tables you've outlined earlier for a library management system. Let's
break down its importance in this context:

1. Structure and Organization: The Relational Model provides a structured way to organize data. It allows you to define tables (relations) and their
attributes (columns) clearly, ensuring that each piece of information has its designated place.
2. Data Integrity: By using keys, such as primary keys and foreign keys, the Relational Model ensures data integrity. Primary keys uniquely identify
each record in a table, while foreign keys establish relationships between tables, ensuring that related data is consistent and accurate.
3. Querying and Reporting: The model supports efficient data retrieval through SQL (Structured Query Language). You can easily write SQL queries
to extract specific information from the tables, making it essential for library operations like searching for books, checking availability, and
generating reports.
4. Normalization: The Relational Model encourages data normalization, which eliminates data redundancy and anomalies. In your library system,
this means that information about authors, genres, and members can be efficiently managed and updated without inconsistencies.
5. Scalability and Extensibility: The model allows you to expand your database as needed. If you decide to add more tables or incorporate additional
features into your library system in the future, the Relational Model can accommodate these changes with relative ease.
6. Data Consistency: By defining relationships between tables, you ensure that data is consistent across the system. For example, the relationship
between the "Books" and "Authors" tables ensures that an author's name is consistent across all books they've written.
7. ACID Compliance: The Relational Model adheres to ACID properties, which guarantee the reliability and consistency of database transactions. This
is crucial in a library system to prevent data corruption or loss during operations like book checkouts and returns.

In summary, the Relational Model is the foundation that underpins the design and functionality of the tables in your library management system. It
provides the necessary structure, relationships, and data integrity to effectively manage and retrieve information, making it an indispensable part of
database design in this context.
Member table:

Member_id Member code (PK) INT


Member_name Member name NVARCHAR(255)
Member_email Member email NVARCHAR(255)

Genre table:

Genre_id Genre code INT


Genre_name Genre name of book NVARCHAR(255)

Author table:

Author_id Author code INT


Author_name Author name NVARCHAR(255)
Phone_number Phone number NVARCHAR(20)

Book table:

Book_id Book code INT


Title Title of book NVARCHAR
Author_id Author code INT
Publication_year Publishing year INT
Available Books available BIT
Genre_id Genre code INT

BorrowedBook table:
Borrow_id Borrow code INT
Book_id Book code INT
Member_id Member code INT
Borrow_date Borrow date DATE
Return_date Return code DATE

Each data table will include columns representing various data fields, and these columns will be associated with the respective Primary Key within the
table to guarantee the uniqueness of each record. Furthermore, data tables will establish connections with one another through the use of foreign
keys, thereby upholding data integrity within the system.

The relational database model streamlines the management, retrieval, and manipulation of data tables, making these operations more
straightforward and precise. By having a meticulously designed and accurate database, the functional requirements of the Online Library system can
be effectively and precisely fulfilled.

Next, we will proceed to design the database for the online library system using SQL 2022 as the platform. With the aforementioned five tables, we
will be able to create these tables and perform data insertion operations, all while establishing primary keys for each table.
First we create 5 tables Users, Book, Booking, Payments and Orders according to the above command.

Second we will use the Insert command to add data to the tables for implementation show query

You might also like