1. Trang chủ
  2. » Công Nghệ Thông Tin

Assignment 2 database (1622) Greenwich

36 556 10

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 36
Dung lượng 9,92 MB
File đính kèm ASM2_1622.rar (9 MB)

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Note: Nếu muốn support C, C#, Networking, Database, project web, 1633, security_zalo 0962.986.805 or fb https://www.facebook.com/profile.php?id=100080073517431. Assignment 2 môn Database (1622) đại học Greenwich, bài luận đạt điểm Merit năm 2021, có trích dẫn học thuật chuẩn Harvard, liên hệ với mình nếu bạn muốn support với mức giá phù hợp. Develop the database system, Final Mockup of the application, Queries to create database with results, Security, Produce queries, Advanced query, Evaluate the effectiveness of the database solution, Test case, Flowchart to show how the system works

Trang 1

ASSIGNMENT 2 FRONT SHEETQualification TEC Level 5 HND Diploma in Computing

Unit number and title Unit 04: Database Design & Development

Student declaration

I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism I understand thatmaking a false declaration is a form of malpractice

Student’s signature Grading grid

Trang 2

2.1

Signature & Date:

Trang 3

Table of Contents

Introduction 1

1 Develop the database system 1

1.1 Final Mock-up of the application 1

1.2 Queries to create database with results 7

1.3 Data in database system 12

1.4 Security 14

2 Produce queries 16

2.1 Insert into, delete, update 16

2.2 Select 18

2.3 Advanced query 19

2.4 Evaluate the effectiveness of the database solution 24

3 Test the system 24

3.1 Test case 24

3.2 Flowchart to show how the system works 25

Conclusion 32

Trang 4

In this assignment, a database of online library system has been deployed on SQL serverbased on query language This database provides, allows editing, deleting, and insertingnecessary information to maintain the library such as personal information of members,staff, login, book information, loan vouchers It is also designed with statistics to helpadministrators easily manage and know the status of the library Here, a complete mock-upalong with a relational database has also been designed and displayed Testing is alsoconducted to fix bugs Finally, a technical document was developed to guide users in usingthis system based on the mock-up

1 Develop the database system

1.1 Final Mock-up of the application

Based on the old mock-up designs in the previous assignment, a full blueprint of the system wasbuilt This update provides new functions for querying statistics for library management

Figure 1: Login interface

Trang 5

Figure 2: Main interface for staff

Figure 3: Information of staff

Trang 6

Figure 4: CRUD (Create/Read/Update/Delete) information of book (part 1)

Figure 5: CRUD information of book (part 2)

Trang 7

Figure 6: View information of readers

Figure 7: CRUD borrowing

Trang 8

Figure 8: Borrow Detail

Figure 9: Return Book

Trang 9

Figure 10: Statistic activity

Figure 11: Main interface for reader

Trang 10

Figure 12: Information of reader

1.2 Queries to create database with results

Based on the designs approved by the CEO, a database system will be generated by the

query that creates the table They will be displayed with the results once run

Figure 13: Query to create database ASM and table Member

Trang 11

To build a database system, a database must be created in SQL Server, ASM is the databasecreated and used to store this library system The tables will be created by the queries sothat the field names, data types, data validation are designed.

Figure 14: Table Member

Figure 15: Query to create table Staff, Login and Author

Figure: Table Staff

Trang 12

Figure 16: Table Login

Figure 17: Table Author

Figure 18: Query to create table Book and Borrow

Trang 13

Figure 19: Table Book

Figure 20: Table Borrow

Figure 21: Query to create table BorrowDetail and ReturnBook

Trang 14

Figure 22: Table BorrowDetail

Figure 23: Table ReturnBook

Figure 24: Final diagram

Trang 15

1.3 Data in database system

The system will import the existing data, because the new system is built and the amount ofdata is large, the data will be imported through the built-in tool on the SQL Server system,

so these input data will not be available using query language

Figure 25: Table Login

Figure 26: Table Borrow

Figure 27: Table Member

Trang 16

Figure 28: Table Author Figure 29: Table Staff

Figure 30: Table Book

Figure 31: Table ReturnBook

Figure 32: Table BorrowDetail

Trang 17

1.4 Security

Figure 33: Query to create role Staff to login

Trang 18

For login, 2 permissions are set as Staff and Member roles For staff, grant select, update,

delete, alter permissions for all tables, in the permission there are 2 accounts of staff

For the Member role, grant update permission in the members table for accounts that havethis permission.

These two images are the login screen, the login

account has the role of Member, so it only has

permissions in the member table

Trang 19

2 Produce queries

2.1 Insert into, delete, update

Users can manipulate operations such as insert, delete, update on the database With

Insert, user uses Insert into to add data to the Borrow and BorrowDetail tables

Figure 33: Query to insert

Figure 35: Result at Borrow

Figure 36: Result at BorrowDetail

Trang 20

A title is deleted at Book and result

Figure 37: Query to delete

Figure 38: Result at Book

With update, the record in the Author table with ID = 126 will be edited Lastname and the

result

Figure 39: Query to update

Figure 40: Result at Author

Trang 21

2.2 Select

Figure 41: Query to select Students' borrowing times and result

Figure 42: Query to select Borrowed book rating and result

Figure 43: Published 2010 to present and result

Trang 22

Figure 44: Query to select number of times staff lent books and result

2.3 Advanced query

Figure 45: Query to create procedure Check_borrow_activity and result

Trang 23

Figure 46: Query to create procedure CheckOperation

Trang 24

Figure 47: Query to create procedure All_Borrow

Trang 25

Figure 48: Query to create procedure check status and cost in Borrow and result

Trang 26

Figure 49: Query to create table trigger tg_updel

Figure 50: Test and result of trigger tg_updel

Trang 27

2.4 Evaluate the effectiveness of the database solution

Based on the requirements of the online library, important tables have been built that are

Login to log in, distinguish between members and employees, Member to build basic

information of members such as name, ID, date birth, phone number; Staff includes ID

information, name of staff; basic information of the book and the corresponding author's

name, price, and quantity Regarding the loan slip, 3 tables are built to take on 3 different

roles, Borrow displays information of the borrower, borrowing date, return date,

BorrowDetail records details of the type of book, ReturnBook records information when

returning books The datavalidation is also set up so that the information entered is correct,

the information in the secondary table will be edited or deleted if the information in the

main table is edited or deleted Essentially, these tables make the library easy to operate In

addition, users can add, edit, delete, read data Next, statistical operations use select, a

procedure that makes it easy for managers to control library activities Trigger helps to save

Member information when updating or deleting records A user-friendly mock-up that has

been built along with a detailed instruction on how it works is necessary for the users to

fully understand the system's features and usage

In short, the system has met most of the user's needs

3 Test the system

3.1 Test case

To see performance, find errors and fix them, a test plan is essential for the database

Table 1: Test plan

ID

Format_PhoneNumber PhoneNumber

check of Table

Member

2 On update cascade of Update ID of Update Staff set ID=’G113’ At IDstaff = ‘G111’ of Login

Trang 28

4 Procedure Execute 3 Top 3 types of books with the

command

update,delete ('GCH012','Hoang','Anh','2002- activities

select table

'2003-1-1' where ID ='GCH012'

delete from Memberwhere ID = 'GCH012'

Table 2: Test Result

Format_PhoneNumbercheck of Table Member

IDstaff in Login

Check_Borrow_activity March to June 2021

CheckOperation

3.2 Flowchart to show how the system works

In order for users to understand the system, a technical document to guide how to use the

system has been developed

Trang 29

Figure 51: Login interface

Users will choose the Staff or Member role and enter their personal account and password

to log in

Format of Account is email of university For example: hoangnam@fe.edu.vn

Trang 30

The main interface of the staff is displayed with 5 options, click to select the correspondingfunction With options 1, 3, 4, users can search for IDs to update, delete, and insertinformation of objects For option 2, the user can only view the information Format ID ischar (4), ‘G[0-9][0-9][0-9] For example: G111

Figure 53: Option 1 (part 1)

Figure 54: Option 1 (part 2)

Trang 31

Format Quantity, Cost is >0, Publication Year < present

Figure 55: Option 2

Figure 56: Option 3

Trang 32

Figure 57: Option 4 (part 1)

Figure 58: Option 4 (part 2)

Trang 33

Figure 59: Option 4 (part 3)

Format Status is Good or Bad.

Trang 34

Users can use 9 different options to view statistical information, for option 5, 2 time pointsmust be entered including month and year of each landmark for statistics, for option 6, thenumber must be entered.

For member accounts, users must enter personal information to proceed with borrowingbooks Some of the formats are ID: 6 characters and follow the pattern G_H[0-9][0-9][0-9].For example: GCH001 The date of birth is less than the current date, the phone numberconsists of 10 digits from 0-9

Figure 61: Member interface

Figure 62: Information of member

Trang 35

In this assignment, a basic database has been built for an online library system of FPTUniversity, all necessary tables along with statistical operations, adding, editing and deletinghave been built in a query language on SQL server The system grants permissions for 2user roles, Staff and Member, basically, the system has fully met the needs of users Theinterface is designed to be simple but full of options needed for library management andstatistics for library development In the future, the database will be expanded and addmany new statistical queries for users

32

Trang 36

Index of comments

2.1 You have completed the ASM 2 report The primary sections of the P-criteria include:

Building interfaces.

Creating simple to complex manipulations and queries statements (including triggers) and system testing

by primary test cases.

Building complete user documentation.

You also made the database security mode by delegating user permissions on the database However, as explained in the theoretical lecture, this user delegation needs to be done at the application layer, when user delegation at the database management system only applies to users who design and administer the database Whether You already have an evaluation of the database, but you only evaluated the effectiveness of the database design option, did not mention future improvements.

Ngày đăng: 28/03/2022, 12:45

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w