Database Design
Database Design
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.
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
Physical Level:
Also referred to as Internal Level, Physical Level explains the actual physical storage structure
of data in a database.
• The different sorts of stored data are defined by the internal schema. It makes use of tangible
data.
prototype.
2. Conceptual Amount:
consumers.
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:
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.
Requirement specifications
Chapter 2
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.
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:
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
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
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
PUBLISHER
CUSTOMER
5.1 Overview:
The goal of testing is to find mistakes. The process of testing involves attempting to every
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.
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