Word 1
Word 1
Table of Contents...........................................................................................................................................1
I. Introduction................................................................................................................................................2
1. Project Overview...................................................................................................................................2
2. Problems and Solutions.........................................................................................................................2
3. Key Parts of the Assignment..................................................................................................................3
II. Development, Deployment, Operation & Maintenance............................................................................4
1. Development..........................................................................................................................................4
1.1 Database schema..............................................................................................................................4
1.2. User Interface..................................................................................................................................5
1.3. Design outputs (reports, visualizations) to present data to users in a meaningful way..................8
1.4. Implement data validation rules to ensure data accuracy and consistency during input..............14
1.5. Develop queries that can retrieve and manipulate data across multiple tables.............................22
1.6. Integrate query language into the system, allowing users to interact with the database..............28
2. Deployment..........................................................................................................................................34
2.1. Implement user authentication and authorization mechanisms to control access to the database.34
2.2. Develop a comprehensive backup and recovery plan to ensure data integrity during system failures. 36
3. Operations & Maintenance..................................................................................................................36
4. Testing..................................................................................................................................................37
5. Evaluation............................................................................................................................................37
5.1. Achievements................................................................................................................................37
5.2. Future Directions..........................................................................................................................37
III. Conclusion.............................................................................................................................................38
I. Introduction
1. Project Overview
This project involves developing an advanced Library Management System using C# WinForms (.NET Framework) in
Visual Studio 2022. The system aims to enhance and automate various library operations, providing an efficient way
to manage books, copies, members, and more. Key functionalities include:
=> Solution: Implement a streamlined interface for Book Management and Copy Management to efficiently handle
books and their individual copies, reducing manual effort and minimizing errors.
Book Loan and Return Tracking: Tracking book loans and returns manually can lead to discrepancies and lost data.
=> Solution: Automate the Borrow and Return processes with real-time updates and tracking to ensure accurate
records and timely returns.
Fee Management: Handling fines and fees for overdue books and other penalties requires accurate calculation and
record-keeping.
=> Solution: Integrate a comprehensive fee management system to calculate and record fees accurately, with a clear
interface for managing penalties and payments.
Curriculum and Semester Management: Managing curriculum details and semester information requires a structured
approach.
=> Solution: Develop modules to handle curriculum and semester details, ensuring up-to-date and accurate
information for academic management.
User Access and Security: Ensuring that only authorized users can access and manage different parts of the system is
crucial for maintaining security.
=> Solution: Implement a user login system with role-based access controls to manage permissions and protect
sensitive data.
Book Reservation: Allowing members to reserve books for future borrowing ensures availability and efficient book
management.
=> Solution: Integrate a Reserve function to enable members to book books in advance, enhancing the overall
management of book availability.
Book and User Management: Develop modules for book management, including categorization and tracking, as well
as user management for students and staff.
Loan and Return System: Design and implement features to handle book loans, returns, and fee management,
ensuring smooth operation of these processes.
Curriculum and Semester Tracking: Create modules for managing curriculum programs and semester information,
aligning with academic requirements.
Access Control and Security: Implement user authentication and authorization to ensure that system access is
controlled and secure.
II. Database Design
1. Entity-Relationship Diagram (ERD)
The ERD illustrates the relationships between the entities in the LMS. The primary entities are Member,
Registration, Book, Copy, CirculatedCpy
* Normalization
To ensure the database is efficient and free from redundancy, we normalize it to the third normal form (3NF).
First Normal Form (1NF): Ensure that all tables have primary keys, and all columns contain atomic values.
Second Normal Form (2NF): Ensure all non-key attributes are fully functionally dependent on the primary key.
Third Normal Form (3NF): Ensure that all attributes are only dependent on the primary key and not on other non-key
attributes.
3. Implementation Details
Here I will use SQL server to design this system. First, we need to download Microsoft SQL Server and Microsoft SQL
Server Management Studio to the device to be able to use it.
First we need to Create and Use database. Here I will name my database Library
Book:
CirculatedCopy
Member
Reservation
Copy
This database is designed with careful structure and security rules to ensure data consistency and security. Microsoft
SQL Server provides powerful features for data management, data storage, and user authentication. This helps your
application operate efficiently and securely.
4. User Interface Design
The user interface (UI) is crafted to be intuitive and user-friendly, ensuring that users can easily navigate and access
various functionalities. The primary components of the UI include:
1. Main Page:
o Serves as the central hub for navigating the system.
o Provides options to access various functionalities such as Book Management, Member Management,
Borrowing, Returning, User Roles and Permissions, Statistics, and Reservations.
2. Book Management Page:
o Displays a list of all books with options to add, edit, delete, and view book details.
o Includes search functionality to filter books by title, author, ISBN, and genre.
3. Member Management Page:
o Lists all members with options to add, edit, delete, and view member details.
o Features search functionality by member name and email.
4. Borrow Page:
o Manages borrowing transactions.
o Includes options to record new borrowings, view borrowing history, and manage overdue items.
5. Return Page:
o Manages the process of returning borrowed items.
o Includes options to handle returns, update return records, and check for overdue items.
6. Statistic Page:
o Provides insights into library operations and performance.
o Displays statistical data related to books, members, borrowing trends, and other relevant metrics.
7. Reservation Page:
o Handles the management of academic semesters related to library operations.
o Includes options to add, edit, and view semester details.
7. Evaluation
7.1. Verification
Functionality Review: Ensure all features, such as book search, loan management, and
reporting are included in the design.
Requirement Mapping: Cross-check user and system requirements with
design specifications to ensure completeness.
7.2. Validation
Data Accuracy: Check sample data for correct formats and values.
Data Consistency: Ensure relationships between tables are consistent (e.g., a loan must
reference an existing book and patron).
Performance Testing
Simulated Load: Test system performance under simulated user loads, checking
response times for search queries and data retrieval.
Optimization Checks: Identify slow queries and optimize them for better performance.
Evaluation and Improvement
Weakness Analysis: Identify any design weaknesses or performance bottlenecks.
Suggested Improvements: Propose enhancements like better indexing, query
optimization, or additional features based on feedback.
7.3. Testing
Order Request Expected Actual Results Action Taken
Results
1 Insert a new A new record is added INSERT INTO [dbo].[Book] (title,
book added to the successfully. authors, publisher)
Book table with VALUES ('Dune', 'Frank Herbert',
the provided 'Chilton Books');
details.
2 Update the Update Update UPDATE [dbo].[Book]
book successfully successfully SET publisher = 'Secker &
Warburg'
WHERE bookNumber = 3;
3 DELETE Delete It is not exists DELETE FROM [dbo].[Book]
FROM [dbo]. successfully => failed WHERE bookNumber = 6;
[Book]
WHERE
bookNumber =
6;
4 Find a book Find successfully A list of books SELECT * FROM [dbo].[Book]
with the title WHERE title = '1984';
"1984" is
returned
Update Member update Member update UPDATE [dbo].[Member]
member successfully. successfully. SET address = '123 Oak St'
5 WHERE memberNumber = 2;
6 Delele Delete Unable to delete DELETE FROM [dbo].[Member]
member successfully because it is WHERE memberNumber = 4;
currently borrow
7 Search for list of members list of members SELECT * FROM [dbo].
members with with the name with the name [Member]
the name "Le "Le Anh Tuan" is "Le Anh Tuan" is WHERE name = 'Le Anh Tuan';
Anh Tuan". returned. returned.
8. Schema details
Book:
CirculatedCopy
Member
Reservation
Copy
Form return:
Form reserve:
1.3. Design outputs (reports, visualizations) to present data to users in a
meaningful way
In addition to designing functional forms for database operations, it's crucial to ensure that data is
presented in a clear and effective manner. The system should be crafted to deliver insightful outputs
through reports and visualizations, which will aid users in interpreting and analyzing data more
meaningfully.
Reports and Visualizations:
Reports: Incorporate features to generate and display detailed reports based on the data from
your tables. These reports can include summaries, statistics, and trend analyses to provide
valuable insights.
Visualizations: Utilize graphical elements such as charts and graphs to visually represent data
trends and distributions. WinForms controls like Chart can be used to create various types of
charts—bar, line, pie, etc.—depending on the data and the insights required.
Dynamic Data Presentation:
Form Design: Each form in the application should be designed to dynamically display data
relevant to its function. For example, when users access a particular form, it should present data
from the corresponding database table, allowing for clear viewing, editing, or analysis.
User Interaction: Incorporate features like filtering, sorting, and searching to enhance the user
experience, enabling users to efficiently find and interact with the data they need.
By integrating these design elements, users will have a more intuitive and informative experience while
interacting with the database through the application. I will now demonstrate some forms from my project
that showcase how data is retrieved from the database and presented effectively.
Form manage books:
1.4. Implement data validation rules to ensure data accuracy and consistency
during input
With these designs in place, users will enjoy a robust and intuitive interface for interacting with the
database. Each form is meticulously crafted to display data clearly and enable smooth operations, making
it easy for users to view, edit, and analyze information. The integration of reports and visualizations will
enhance data interpretation and aid in informed decision-making. As development continues, regular
testing and adjustments will ensure that the interface meets user needs effectively and remains user-
friendly.
In form manage books:
As you can see, there’s no room for a row with blank publisher, authors or title
Here is the validation of number of the books borrowed by 1 person, is not bigger than 5
1.5. Develop queries that can retrieve and manipulate data across multiple tables
In this application, I utilize SQL Server for the development and management of the system. When
working with a database that contains interconnected tables, it is essential to craft queries that efficiently
retrieve and manipulate data across these tables. SQL Server offers powerful features for creating
complex queries that can merge data from various sources. By employing SQL joins, subqueries, and
aggregate functions, you can extract valuable information, perform advanced searches, and generate
detailed reports. This capability to handle complex data interactions is crucial for ensuring data
consistency and delivering insightful information to users within the application.
In the following section, I will present SQL queries that illustrate how to retrieve and manipulate data
across multiple tables within my library management system (LMS_DB). These examples will
demonstrate the use of joins, subqueries, and aggregate functions to work with the interconnected tables
in the database.
Retrieve all books along with their copies and the members who borrowed them:
Get a list of all members who have overdue books along with the fine amount:
Find the total number of books borrowed by each member
Retrieve the details of books that are currently reserved
Get a summary of fines for overdue books for each member
List all books along with the number of copies available and their prices
Retrieve a list of all books borrowed by a specific member, including borrow and return dates:
1.6. Integrate query language into the system, allowing users to interact with the
database.
1.6.1. Identify the need for a query language to enable user interaction with the database system.
A query language is crucial for interacting with a database system for several reasons:
Data Retrieval: It provides a structured method for users to request and access specific data
based on defined criteria, including sorting and aggregating information to meet their needs.
Data Manipulation: Users can perform essential operations like inserting, updating, and deleting
records. A query language offers precise commands for these tasks, allowing for effective data
management.
Data Definition: It enables users to create and modify the database schema, including tables and
indexes. This capability ensures that the database structure can be adapted to evolving
requirements and new data types.
Data Control: It facilitates the management of access permissions and user roles. Through a
query language, administrators can control who has access to certain data and what operations
they are permitted to perform.
1.6.2. Evaluate different query languages (e.g., SQL) for suitability based on the database system's
capabilities and user needs.
When evaluating different query languages, SQL (Structured Query Language) is the most widely used
and recognized language for relational databases. Here’s an evaluation of SQL and other query languages:
SQL (Structured Query Language)
- Suitability:
Learning Curve: Although SQL is straightforward for basic queries, mastering advanced features
and optimization techniques can be complex.
Performance: Query performance can vary based on how queries are written and the database
design. Efficient indexing and query optimization are essential for performance.
NoSQL Query Languages
- Suitability:
Flexibility: NoSQL databases like MongoDB, Cassandra, and Couchbase offer flexibility in data
modeling, supporting unstructured or semi-structured data. Their query languages are designed to
work with different data models like document, key-value, column-family, and graph.
Scalability: NoSQL databases are often used in scenarios requiring horizontal scalability and high
availability. They are suitable for large-scale applications with rapidly changing or large volumes
of data.
- Considerations:
Lack of Standardization: Unlike SQL, NoSQL query languages are not standardized and can vary
significantly between different databases. This can lead to challenges in migrating between
NoSQL systems or integrating them with SQL-based systems.
Complex Queries: Some NoSQL query languages may not support the same level of complex
querying and transactions as SQL. For instance, MongoDB's query language is designed for
document-based queries but may not be as efficient for relational joins.
1.6.3. Integrate the chosen query language functionality into the system, allowing users to formulate and
submit queries.
In here, I use ADO .NET for interacting with the database
Create DAO:
Create DAO classes:
2. Deployment
2.1. Implement user authentication and authorization mechanisms to control access
to the database.
To manage database access effectively, establish robust authentication and authorization
mechanisms. Begin by implementing secure login processes to validate user identities.
Incorporate authentication libraries and frameworks to manage secure password storage and
validation. Define roles and permissions to control access to specific data and functionalities,
ensuring that users can only access or perform actions appropriate to their roles. Utilize role-
based access control (RBAC) to enforce these permissions. Integrate these security measures
seamlessly with your application's security policies to ensure a secure and controlled
environment.
About connecting to the database, I use the connectionString in App.config to config for Entity
Framework:
The plan I use includes:
Backup Strategy: Implement regular backups to capture the latest state of the database.
For instance, saving a .bacpac file daily ensures that you have a recent snapshot of your
data. This format is beneficial for both backup and migration purposes.
Backup Types: Utilize a combination of full, differential, and transaction log backups. A
full backup captures the entire database, while differential backups include only changes
since the last full backup. Transaction log backups ensure that you can restore the
database to a precise point in time.
Storage: Store backups in a secure and reliable location. Consider using both on-site
storage and off-site solutions such as cloud storage to protect against physical damage or
theft.
Recovery Testing: Regularly test backup files to ensure they are intact and that the
recovery process works as expected. Testing should include restoring backups to a
staging environment to verify data integrity and completeness.
Documentation: Document the backup and recovery procedures, including steps for
restoring data and contacts for support. Ensure that the documentation is up-to-date
and accessible to relevant personnel.
Monitoring: Implement monitoring to alert you of backup failures or issues. This ensures
that any problems are addressed promptly to avoid potential data loss.
By incorporating these elements into your backup and recovery plan, we can maintain data
integrity and minimize downtime in the event of system failures.
3. Operations & Maintenance
3.1. Design and execute queries to extract relevant data from the database
In this section, I use ADO .NET for easier and clearly approach from application to the database.
For example:
This query is used for adding the book to the ReturnBook table, so it’s very easy to understand.
It will be use in this:
This is the CRUD operations
It will later be use in Form Book Management:
In conclusion, the systematic approach to extracting data, analyzing it, and generating management
reports ensures that key insights are effectively communicated to support informed decision-making. By
designing precise queries, performing thorough data analysis, and presenting clear and actionable reports,
the system provides valuable information that drives strategic planning and operational improvements.
Continuous refinement and feedback integration will further enhance the accuracy and relevance of the
reports, ultimately contributing to more effective management and organizational success.
3.2. Reports
The statistic window:
The number of times that a student returned books late over time:
Which month students borrow books mostly
4. Testing
In this section, I will perform 7 test cases to evaluate the system. Each test case is designed to assess a
specific function of the system to ensure that it meets the requirements.
5.2. Fixing
Upon completing the project, I self-assessed and recognized that while the project has its strengths, there
are areas for improvement. If time and conditions permit, the following enhancements would be pursued:
Develop a Specialized Information Portal: Create a dedicated portal where library staff can easily post
announcements, replacing the current practice of posting notices on the library door. This portal would
allow students to access and read announcements conveniently, saving time and increasing efficiency.
Implement Data Backup: Establish a robust backup system to recover deleted data if necessary.
Enhance Security: Improve security measures by implementing dynamic user permissions for different
user groups.
Monitor User Actions: Introduce features to track user activities related to the database.
Automatic Notifications: Implement a function to automatically send email reminders to users when
their book loans are overdue, along with other relevant notifications.
These enhancements will address current limitations and further optimize the library management system.
6. Documentation
In this section, I will show you the guidelines of this application for your easier approach:
Form main:
Form return:
Form reserve:
III. Conclusion
In conclusion, the development of the library management system(LMS) using C# Windows Form has
been a significant achievement throughout our internship at the school library. This project has provided
us with a robust platform to streamline and enhance various library operations, including book
management, student records, staff administration, and transaction handling.
By leveraging WinForms, I were able to create a user-friendly interface that simplifies complex processes
and improves the overall efficiency of library management. The system's capabilities, such as real-time
data updates, comprehensive reporting, and seamless integration with the database, have greatly
contributed to the library's operational success.
This internship has not only allowed us to apply theoretical knowledge in a practical setting but has also
provided invaluable experience in software development, project management, and problem-solving. The
successful implementation of this system reflects our team's dedication and technical skills, and it stands
as a testament to the potential of software solutions in enhancing institutional operations.
Overall, the library management system I developed will continue to serve the school library effectively,
offering a reliable and efficient tool for managing library resources and supporting the needs of students
and staff alike.