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

MINI PROJECT DB Restricted PDF

This document outlines a mini project for a database system for a book store. It includes sections on the project proposal, plan, database design, implementation, testing and evaluation. The project proposal defines the problem statement, objectives and requirements. The database will be implemented using SQL in PHPMyAdmin. Tables will be created for branches, books, authors and other entities. Data definition and manipulation language will be used to define, insert, update and query the data. The project aims to address problems with the current disorganized paper-based system by creating a centralized database.

Uploaded by

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

MINI PROJECT DB Restricted PDF

This document outlines a mini project for a database system for a book store. It includes sections on the project proposal, plan, database design, implementation, testing and evaluation. The project proposal defines the problem statement, objectives and requirements. The database will be implemented using SQL in PHPMyAdmin. Tables will be created for branches, books, authors and other entities. Data definition and manipulation language will be used to define, insert, update and query the data. The project aims to address problems with the current disorganized paper-based system by creating a centralized database.

Uploaded by

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

ELECTRICAL ENGINEERING DEPARTMENT

(December 2019 session)

DEC40073 – DATABASE SYSTEM

MINI PROJECT

TITLE: DATABASE SYSTEM FOR BOOK STORE

NO. NAME REGISTRATION NUMBER

1 HERYANSHAH BIN SUHIMI 07DTK18F1016


@SUHAIMI

2 AZMIN HIRZAN BIN RABBANA 07DTK18F1015

3 MUHAMMAD AKMAL YUSRI BIN 07DTK18F1018


ASLI SABAH

4 MOHD WAQIUDDIN BIN 07DTK18F1005


BAHAROM
CONTENT

No. Pages Topic


1 3 Project Proposal
1.0 Problem Statement
1.1 Objective
1.2 Requirement
2 4 Project Plan
2.0 Gantt Chart
3 5 Database Design
3.0 Conceptual Model
3.1 Entity Relationship Diagram
4 6-27 Implementation and Loading
6-8 4.0 Sample of Database
9-15 4.1 Implementation of Data Definition Language
16-27 4.2 Implementation of Data Manipulation Language
5 28-30 Testing and Evaluation
6 31 Operation
7 32 Maintenance and Evolution
8 33 References
9 34 … Attachment

2|P age
1. PROJECT PROPOSAL

1.0 Problem Statement

i. A company of a book store have problem on saving, finding and updating their
document.
ii. It is because, all of their document is kept separately and it takes a minute to go to
where the document has been placed.
iii. Some of document are duplicate too. It creates confusion between employer at
information department to determine, which one is latest.
iv. Employer and manager need to check one by one in order to find and get the
documents they want.
v. Some of document are missing due to employer negligence.
vi. Some of documents are corrupted eaten by termites.

1.1 Objective

i. To make all the information can be accessed at only one place.


ii. Eliminate all the duplicate document and keep the latest one.
iii. Make employer and manager able to find the data they want in a minute.
iv. To keep all data from missing and corrupted.

1.2 Requirement

To keep this mini project effective and succeed, the manager and all the employer in
information department at least know…
i. how to use and utilize PhpMyAdmin.
ii. the basic SQL code and able to implement Data Definition Language and Data
Manipulation Language in other to manage database system using SQL code.
and the company should have at least one central computer and XAMPP software.
iii. the needed entities and attributes to easier the designer to design the ER.

3|P age
2. PROJECT PLAN

2.0 GANTT CHART


Day - 1 2 3 4 5 6 7
Problem Statement
Objective
Requirement
Gantt Chart
Conceptual Model
Entity Relationship Diagram
Sample of Database
Implementation of Data Definition Language
Implementation of Data Manipulation Language
Testing and Evaluation
Operation
Maintenance and evolution
References
Attachment

- Actual Implementation

2.1 Division of Duty

---- Attached on Attachment----

4|P age
3. DATABASE DESIGN

3.0 Entity Relationship Diagram

3.1 Conceptual Model

5|P age
4. IMPLEMENTATION AND LOADING

4.0 Sample of Database

Database name: BOOK_STORE_COMPANY

Table 1: Branch

Table 2: Book

6|P age
Table 3: Designer

Table 4: Manager

Table 5: Author

7|P age
Table 6: Employee

Table 7: Publisher

8|P age
4.1 Implementation of Data Definition Language

PART A

4.1.1 - Creating Database book_store_company and


book_store_company3

4.1.2 - Use Database book_store_company

4.1.3 – Creating Table

a) CREATE TABLE Branch

b) CREATE TABLE Manager

c) CREATE TABLE Book

9|P age
d) CREATE TABLE Author

e) CREATE TABLE Publisher

f) CREATE TABLE Designer

g) CREATE TABLE Employee

h) CREATE TABLE Customer

10 | P a g e
4.1.4 – Set the Foreign Key

a) Foreign Key on Table Employee

b) Foreign Key on Table Manager

c) Foreign Key on Table Book

11 | P a g e
4.1.5 Change the data type of Price_book on table book to Decimal (5,2)

4.1.6 – Rename the Price_Book on table Book to Price_Book_RM

4.1.7 – Delete Database Book_Store_Company3

12 | P a g e
PART B

4.1.8 – Describe All Table

DESCRIBE Author;

DESCRIBE Book;

DESCRIBE Branch;

13 | P a g e
DESCRIBE Customer;

DESCRIBE Designer;

DESCRIBE Employee;

DESCRIBE Manager;

14 | P a g e
DESCRIBE Publisher;

4.1.9 – Delete Table Customer

IN PhpMyAdmin :

15 | P a g e
4.2 Implementation of Data Manipulation Language
PART A
Show Table Manager:

Change Name_Manager = ‘Raikal Bin Mahmud’ to ‘Raykal Bin Muhammadin’ :

Change the phone number of ‘Angelina Wong’ to ‘01149582225’:

16 | P a g e
Show Table Book:

Show book that are sell in branch with ID_Branch = ‘B03’:

17 | P a g e
Show book that are designed by designer with ID ‘MP341:

Show only Book title and it’s price in table book:

18 | P a g e
Show Table Employee:

Show All employee data, where the employee name start with character ‘s’:

Get the information of ‘Ryuo Ronal Marquesa’:

19 | P a g e
Show Table Designer:

Show all the data for designer that use gmail as their email:

Show only Name and phone number from table designer, where the designer
name character end with N:

20 | P a g e
Show Table Book:

Show All the book that are sell on Branch = ‘B05’:

21 | P a g e
Show All the book that are sell on Branch = ‘B05’ and make all the book price
decreased by 5%:

Show only name and price of All the book that are sell on Branch = ‘B05’,
change the currency from MYR to USD. (RM4.17 = 1 USD). Present
Price_Book_RM as Price_Book_USD:

22 | P a g e
Show only name and price of All the book that are sell on Branch = ‘B05’,
change the currency from MYR to Rupiah Indonesia. (RM1 = 3417.13 Rupiah
Indonesia). Present Price_Book_RM as Price_Book_IDR:

Show average price of book:

Show sum price of book:

Do comparison table for average price of every branch:

23 | P a g e
Do comparison table for total of price of every branch:

Show all the book data where their price is between RM30 to RM40:

Show all the book data where their price in RM39.90 or RM33.16:

Show all the book data for Branch B05 or B02 where the price of the book is
under RM25:

24 | P a g e
PART B

Display Table book only book from branch = B03:

Insert New Book to table book for branch B03 with the data below:
ID: MY777
Price: RM32.50
Title: Mencari Redha
Designer ID: DT380, Author ID: AU102, Publisher ID: PB860

Delete ‘Jangan Lahirkan Aku’ from table book:

25 | P a g e
PART C

DISTINCT:

UNION:

COUNT:

26 | P a g e
5. TESTING AND EVALUATION

a) Show Table Branch and Table Manager

Expected SQL :
SELECT * FROM Branch;

Expected SQL :
SELECT * FROM Manager;

ACTUAL :

27 | P a g e
b) Join the table Branch and Manager Where all the manager in charge in
Cahaya Sinar, Cahaya Sinar 2 and Cahaya Sinar 3.

Expected SQL :

SELECT * FROM branch


INNER JOIN manager ON branch.ID_Branch = manager.Branch_ID_in_Charge
WHERE Name_Branch LIKE ‘Cahaya Sinar%’ ;

Expected Output :
ID_Branch Name_Branch Address_Branch ID_Manager Name_Manager Phone_No_Manaager Branch_ID_in_Charge

B01 Cahaya Sinar Kota Kinabalu, MU001 Raykal Bin 0135336788 B01
Sabah Muhammadin

B02 Cahaya Sinar Sipitang, Sabah MU002 Intan Zulaika Binti 0198899892 B02
2 Leman

B03 Cahaya Sinar Kuala Lumpur MU003 Fazila Binti Idham 01129389902 B03
3

Actual Output :

Conclusion : The expected output are similar as actual output.

28 | P a g e
c) Join the table Branch and Manager. Show only Branch Name and
manager name.

SQL:

SELECT Name_Branch,Name_Manager FROM branch


INNER JOIN manager ON branch.ID_Branch = manager.Branch_ID_in_Charge;

Expected Output:

Name_Branch Name_Manager

Cahaya Sinar Raykal Bin Muhammadin


Cahaya Sinar 2 Intan Zulaika Binti Leman

Cahaya Sinar 3 Fazilla Binti Idhman


Kreatif Books Miyya Sarah Binti Badawi

Syurga Buku Angelina Wong

Actual Output:

Conclusion : The expected output are similar as actual output.

29 | P a g e
6. OPERATION

Show table book for Branch ‘B04’:

Ah Meng buy these book : Temptation Of Husband , Revenge Of Husband and Sains Alam
How much he need to pay?

Based on database, he need to pay RM101.50 .


Ah Meng get 12% discount for the day, so how he will get in return after pay for RM101.50 ?

He will get RM11.68 in return.

Conclusion : This database operates normally.

30 | P a g e
7. MAINTENANCE AND EVOLUTION

Now, Company need one more table to record customer information. Using the same
database, create one table that contain;

- Cust_IC
- Cust_Name
- Purchased_Book_ID
- Phone_No

Make the Purchased_Book_ID as foreign key refer to table book where the column is
ID_Book.

Implementation:

Conclusion : The new table has been created. Database can have improvement and maintenance.

31 | P a g e
8. REFERENCES

Austin, K. (n.d). How to make a project proposal Retrieved from


https://www.projectmanager.com/academy/how-to-make-a-project-proposal

Rene, C. (03/08/2018). How to add Foreign key in PhpMyAdmin Retrieved from


https://dataedo.com/kb/tools/phpmyadmin/view-table-foreign-keys

Lucidchart. (2017, March 6) Entity Relationship Diagram (ERD) Tutorial – Part 1 [Video]. Youtube.
https://www.youtube.com/watch?v=QpdhBUYk7Kk

Database Development Cycle Retrieved from


http://www.myreadingroom.co.in/notes-and-studymaterial/65-dbms/506-database-development-
life-cycle.html

Database Life Cycle Retrieved from


https://www.sciencedirect.com/topics/computer-science/database-life-cycle that refer to
Toby Teorey, ... H.V. Jagadish, in Database Modeling and Design (Fifth Edition), 2011

(DBLC) Database Life Cycle Retrieved from


https://www.relationaldbdesign.com/relational-database-design/module3/dblc-design-stages.php

(2019, September 1) The Entity-Relationship Model Retrieved from


http://jcsites.juniata.edu/faculty/rhodes/dbms/ermodel.htm

ER diagram symbol and meaning Retrieved from


https://www.lucidchart.com/pages/ER-diagram-symbols-and-meaning

Database Testing and Evaluation Retrieved from


https://www.bbc.co.uk/bitesize/guides/zqj4fcw/revision/1

Description of the Stages in the DBLC Retrieved from


https://www.relationaldbdesign.com/relational-database-design/module3/dblc-stages-
description.php

Database Development Process Retrieved from


https://opentextbc.ca/dbdesign01/chapter/chapter-13-database-development-process/

SQL SELECT Statement Retrieved from


https://www.techonthenet.com/sql/select.php

Rene van Eck. (2016, June 30) Crows Foot VS Chen Notation [Video].Youtube.
https://www.youtube.com/watch?v=EQg_zmGjzP4&feature=youtu.be

32 | P a g e
9. Attachment

33 | P a g e

You might also like