Docsity

Database Design & Development - 1622, Assignments of Database Programming

Toggle sidebar
bg1
ASSIGNMENT 1 FRONT SHEET
Qualification
TEC Level 5 HND Diploma in Computing
Unit number and title
Unit 04: Database Design & Development
Submission date
Sunday, June 11, 2023
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Tran Anh Tuan
Student ID
GCD201675
Class
GCD1105
Assessor name
Phan Thanh Tra
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
Tuan
Grading grid
P1
M1
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Database Design & Development - 1622 and more Assignments Database Programming in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing Unit number and title Unit 04: Database Design & Development Submission date Sunday, June 11, 2023 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Tran Anh Tuan Student ID GCD Class GCD1105^ Assessor name Phan Thanh Tra 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 Tuan Grading grid

P1 M1 D

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date: Signature & Date:

  • Chapter 1. Statements os user and system requirements
      1. Overview about the Problem
      1. Requirements of the application
  • Chapter 2. Design the relational database system
      1. Analyse the requirements
      • 1.1. Methods of data management
      • 1.2. Application’s options
      • 1.3. System requirement specification
      1. Database design with explanations
      • 2.1. Entity Relationship Diagram
      • 2.2. Explanations Entity Relationship Diagram
  • Figure 1. Flat File Database
  • Figure 2. Hierarchical Database
  • Figure 3. Relational Database
  • Figure 4. ERD
  • Figure 5. Logical ERD
  • Figure 6. Authors and Books_Info............................................................................................................................................................
  • Figure 7. Books_Info and Departments
  • Figure 8. Books_Info and Records
  • Figure 9. Records and Borrowers
  • Figure 10. Borrowers and Books_Info......................................................................................................................................................

Chapter 1. Statements os user and system requirements

1. Overview about the Problem The management of the library at Greenwich University will be the main topic of this report. The standards, specifications, and future code execution methods will all be covered in this study. Universities typically have libraries, which makes them noticeable and simple to use. Also required are the CRUD actions, a list of which is provided below, in the program. 2. Requirements of the application CRUD actions:  The application must include CRUD actions, which will add, search, update, and delete borrowers as well as books o CREATE: Add books’ information, add new borrowers, and create records o READ: Search for books or records based on some specific information o UPDATE: Update a book or borrower’s information if needed o DELETE: Delete a book or a record if needed  Keep track of borrowing records and store books information  Provide a database to store records User Stories:  As the librarian o I want to create records that will contain the information from the book and the borrower so that I can easily manage the information of the books and borrowers. o I want to add more books to the shelf with specific information so that I can have more books for borrowers to lend. o I want to manage the books which stay on the shelf so that I can effortlessly manage the books in each department.

Figure 1. Flat File Database ADVANTAGES:  Every record is saved in one location.  Using different conventional office apps, easy to grasp and set.  For tiny databases, it is a good alternative.  It requires fewer components of hardware and software. DISADVANTAGES:  It is tougher to update the flat file database.  More difficult to modify the format of data.  In sophisticated queries, it is a bad database.  Redundancy and incoherence have been enhanced.

HIERARCHICAL DATABASE: A hierarchical database is the design of data items with a one-to-one connection. Hierarchical database models employ a tree structure that connects several different items to a principal record "owner," or "parent." Figure 2. Hierarchical Database ADVANTAGES:  Have various shapes and structures.  Structures upside-down information in a tree. (Enhanced overview of data)  Manages vast quantities of information.  Express information linkages.  A lot of kids per parent.  Distribute relationship data. Data.  Enhance the exchange of information.

ADVANTAGES:

Simplicity: DBMS is simpler than a hierarchical or network approach to a relationship-data model.  Structural Independence: The relational database is about data alone and not about structure. The performance of the model may be improved.  Easily use: DBMS is a very straightforward approach since tables comprising columns and rows are extremely natural and straightforward to grasp.  Query capacity: It helps prevent complicated database traversal in a high-level query language like SQL.  Data independence: The Relational Database Structure may be modified without any application changes.  Scalable: A database should be extended to increase its usefulness for a number of records or rows and for the number of fields. DISADVANTAGES:  Few relational databases contain boundaries that cannot be exceeded in field length.  Relational databases often get complex with growing data volumes and sophisticated relationships between data items.  Complex related database systems might result in isolated databases where data cannot be exchanged between systems. THE METHOD OF DATABASE MANAGEMENT WILL BE USED IN THE APPLICATION: After all the research about the methods of managing databases. I decided to use relational database management to apply for the application for library management. With the advantages that I mentioned earlier, I believed relational databases will be used to their fullest advantage in this problem.

1.2. Application’s options

As I chose library management, here are some activities that might take place in the application  The borrowing system for students to borrow books.  In records management, we can create, update or delete them if needed.  Manage books in the same department.  Manage books by authors.  Tables of statistical actions to manage the whole system.

1.3. System requirement specification

Below is a brief comparison between SQL Server and PostgreSQL Table 1. Comparison SQL Server and PostgreSQL SQL Server PostgreSQL Model Commercial database management system, built and maintained by Microsoft. Free and open-source relational database management system, maintained by PostgreSQL Global Development Group and its prolific community. Supported server operating Is restricted to Windows, and recently Linux. Seems to be more universal. It is widely available on multiple operating systems: FreeBSD, HP-UX, Linux, NetBSD, OpenBSD, OS X, Solaris, Unix, and Windows. Stored Procedure Uses Transact SQL and .NET languages. Has user-defined functions in proprietary language PL/pgSQL or with common languages like Perl, Python, Tcl, etc. Partitioning methods Tables can be distributed across several files (horizontal partitioning); sharding through federation. Declarative partitioning (by range or by list) since PostgreSQL 10.0. Concurrency Has underdeveloped concurrency and you can easily get various locked, blocked, and deadlocked reports in the log. Thus, the performance of the database, as well as the application, will be slower. Has a better concurrency management system. It handles very well the case where multiple processes can access and modify shared data at the same time. Scalability Offers compression out of the box but you have to implement it manually. Offers it for free and the entire process is automatic. Scriptability Is more driven through a GUI.^ Can be driven entirely from the command line. Replication Supports snapshot replication, transactional replication, and merge replication. Uses master-slave replication. In-memory capabilities Supports. Doesn’t support.

2. Database design with explanations

2.1. Entity Relationship Diagram

Figure 4. ERD

Figure 5. Logical ERD

ENTITIES RELATIONSHIP:

Books_Info and Authors: a book can be written by many authors as well as an author can write many books, so this is a many-to-many relationship. Figure 6. Authors and Books_Info

Books_Info and Departments: a book can only stay in one department as well as many books can stay in one department, so this is a one-to-many relationship. Figure 7. Books_Info and Departments

Records and Borrowers: a record when created will attach with one a book and a borrower as well as many borrowers can create records, so this is also a one-to-many relationship. Figure 9. Records and Borrowers

Borrowers and Books_Info: a record is created by a book and a borrower, which means the Records table turns into the relationship between the two, so this is a many-to-many relationship. Figure 10. Borrowers and Books_Info