Database Design and Development
Database Design and Development
Database Design and Development
Page |1
DATABASE DESIGN AND DEVELOPMENT
All NCC Education assessed assignments submitted by students must have this statement as the cover
page or it will not be accepted for marking. Please ensure that this statement is either firmly attached to the
cover of the assignment or electronically inserted into the front of the assignment.
Student declaration
I have read and understood NCC Education’s Policy on Academic Dishonesty and Plagiarism.
I can confirm the following details:
I confirm that this is my own work and that I have not plagiarized any part of it. I have also noted the
assessment criteria and pass mark for assignments.
Page |2
DATABASE DESIGN AND DEVELOPMENT
Table of Contents
Contents
Introduction.................................................................................................................................................................... 4
Task 1....................................................................................................................................................................... 5 to 7
Task 2..................................................................................................................................................................... 8 to 15
Task 3................................................................................................................................................................... 16 to 20
Task 4................................................................................................................................................................... 21 to 23
Task 5................................................................................................................................................................... 24 to 34
Task 6................................................................................................................................................................... 35 to 46
Task 7................................................................................................................................................................... 47 to 52
Task 8................................................................................................................................................................... 53 to 55
Task 9 ………………………………………………………………………………………………………………………………………………………………56 to 57
References...........................................................................................................................................................58 to 59
Candidate Checklist.......................................................................................................................................................60
Page |3
DATABASE DESIGN AND DEVELOPMENT
Page |4
DATABASE DESIGN AND DEVELOPMENT
Task 1
Description of Business
Scenario
Page |5
DATABASE DESIGN AND DEVELOPMENT
Since the 2012, Seven-star IT Sell and Service center was opened in Yangon. In 2016, Seven-star
celebrated the opening of its 30th store. And it is open 9 hours and offers customers exceptional
value by providing IT device such as Mobile Phone, Laptop, IT accessary. Staff at the company
include the CEO, Manager, technical Staff and sale staff. All staff have access to the information
system
Seven-star organization process is one staff can make so many order form and one supplier can
make so many purchase form. It is not all as an entity relationship diagram one brand and one
category have so many products. That is why brand table, category table and product table are one
to many relationship tables. And also customer tables and customer types table too because in a
one type of customer there are so many customers are including.
And product table and order table are many to many relationships. That why we have to add new
table like order detail table. And also to product table and purchase table are many to many
relationships too. That why purchase detail table are include. Those tables are dummy tables.
Because this is the only way to solve data corruption.
When we create the table we had to create one to many relationships tables as first priority. In one
to many relationship tables first we had to create a table which is non foreign key table after that
foreign key tables and the last many to many relationship tables.
Page |6
DATABASE DESIGN AND DEVELOPMENT
Page |7
DATABASE DESIGN AND DEVELOPMENT
Task 2
ERD and Data Dictionary
Page |8
DATABASE DESIGN AND DEVELOPMENT
Page |9
DATABASE DESIGN AND DEVELOPMENT
Data Dictionary
Entity: CustomerType
Primary key: CustomerType_ID
Foreign Key : -
Entity: Staff
Primary key: Staff_ID
Foreign Key : -
P a g e | 10
DATABASE DESIGN AND DEVELOPMENT
Entity: Supplier
Primary key: Supplier_ID
Foreign Key : -
Entity: Brand
Primary key: Brand_ID
Foreign Key : -
P a g e | 11
DATABASE DESIGN AND DEVELOPMENT
Entity: Category
Primary key: Category_ID
Foreign Key : -
Entity: Customer
Primary key: Customer_ID
Foreign Key : - CustomerType_ID
P a g e | 12
DATABASE DESIGN AND DEVELOPMENT
Entity: Product
Primary key: Product_ID
Entity: Orders
Primary key: Orders_ID
P a g e | 13
DATABASE DESIGN AND DEVELOPMENT
Staff_ID Varchar 20 To record the staff who
receive the order.
Entity: Purchase
Primary key: Purchase_ID
Entity: OrderDetail
Primary Key : Order_ID, Product_ID
Foreign Key : Order_ID, Product_ID
Entity: PurchaseDetail
Primary Key : Purchase_ID, Product_ID
P a g e | 14
DATABASE DESIGN AND DEVELOPMENT
Name Type Size Description
P a g e | 15
DATABASE DESIGN AND DEVELOPMENT
Task 3
Normalization
P a g e | 16
DATABASE DESIGN AND DEVELOPMENT
Purpose of Normalization
Normalization is the process of organizing data in a database. And this includes creating tables and
establishing relationships between them. And according to rules designed both to protect the data
and to make the database more flexible by eliminating redundancy and inconsistent dependency.
There are a few rules for database normalization. Each rule is called a normal form. If the first rule is
observed, the database is said to be in first normal form. If the first three rules are observed, the
database is considered to be in third normal form. Although other levels of normalization are
possible, third normal form is considered the highest level necessary for most applications
1. First normal form (It is putting all repeated fields in separate files and assigning appropriate
keys to them
2. Second normal form (it is all non-key elements that are fully specified by something other
than the complete key are placed in a separate table.)
3. Third normal form (It offers the grouping of data that is simple, easily, maintainable and with
minimum redundancy.)
An entity is in the third normal form (3NF) if it is in the second normal form and all of its attributes
are not transitively dependent on the complete primary key. Transitive dependency exists when a
non-prime attribute depends on other words the third normal form means that no attribute within an
entity is dependent on a non-prime attribute that, in turn, depends on the primary key.[ CITATION
mic20 \l 1033 ]
Brand_ID(PK)
Brand_Name
Category
Category_ID(PK)
Category_Name
P a g e | 18
DATABASE DESIGN AND DEVELOPMENT
Supplier_ID(PK)
Supplier
Supplier_Name
Company_Address
Phone
Email
P a g e | 19
DATABASE DESIGN AND DEVELOPMENT
Before the normalization changing the product information is difficult because we have update every
single column in our database. For example, one of their product price are change at that time we
have to change price in every price column. To solve this, we would split the table as a making
normalization.
P a g e | 20
DATABASE DESIGN AND DEVELOPMENT
Task 4
Assessment of Design
P a g e | 21
DATABASE DESIGN AND DEVELOPMENT
Derived data
They went to know the total amount of the Ordering product. In order to do that we need to add total
amount column in orders tables. And the following SQL statement will be running. First of all, need
to add a new column called Total Amount is adding to Orders table. When we adding the column we
used alter statement and add statement. After adding the column, we had insert the data. When we
insert the data we use update statement, set statement and condition statement and. Then two
columns price of Product and Quantity of Purchase Detail are multiplied and result is as a Total
Amount.
Before
After
P a g e | 23
DATABASE DESIGN AND DEVELOPMENT
Task 5
Scripts to create table structures
Fig 1
After
Fig 2
This table is record for staff information such as staff id, staff name, staff role, email, staff
address, phone number and date of birth.
Before
Fig 1
After
P a g e | 25
DATABASE DESIGN AND DEVELOPMENT
Fig 1
After
Fig 2
P a g e | 26
DATABASE DESIGN AND DEVELOPMENT
This table is record for brand information such as brand id and brand name.
Before
Fig 1
After
Fig 2
Fig 1
After
Fig 2
P a g e | 28
DATABASE DESIGN AND DEVELOPMENT
This table is record for customer information such customer id, customer name, customer
address, customer phone, email and customer type id.
Before
Fig 1
After
Fig 2
P a g e | 29
DATABASE DESIGN AND DEVELOPMENT
7. Create Statement for Product table
This table is record for Product information such product id, product name, brand id, category id,
colour, price and size.
Before
Fig 1
After
Fig 2
P a g e | 30
DATABASE DESIGN AND DEVELOPMENT
8. Create Statement for Order table
This table is record for Customer order information such order id., order date, customer id,
product id and staff id
Before
Fig 1
After
Fig 2
P a g e | 31
DATABASE DESIGN AND DEVELOPMENT
9. Create Statement for Purchase table
This table is record for purchase information such purchase id., purchase date, Supplier id and
product id.
Before
Fig 1
After
Fig 2
P a g e | 32
DATABASE DESIGN AND DEVELOPMENT
Fig 1
After
Fig 2
P a g e | 33
DATABASE DESIGN AND DEVELOPMENT
Fig 1
After
Fig 2
Explanation
These all state meant are based on data dictionary in task 2. And those all quarry are run in
Microsoft SQL database. And a table which have only primary key are as a first priority and then one to
many relationship tables and the last is many to many relationship tables because these table have dummy
table.
P a g e | 34
DATABASE DESIGN AND DEVELOPMENT
Task 6
Data Population
Before
P a g e | 35
DATABASE DESIGN AND DEVELOPMENT
Fig 1
After
Fig 2
P a g e | 36
DATABASE DESIGN AND DEVELOPMENT
Before
Fig 1
After
Fig 2
P a g e | 37
DATABASE DESIGN AND DEVELOPMENT
Before
Fig 1
After
Fig 2
P a g e | 38
DATABASE DESIGN AND DEVELOPMENT
Before
Fig 1
After
Fig 2
P a g e | 39
DATABASE DESIGN AND DEVELOPMENT
Before
Fig 1
After
Fig 2
P a g e | 40
DATABASE DESIGN AND DEVELOPMENT
Before
Fig 1
After
Fig 2
P a g e | 41
DATABASE DESIGN AND DEVELOPMENT
Before
Fig 1
After
Fig 2
Before
P a g e | 42
DATABASE DESIGN AND DEVELOPMENT
Fig 1
After
Fig 2
Before
P a g e | 43
DATABASE DESIGN AND DEVELOPMENT
Fig 1
After
Fig 2
Before
P a g e | 44
DATABASE DESIGN AND DEVELOPMENT
Fig 1
After
Fig 2
P a g e | 45
DATABASE DESIGN AND DEVELOPMENT
Before
Fig 1
After
Fig 2
P a g e | 46
DATABASE DESIGN AND DEVELOPMENT
Task 7
SQL Reports
1. Query 1
P a g e | 47
DATABASE DESIGN AND DEVELOPMENT
In this query the product which is laptop and the price is between 1500000 and 2000000 and
which is selected in the query 1. The purpose of this query is customer went to know the product
between that price so staff use these statement.
2. Query 2
In this query the product which ordering in ‘17/October/2020’ and which is selected in the query
2. The purpose of this query is manager went to check ordering list so manager use this
statement.
3. Query 3
In this query the product which purchase between ‘17/September/2020’ and
‘18/September/2020’ and which is selected in the query 3. The purpose of this query is manager
went to check purchase list so manager use this statement.
P a g e | 48
DATABASE DESIGN AND DEVELOPMENT
4. Query 4
In this query the product which purchase form supplier Mr. Jasper and which is selected in query
4. The purpose of this query is manager went to check purchase list from supplier Mr. Jasper so
he used this statement.
5. Query 5
P a g e | 49
DATABASE DESIGN AND DEVELOPMENT
In this query the customer who is member from the organization and which is selected in query
5.
The purpose of this query is staff went to give promotion to the customer who is member in this
organization so he uses this statement.
6. Query 6
In this query the product which is most sold form the company and which is selected in query 6.
The purpose of this query is manager went to refill the product which is the most sold. So he
used this statement.
P a g e | 50
DATABASE DESIGN AND DEVELOPMENT
7. Query 7
In this query customer went to know the graphic card detail form NVidia Brand. So staff used
this statement.
8. Query 8
In this query organization went to give a present to customer who is most bought from their
organization. So staff use this statement to know the most buyer.
P a g e | 51
DATABASE DESIGN AND DEVELOPMENT
9. Query 9
In this query organization went to update customer type member who is most bought from their
organization. And also who must be from regular customer type.So staff use this statement to
know the most buyer from regular.
10. Query 10
In this query manager went to know how many sale staff in their organization. Because he went
to increase the sale staff so he used this statement to check the number of sale staff.
P a g e | 52
DATABASE DESIGN AND DEVELOPMENT
Task 8
Future development of a distributed database
Seven star is the company which is selling IT device such as Laptop, Desktop, mobile phone,
printer and so many things. And seven-star company have a planned to separate a branch in the
future. And Distributed Database Manage System is considered to use.
Distributed database system is a centralized software system that manages a distributed database
in a manner as if it were all stored in a single location. And that is use to connect more than one site
P a g e | 53
DATABASE DESIGN AND DEVELOPMENT
either on the same network or on entirely different networks. And there are three type of distributed
databases system. And distributed database system need Network, computer hardware and
security function and also DBMS software.
[ CITATION Tut21 \l 1033 ]
Advantages
Distributed database system can manage the data with different level of transparency.
Distributed database system is reliability and availability.
It has easier expansion
It has improved performance and secure
[ CITATION Que19 \l 1033 ]
Disadvantages
Difficult to use
High cost
Lack of standard
Integrity of control
[ CITATION Que19 \l 1033 ]
There are two things are involving in distributed database manage system. They are fragmentation
and replication. And also there are two things separate from fragmentation they are vertical
fragmentation and horizontal fragmentation. Vertical fragmentation is the only selected for column.
The last things horizontal fragmentation is only use for row which are needed to selected. And also
need to check condition by using where common. [CITATION Placeholder1 \l 1033 ].
Homogeneous system is only use for all sites have the same structure in the sense that they all
have database and workstations. And they are also running the same DBMS and the same
operating system. There are two types of homogeneous they are autonomous and non-
autonomous. Heterogeneous can be allowing separate site to develop without overall central based
on a single Database Manage System. The last one is federated it is not strictly a distributed
database and also it is a series of different databases that can be joined in various databases as the
need arises. [ CITATION Que21 \l 1033 ]
The last involving thing is replication is the method which is storing of data in more than one site.
And it is improving the availability of data. And replication process is simply copying data from one
server to another server. That is why all the user can share the same data without any
inconsistence. And there are three type of replication. They are transactional replication, snapshot
replication and merge replication. In a transactional replication user can receive full initial copies of
data and also user can receive change or updates data too. Snapshot replication is opposite
because user can’t get changing or updating data. Merger replication is combining two or more
databases to become one. Merge is the most complex type of replication because it allows both
publisher and subscriber to independently make changes to the databases.[ CITATION Har21 \l 1033 ]
For seven-star company homogeneous is the most suitable for any other type because seven-star
company process is not big and also each site uses similar DBMS and operating system. And it is
more reliability and availability than other type. And also all the data and information is accessed
and modified simultaneously and it is very easy to access and handle. That is why so easy to use.
P a g e | 54
DATABASE DESIGN AND DEVELOPMENT
And it has a little disadvantage but when we compare the advantage it nothings and small and easy
to fix it. That is why I recommend the homogeneous system.
P a g e | 55
DATABASE DESIGN AND DEVELOPMENT
Task 9
Evaluation
P a g e | 56
DATABASE DESIGN AND DEVELOPMENT
Description
Seven-star is a IT product sales company and it went database system to record their purchase
information and ordering information. Before the database system they run their process with
manually but there has some problem such as employee mistake. So they went to change the
system Because this system is not only reducing the employee mistake but also more efficiencies
Feeling
When I start implementing the database of the Seven-star company. I needed to know their
business process so I had to interview of their staff and investigate their business requirement.
When I start Implement their system I thought it would be easy for me but it’s not because when I
reach the middle of the implementation I were knew the working pressure such as lack of ideas and
system error.
Evaluation
In the time of implementation, I face a lot of difficulties one of them lack of ideas is worse things I
had face because at that saturation I don’t know what to do next at that I had asking for advice from
my senior. Another thing when I collecting the information from their staff it was difficult because
they afraid to talk about the process they might be think it would be losing their job. After the
implementation I was much deeper know about the database system and some of their key word
and also their working process.
Analysis
There are so many state to I had to passed to reach the coding state first of all collecting the
information that I need and then make plan and entity relationship diagram (ERD) was draw. And
data dictionary, normalization and the last coding state. After the coding state there is one more
state that is repot. In the report all the process of the implementation is include.
Conclusion
If I more time I would like explain every detail process of this system and I also went to explain
database management system (DBMS) function and working process. When I doing the project I
got so many precious things such as time management skill, thinking skill and sales system
process. And I also have more confidence than before this project. Because I had been through
difficult thing.
Action Plan
In this project I had learn so many lesson and I also got the experience and confidence. So I believe
I can do simpler system. When I doing that I will doing much better than now. And now I also learn
some programing language such as PHP and C#. And I will keep learn about SQL because there
are so many things left to learn. There is a saying “Never too old to Learn”.
P a g e | 57
DATABASE DESIGN AND DEVELOPMENT
Reference
References
Anon., 2019. Ques110. [Online]
Available at: https://www.ques10.com/p/17591/what-are-the-advantages-and-disadvantages-of-dis-1/
[Accessed 12 January 2021].
Anon., 2020. Distributed Databases. In: Database Design and Development. s.l.:NCC education UK, pp. Topic-9 pg 1 ,2
and 3.
Anon., n.d. Data Definition Language (DDL). Manchester, United Kingdom: s.n.
Anon., n.d. Data Manipulation Language (DML). Manchester, United Kingdom: s.n.
Anon., n.d. Data Manipulation Language (DML). Manchester, United Kingdom: s.n.
Anon., n.d. Definition of Normalization up to 3rd normal form. Manchester, United Kingdom: s.n.
Anon., n.d. Features Distributed Database Systems. Manchester, United Kingdom: s.n.
P a g e | 58
DATABASE DESIGN AND DEVELOPMENT
Anon., n.d. Horizontal and vertical fragmentation and suggest when they might be used.. Manchester, United
Kingdom: s.n.
Anon., n.d. Recap of Phases of Database Design. Manchester, United Kingdom: s.n.
Anon., n.d. Table names used in SQL in the process of retrieving data. Manchester, United Kingdom: s.n.
Anon., n.d. The Purpose of Physical Design. Manchester, United Kingdom: s.n.
Anon., n.d. Why are Distributed Database Needed?. Manchester, United Kingdom: s.n.
P a g e | 59
DATABASE DESIGN AND DEVELOPMENT
Candidate Checklist
Please use the following checklist to ensure that your work is ready for submission.
Have you read the NCC Education documents 'What is Academic Misconduct? Guidance for
Candidates' and 'Avoiding Plagiarism and Collusion: Guidance for Candidates' and ensured that
you have acknowledge all the sources that you have used in your work?
Have you completed the 'Statement and Confirmation of Own Work' form and attached it to your
assignment? You must do this.
Have you ensured that your work has not gone over or under the recommended word count by
more than 10%?
Have you ensured that your work does not contain viruses and can be run directly?
P a g e | 60