Académique Documents
Professionnel Documents
Culture Documents
I. Introduction
In part of the database design, relational database is an example which contributed to the common
knowledge of separating everything into separate tables like MySQL and it is a big process. It is fun and
interesting to learn Database design for I.T or computer science students or professionals. It is important
also to manifest a good implementation of database for almost every activity, it is powered by database. In
business, database is also important to optimized data for your project like websites and some
administrator database is all they need. Database designing doesn’t need direct coding into programs, it
needs logics and critical thinking from scratch to implementation. In other words, when starting database
designing all we need is to plan first the design before putting them at work.
Fig. 1: Database
DATA
Let the shape rectangle the table and the tesxt as data. This explains that data can
be stored in a table.
Log-In Details
UN:__________
PW:__________
DATABASE
NAME UN PW
jaydl 12345 Jaydwin L.
Profiles Details
Name: Jaydwin L.
Back-End is the where the database resides in software. It cannot be seen by the
users but it helps in collecting data to be retrieved during the execution processes.
Front -End (Log-In Details & Profiles Details) is what the user sees. It is the
graphical user interface where interaction between the user and the software in made.
1
Isabela State University Cauayan Campus
18 Dacanay, Cauayan City, Isabela
In Fig. 3, the columns are the attributes and the rows or tuples are individual entities
DBMS has users with different rights and permissions who use it for
different purposes [2]
V. Introduction to SQL
SQL – Structured Query Language, it defines (Data Definition Language) the structure and manipulates
(Data Manipulation Language) that structure.
Example Query:
CREATE TABLE User (name varchar (255), Username varchar (255),Password varchar
(255));
2. DML (Data Manipulation Language) – consists of those commands which operate on the data in
the database. This includes statements which add data to the table as well as those statements
which are used to query [3].
Example Query:
INSERT INTO User values(“Jaydwin”,”JAYD!@#”,”qwerty12”);
2
Isabela State University Cauayan Campus
18 Dacanay, Cauayan City, Isabela
Database design used schemas from general to specific. As it goes on the physical schema it becomes
more specific. This design consists of the relationships of tables in the database. We can have multiple
tables to store data in database to avoid data duplication.
USER Sale
This means that there is no sale if there’s no user and vice versa. User and Sale have their
relationship and they point to each other to maintain integrity.
This refers to we can have same names but different individual which is a bad integrity because no
references of uniqueness so we can add an ID like the table below.
ID Name Phone
7 Jayd 0912345678
8 Jayd 0974545746
The ID now can be the reference as foreign key in order to identify the person or user who say for
example commented on a post.
While domain integrity is the acceptable values of for a column or what we store as range.
ID Name Phone
7 Jayd 0912345678
8 Jayd house
In the table, row 2, column phone there is a problem in the domain because it should be a number
and “house” is a ten digit number.
3
Isabela State University Cauayan Campus
18 Dacanay, Cauayan City, Isabela
4
Isabela State University Cauayan Campus
18 Dacanay, Cauayan City, Isabela
X. Atomic Value
- Stores one thing
Example:
We should store to fname all the first names and middlename all middle names and so with the last
names.
XI. Relationships
- Connections of tables in database.
Entity 1 Entity 2
name Favorite_Color
Jayd Red
Relationship
3 Types of Relationships:
1. One to One Relationship – one entity has a connection with one entity
Example:
husband – wife
This means that husband can only have one wife and wife can have one husband.
2. One to Many relationship – one entity can have a connection to multiple other entities.
Example:
user – multiple comments
When a guy marries multiple wives and wife marries multiple guys it many to many
relationship.
5
Isabela State University Cauayan Campus
18 Dacanay, Cauayan City, Isabela
Cardholder Card
ID ID
FN Card no
Card_ID Issue date
This means that a cardholder can only have one card. And a one card can only be used by one
cardholder.
This explains that a user can have multiple card but one card can only have one User.
Parent – Child
This considers the Parent as the Primary Key (PK) and the Child as Foreign Key (FK)
Foreign Key – points out the primary key.
Child FK
Parent PK Child FK
Child FK
Example:
References:
[1] www.tutorialspoint.com, “DBMS Database Management System”, Tutorials Point (I) Pvt. Ltd. ,pp.1,2015.
[2] www.tutorialspoint.com, “DBMS Database Management System”, Tutorials Point (I) Pvt. Ltd. ,pp.2,2015.
[3] Akeel I Din,”Structures Query Language (SQL) A Practical Introduction”, NCC Blackwell, pp.21.
[4] Shane Lively & Michael Sarsany,”SQL Server Standards”, www.isbe.net,pp.1-24.