0% found this document useful (0 votes)
23 views

Database Design

Uploaded by

reagan omondi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Database Design

Uploaded by

reagan omondi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Chapter 1 INTRODUCTION 1.

1 Database management system:

A database management system (DBMS) is system software for creating and managing
databases. The DBMS provides users and programmers with a systematic way to create,
retrieve, update and manage data. A DBMS makes it possible for end users to create, read,
update and delete data in a database. The DBMS essentially serves as interface between the
database and end users or application programs, ensuring that data is consistently organized
and remains easily accessible. The DBMS manages three important things: the data, the
database engine that allows data to be accessed, locked and modified – and the database
schema, which defines the database’s logical structure. These three foundational elements help
provide concurrency, security, data integrity and uniform administration procedures. Typical
database administration tasks are supported by the DBMS include change management,
performance monitoring/tuning and backup and recovery. Many database management systems
are also responsible for automated rollbacks, restarts and recovery as well as the logging and
auditing of activity.

The DBMS is highly beneficial for offering a centralized view of data, accessible by multiple
users from various locations in a controlled manner. It can restrict what data the end user can
see and how they can view it, allowing for multiple views of a single database schema. End
users and software programs do not need to know the physical location of the data or the type
of storage media it resides on, as the DBMS manages all data requests.

SQL is an application-specific Programming language intended for stream processing in a


relational data stream management system (RDBMS) or for managing data stored in a relational
database management system (RDBMS). Compared to previous read/write APIs

Similar to SAM or VSAM, SQL has two primary benefits: Initially, it presented the idea of

obtaining numerous records with a single command; also, it removes the requirement to provide

methods for accessing a record, such as using an index or not.

Initially founded on tuple relational algebra and relational algebra

1.3 Using XAMPP for Development


Developed by Apache Friends, XAMPP is a free and open source cross-platform web server
solution stack bundle that mostly consists of MariaDB and the Apache HTTP Server.
Cross-Platform (X), Apache (A), MariaDB (M), PHP (P), and Perl (P) are the acronyms for these
terms. It is an incredibly easy-to-use, lightweight Apache installation that helps developers set
up a local web server for testing and deployment. An extractable file contains the server
program (Apache), database (MariaDB), and scripting language (PHP) required to set up a web
server. The goal of this project is to create an online registration system for ITACS
events.Innovative Technical Association for Computer Science is referred to as ITACS.
It only addresses technical events, which is beneficial.

THREE LAYER DESIGN

Physical Level:

Also referred to as Internal Level, Physical Level explains the actual physical storage structure
of data in a database.

• This stage is really near to actual data storage.


• It is kept in bits at the lowest level, with the physical addresses on the

auxiliary storage medium.

• It can be read as files at the highest level.

• The different sorts of stored data are defined by the internal schema. It makes use of tangible
data.

prototype.

2. Conceptual Amount:

• Conceptual level explains the overall database structure for a set of

consumers.

• Another name for it is the data model.

• Conceptual schema serves as a representation of the database's whole contents.

• Everything needed to build this schema is contained in it.

3. External Level: •

External level is related to the data which is viewed by individual end users. • This level
includes a no. of user views or external schemas. • This level is closest to the user.

NORMALIZATION:

First normal form (1NF):

An attribute (column) of a table is not allowed to have more than one value, according to this
rule. Only atomic values should be stored there.

2) Second normal form (2NF):

If both of the following are true, a table is said to be in 2NF.


• The table is in First Normal Form, or 1NF.
• No non-prime characteristic depends on the appropriate subset of a table's candidate key.
• A non-prime attribute is one that is not present in any candidate key.

3) Third Normal Form (3NF):

If both of the following are true, a table design is considered to be in 3NF.


Table needs to be in 2NF.
• Non-prime attribute's transitive functional dependence on any super key

Requirement specifications

Chapter 2

2.1 Software Necessity


Technology: XAMPP, Java, and JDBC.
My SQL is the database.
The Notepad++ runtime environment.
Apache 9.0 Tomcat is the web server.
System software: Windows XP.
Internet Explorer 11 is the browser used.

2.2 Hardware Conditions


CPU: Intel Core i3 fifth generation and higher
Storage Device: 1024 MB
Memory: 2048 MB

2.3 Concerning Connectivity


Establish a MySQL database locally

Utilizing Localhost Server, connect MySQL.

Let me first explain what PHPMyAdmin is. It is a control panel where you may administer your
self-created database. Go to localhost/PHPMyAdmin in your browser window or select "Admin"
from the XAMPP user interface.All that was created when you first installed XAMPP was the
username; you now need to set a password for it on your own.

Proceed to Change Admin Password by clicking Edit Privileges, enter your password there, and
save it. This password must be kept in mind since it will be needed to access your database.
Build a Database

Go back to the phpmyadmin homepage now. To create a new database, click the New button.
Name your database in the new window according to your needs. Choose utf8_general_ci as
the Collation now, and it will handle all of our queries and data. Your database will now be
generated when you click on Create.

Make a folder under htdocs.


Now, find the folder (typically c:/xampp) where you installed XAMPP and open the htdocs folder.
Within c: /xampp/htdocs/, create a new folder and give it a name. Web files will be stored in this
location. Why did we create the htdocs folder? The folders in htdocs are used by XAMPP to run
and execute your PHP websites.

3.1 RELATION MAPPING

in Chapter 3 of Database Design

STEP 1:

Create a relation R in the ER schema that contains all of the basic properties of each regular
(strong) entity type E. Only the composite attribute's simple component attributes should be
included. Select one of E's essential characteristics to serve as R's principal key.

STEP 2:

Create a relationship R and include all simple attributes (or simple components of composite
attributes) of the attributes of R for each weak entity type W in the ER schema with owner entity
type E.

Step 3:

Find the relations S and T that match the entity types taking part in each binary 1:1 relationship
type R in the ER model. Select a relationship, let's say S, and add the primary key of T to S as a
foreign key.
Step 4
: Find the relation S that reflects the participating entity type at the N-side of the relationship
type for each regular binary 1: N relationship type R.

Step 5:

Create a new relation S to represent each binary M:N relationship type R.


The primary keys of the relations that reflect the participating entity types should be included in
S as foreign key attributes. Their combination will create the main key of S, which has attribute

STEP 6: For each multivalued attribute A, create a new relation R. This relation R will include an
attribute corresponding to A, plus the primary key attribute K—as a foreign key in R—of the
relation that represents the entity type or relationship type that has A as an attribute

. STEP 7:

For each binary relationship type R, where n > 2, create a new relation S to represent R. Include
as foreign key attributes in S the primary keys of the relations

RELATIONS
CRETION OF TABLES

CREATE TABLE Users (


User_ID INT AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
Contact VARCHAR(15),
Dob DATE NOT NULL,
Email VARCHAR(100) UNIQUE NOT NULL,
Password VARCHAR(255) NOT NULL
);
CREATE TABLE Authors (
Author_ID INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(100) NOT NULL,
Bio TEXT,
Nationality VARCHAR(50)
);

CREATE TABLE Books (


ISBN VARCHAR(13) PRIMARY KEY,
Title VARCHAR(255) NOT NULL,
Cover_page_description TEXT,
Author_ID INT,
Genre VARCHAR(50),
Price DECIMAL(10, 2) NOT NULL,
FOREIGN KEY (Author_ID) REFERENCES Authors(Author_ID)
);

CREATE TABLE Order_Details (


Order_Detail_ID INT AUTO_INCREMENT PRIMARY KEY,
User_ID INT,
Book_ISBN VARCHAR(13),
Quantity INT NOT NULL,
Price DECIMAL(10, 2) NOT NULL,
Order_Date DATETIME DEFAULT CURRENT_TIMESTAMP,
Receipt_number BIGINT AUTO_INCREMENT,
Mode_of_payment ENUM('rtgs', 'cheque', 'other') NOT NULL,
FOREIGN KEY (User_ID) REFERENCES Users(User_ID),
FOREIGN KEY (Book_ISBN) REFERENCES Books(ISBN)
);
CREATE TABLE Reviews (
Review_ID INT AUTO_INCREMENT PRIMARY KEY,
Book_ISBN VARCHAR(13),
User_ID INT,
Rating INT CHECK (Rating >= 1 AND Rating <= 5),
Comment TEXT,
FOREIGN KEY (Book_ISBN) REFERENCES Books(ISBN),
FOREIGN KEY (User_ID) REFERENCES Users(User_ID)
);

CREATE TABLE Favourite (


Favorite_ID INT AUTO_INCREMENT PRIMARY KEY,
User_ID INT,
Book_ISBN VARCHAR(13),
FOREIGN KEY (User_ID) REFERENCES Users(User_ID),
FOREIGN KEY (Book_ISBN) REFERENCES Books(ISBN)
);

CREATE TABLE Suppliers (


Supplier_ID INT AUTO_INCREMENT PRIMARY KEY,
CompanyName VARCHAR(100) NOT NULL,
Contact_Person VARCHAR(100),
Email VARCHAR(100),
Phone VARCHAR(15),
Address TEXT,
Book_ISBN VARCHAR(13),
Price DECIMAL(10, 2),
FOREIGN KEY (Book_ISBN) REFERENCES Books(ISBN)
);

DELETION AND EDITING


UPDATE Order_Details
SET Quantity = 3, Price = 59.97
WHERE Order_Detail_ID = 1;

DELETE FROM Order_Details


WHERE Order_Detail_ID = 1;

INSERT INTO Order_Details (User_ID, Book_ISBN, Quantity, Price,


Mode_of_payment) VALUES
(1, '9780747532743', 2, 39.98, 'rtgs');

Chapter 4 4.1

IMPLEMENTATION

A database management system handles the requests generated from the SQL interface,
producing or modifying data in response to these requests. This involves a multilevel processing
system. Fig .4.1 DBMS Execution and Parsing level structure processes the SQL submitted by
the user or application. Parser: The SQL must be parsed and tokenized. Syntax errors are
reported back to the user. Parsing can be time consuming, so good quality DBMS
implementations cache queries after they have been parsed so that if the same query is
submitted again the
cache copy can be used instead. To make the best use of this most systems use placeholders
in queries, like : Executer: This takes the SQL tokens and basically translate it into relational
algebra. Each relational algebra fragment is optimized, and the passed down the levels to be
acted on.

User:
The concept of the user is required at this stage. This gives the query context, and also allows
security to be implemented on a per-user basis.

Transaction:
The queries are executed in the transaction model. The same query from the same user can be
executing multiple times in different transactions. Each transaction is quite separate. Tables:
The idea of the table structure is controlled at low level.

Table cache:
Disks are slow, yet a disk is the best way of storing long-term data. Memory is much faster, so it
makes sense to keep as much table information as possible in memory. The disk remains
synchronized to memory as part of the transaction control system.

Disks:
Underlying almost all the database system is the disk storage system. This provides storage for
the DBMS system tables, user information, schema definition, and the user data itself. It also
provides the means for transaction logging

4.2 CREATION OF TABLES:

BOOK

creates a table with the following columns: price, pub name, year, title, and constraint bpk
primary. The primary keys are B_id and constraint cpk.

key(pub_name);

AUTHOR

make a table with the following columns: Author(Name varchar(25), Address varchar(25),
Book_id numeric(15), constraints afk

On remove cascade, foreign key (Book_id) references Book (B_id).

PUBLISHER

create table Publisher(Pub_name varchar(25),Address varchar(25), Phone_no numeric(20),


constraint bfk foreign key(Pub_name) references Book(Pub_name) on delete cascade);

CUSTOMER

create table customer(cust_id numeric(20), cust_name varchar(15),Address


varchar(25),phone_no numeric(20),constraint ppk primary key(cust_id)); ORDER create table
order(ord_no numeric(20),purchase_amt numeric(20),ord_date varchar(25),cust_id
numeric(20), constraint xfk foreign key(cust_id) references customer(cust_id) on delete
cascade)
REGISTRATION AND USAGE

CREATE TABLE ADDRESS


( street VARCHAR(30) NOT NULL,
zipcode VARCHAR(20) NOT NULL,
PRIMARY KEY(street, zipcode) );
CREATE TABLE AUTHOR
( Fname VARCHAR(20) NOT NULL,
Mname VARCHAR(20),
Lname VARCHAR(20) NOT NULL,
phone_num VARCHAR(20) NOT NULL,
PRIMARY KEY(phone_num) );
CREATE TABLE AUTHOR_WRITE_BOOK
( ISBN INT NOT NULL,
Aphone_num VARCHAR(20) NOT NULL,
PRIMARY KEY(ISBN, Aphone_num),
CONSTRAINT AWBFKA
FOREIGN KEY(Aphone_num) REFERENCES AUTHOR(phone_num)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT AWBFKB
FOREIGN KEY(ISBN) REFERENCES BOOK(ISBN)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE BOOK
( ISBN VARCHAR(13) NOT NULL,
Pname VARCHAR(100),
edition INT,
publish_date YEAR(4),
price real,
title VARCHAR(300),
sales_amount INT,
PRIMARY KEY(ISBN),
CONSTRAINT BPFK
FOREIGN KEY(Pname) REFERENCES PUBLISHER(name)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE BOOK_BELONGS_TO_CATEGORY
( ISBN VARCHAR(13) NOT NULL,
category_name VARCHAR(50) NOT NULL,
PRIMARY KEY(ISBN, category_name),
CONSTRAINT ISBNFK
FOREIGN KEY(ISBN) REFERENCES BOOK(ISBN)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT CATEFK
FOREIGN KEY(category_name) REFERENCES CATEGORY(category_name)
);
CREATE TABLE BOOK_HAS_TRANSACTION
( ISBN VARCHAR(13) NOT NULL,
transaction_id VARCHAR(30) NOT NULL,
PRIMARY KEY(ISBN, transaction_id),
CONSTRAINT ISBNFK
FOREIGN KEY(ISBN) REFERENCES BOOK(ISBN)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT TIDFK
FOREIGN KEY(transaction_id) REFERENCES
TRANSACTION_HISTORY(transaction_id)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE CATEGORY
( name VARCHAR(200) NOT NULL,
PRIMARY KEY(name) );
CREATE TABLE COURSE
( course_num VARCHAR(15) NOT NULL,
PRIMARY KEY(course_num)
);
CREATE TABLE COURSE_USE_BOOK
( course_num VARCHAR(15) NOT NULL,
ISBN VARCHAR(13) NOT NULL,
PRIMARY KEY(course_num, ISBN),
CONSTRAINT COURSENUMFK
FOREIGN KEY(course_num) REFERENCES COURSE(course_num)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT ISBNFK
FOREIGN KEY(ISBN) REFERENCES BOOK(ISBN)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE CUSTOMER
( email VARCHAR(40) NOT NULL,
phone_num VARCHAR(20) NOT NULL,
Fname VARCHAR(30),
Lname VARCHAR(30),
PRIMARY KEY(email) );
CREATE TABLE CUSTOMER_HAS_ADDRESS
( street VARCHAR(30) NOT NULL,
zipcode VARCHAR(5) NOT NULL,
email VARCHAR(40) NOT NULL,
PRIMARY KEY(street, zipcode, email),
CONSTRAINT CAFK1
FOREIGN KEY(street) REFERENCES ADDRESS(street)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT CAFK4
FOREIGN KEY(zipcode) REFERENCES ADDRESS(zipcode)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT CAFK5
FOREIGN KEY(email) REFERENCES CUSTOMER(email)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE CUSTOMER_HAS_PAYMENT
( email VARCHAR(40) NOT NULL,
credit_card_num VARCHAR(19) NOT NULL,
PRIMARY KEY(email,credit_card_num),
CONSTRAINT CPCFK
FOREIGN KEY(email) REFERENCES CUSTOMER(email)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT CPPFK
FOREIGN KEY(credit_card_num) REFERENCES PAYMENT(credit_card_num)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE INVENTORY
( inventory_id INT NOT NULL,
capacity INT,
street VARCHAR(30) NOT NULL,
zipcode VARCHAR(20) NOT NULL,
PRIMARY KEY(inventory_id),
CONSTRAINT IAFK
FOREIGN KEY(street) REFERENCES ADDRESS(street)
ON DELETE SET NULL ON UPDATE CASCADE,
FOREIGN KEY(zipcode) REFERENCES ADDRESS(zipcode)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE INVENTORY_STORE_BOOK
(ISBN VARCHAR(13) NOT NULL,
in_id INT NOT NULL,
amount int not null,
PRIMARY KEY(ISBN, in_id),
CONSTRAINT ISBBFK
FOREIGN KEY(ISBN) REFERENCES BOOK(ISBN)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT ISBIFK
FOREIGN KEY(in_id) REFERENCES INVENTORY(inventory_id)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE PAYMENT
( credit_card_num VARCHAR(19) NOT NULL,
expired_date DATE NOT NULL,
security_code CHAR(3) NOT NULL,
street VARCHAR(30) NOT NULL,
zipcode VARCHAR(20) NOT NULL,
PRIMARY KEY(credit_card_num),
CONSTRAINT PAFK
FOREIGN KEY(street) REFERENCES ADDRESS(street)
ON DELETE SET NULL ON UPDATE CASCADE,
FOREIGN KEY(zipcode) REFERENCES ADDRESS(zipcode)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE POST_COURSE
( prerequisite_num VARCHAR(15) NOT NULL,
post_course_num VARCHAR(15) NOT NULL,
PRIMARY KEY(prerequisite_num, post_course_num),
CONSTRAINT PREFK
FOREIGN KEY(prerequisite_num) REFERENCES COURSE(course_num)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT POSTFK
FOREIGN KEY(post_course_num) REFERENCES COURSE(course_num)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE PUBLISHER
( name VARCHAR(100) NOT NULL,
phone_num VARCHAR(20) NOT NULL,
PRIMARY KEY(name) );
CREATE TABLE REVIEW
( r_id VARCHAR(30) NOT NULL,
Cmail VARCHAR(40) NOT NULL,
ISBN VARCHAR(13) NOT NULL,
rating VARCHAR(3) NOT NULL,
content VARCHAR(3000),
PRIMARY KEY(r_id),
CONSTRAINT RCFK
FOREIGN KEY(Cmail) REFERENCES CUSTOMER(email)
ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT RBFK
FOREIGN KEY (ISBN) REFERENCES BOOK(ISBN)
ON DELETE SET NULL ON UPDATE CASCADE
);
CREATE TABLE TRANSACTION_HISTORY
( transaction_id VARCHAR(30) NOT NULL,
Cmail VARCHAR(40) NOT NULL,
date DATE,
sold BOOLEAN,
return_date DATE,
returned BOOLEAN,
amount INT,
PRIMARY KEY(transaction_id),
CONSTRAINT TCFK
FOREIGN KEY(Cmail) REFERENCES CUSTOMER(email)
ON DELETE SET NULL ON UPDATE CASCADE);
CREATE VIEW BEST_PROFITS
AS SELECT B.title, sum(T.amount * B.price) AS profits
FROM BOOK AS B, TRANSACTION_HISTORY AS T, BOOK_has_TRANSACTION AS BT
WHERE T.sold = 'TRUE'
AND T.transaction_id = BT. transaction_id
AND BT.ISBN = B.ISBN
GROUP BY BT.ISBN
ORDER BY profits DESC;
CREATE VIEW BEST_SELL
AS SELECT B.title, SUM(T.amount) AS sales
FROM BOOK AS B, TRANSACTION_HISTORY AS T,BOOK_has_TRANSACTION AS BHT
WHERE T.sold = 'TRUE'
AND T.transaction_id = BHT.transaction_id
AND BHT.ISBN = B.ISBN
GROUP BY BHT.ISBN
ORDER BY sales DESC;
CREATE VIEW CPMPA
AS SELECT DISTINCT C.Fname, C.Lname, C.email
FROM CUSTOMER AS C, TRANSACTION_HISTORY AS T,
BOOK_HAS_TRANSACTION AS BT, AUTHOR_WRITE_BOOK AS AB,
MOST_PROFITABLE_AUTHOR AS MPA
WHERE C.email = T.Cmail
AND T.transaction_id = BT.transaction_id
AND BT.ISBN = AB.ISBN
AND AB.Aphone_num = MPA.phone_num;
CREATE VIEW MOST_POPULAR_AUTHOR
AS SELECT A_1.Fname, A_1.Mname, A_1.Lname, A_1.phone_num
FROM (SELECT max(B.sales_amount) AS max_sales
FROM BOOK AS B, AUTHOR AS A, AUTHOR_WRITE_BOOK AS AB
WHERE B.ISBN = AB.ISBN
AND AB.Aphone_num = A.phone_num) AS R, BOOK AS B_1, AUTHOR AS A_1,
AUTHOR_WRITE_BOOK AS AB_1
WHERE B_1.ISBN = AB_1.ISBN AND AB_1.Aphone_num = A_1.phone_num AND
B_1.sales_amount = max_sales;
CREATE VIEW MOST_PROFITABLE_AUTHOR
AS SELECT A_1.Fname, A_1.Mname, A_1.Lname, A_1.phone_num
FROM (SELECT max(B.sales_amount * B.price) AS max_profits
FROM BOOK AS B, AUTHOR AS A, AUTHOR_WRITE_BOOK AS AB
WHERE B.ISBN = AB.ISBN
AND AB.Aphone_num = A.phone_num) AS R, BOOK AS B_1, AUTHOR AS A_1,
AUTHOR_WRITE_BOOK AS AB_1
WHERE B_1.ISBN = AB_1.ISBN AND AB_1.Aphone_num = A_1.phone_num AND
B_1.sales_amount * B_1.price = max_profits;
CREATE VIEW NEWVIEW_H
AS SELECT DISTINCT A.Fname, A.Mname, A.Lname
FROM more_than_average AS MA, AUTHOR AS A, AUTHOR_WRiTE_BOOK AS AB,
BOOK_HAS_TRANSACTION AS BT, TRANSACTION_HISTORY AS T, CUSTOMER AS C
WHERE MA.Email_Address = T.Cmail
AND T.transaction_id = BT.transaction_id
AND BT.ISBN = AB.ISBN
AND AB.Aphone_num = A.phone_num;
CREATE VIEW money_spent(Fist_name, Last_name, dollar_spent)
AS SELECT C.Fname, C.Lname, sum(T.amount * B.price)
FROM CUSTOMER C, BOOK B, TRANSACTION_HISTORY T, BOOK_HAS_TRANSACTION BT
WHERE C.email = T.Cmail AND T.transaction_id = BT.transaction_id AND
B.ISBN = BT.ISBN
GROUP BY C.email;
CREATE VIEW more_than_average(First_name, Last_name, Email_Address)
AS SELECT Fname, Lname, email
FROM (SELECT Fname, Lname, email, sum(T.amount * B.price) as cost
FROM CUSTOMER C, BOOK B, TRANSACTION_HISTORY T, BOOK_HAS_TRANSACTION BT
WHERE C.email = T.Cmail AND T.transaction_id = BT.transaction_id AND
B.ISBN = BT.ISBN
GROUP BY C.email),
(SELECT avg(dollar_spent) AS avg_spent
FROM money_spent)
WHERE cost > avg_spent;

Chapter 5: Testing Section

5.1 Overview:

The goal of testing is to find mistakes. The process of testing involves attempting to every

plausible flaw or vulnerability in a piece of art. It offers a means of verifying the

functionality of individual parts, assemblies, subassemblies, and/or the completed product. It's
the

software exercise procedure designed to make sure the system complies with

it satisfies both user expectations and criteria without failing in an unacceptable way.

5.2 TESTING PHASES:

The process of verifying individual source code units, sets of one or more

computer software modules along with the related usage guidelines, control data, and
Protocols for operations. First, we used the code testing approach for unit testing, which

3 OUTPUT TESTING:

Testing the proposed system's output comes next, following validation testing.
Because if the system doesn't process the necessary output, it is useless. Inquiring of the user
about this necessary format, in which the system must be used, allows the system to test the
output that is produced or shown by the system in question.
QUERRIES RSULTS
Section 7

FINAL VERDICT

The shift from ordering printed books from bookstores to ordering them online or even only as
digital versions has had a significant impact on the global public as well as the book industry,
libraries, and bookstores. Benefits include reduced costs for books, universal accessibility, and
preservation of natural resources. Nonetheless, the drawbacks are substantial and cannot be
disregarded. The loss of jobs and enterprises as a result of the digitalization of books, the
impending threat posed by Google Books, and the loss of our sense of the past are just a few
drawbacks.
It is bittersweet to be replacing books because they have been such an integral part of human
history.
To me, it seems that e-books, Google books, and online retailers are the future and that the
future is good. But, if you look past all the conveniences and look at the people being affected
by this then it becomes clear that this is not a future that I want.

HISTORY

We would like to acknowledge the books and periodicals that we consulted while developing our
system, which we have included in this section.
1. Fifth Edition of Database System Concepts.
2. Learning PHP, MySQL.
3. https://www.w3schools.com/php/php_syntax.as
4. https://www.w3.org/Style/CSS/Overview.en.html

You might also like