Assignment - Database Design and Development
Assignment - Database Design and Development
Assignment - Database Design and Development
This is about databases and how to use it. Also if you read this you can have a
good knowledge about what database is and the importance of databases.
Contents
Activity 1 ........................................................................................................... 5
1.1What is database? .................................................................................. 5
1.2 Types of databases ............................................................................... 5
1.2.1 Relational databases .................................................................. 6
1.2.2 Object-oriented databases ......................................................... 6
1.2.3 Distributed databases ................................................................ 6
1.2.4 Data warehouses ....................................................................... 6
1.2.5 NoSQL databases ...................................................................... 6
1.2.6Graph databases ......................................................................... 6
1.2.7 OLTP databases ........................................................................ 7
1.2.8 Open source databases .............................................................. 7
1.2.9 Cloud databases ........................................................................ 7
1.2.10 Multi model database .............................................................. 7
1.2.11 Document/JSON database ...................................................... 7
1.2.12 Self-driving databases ............................................................. 7
1.3 Introduction .......................................................................................... 8
1.4 The user and system requirements of Polly pipe ................................. 8
1.4.1 Functional requirements............................................................ 9
1.4.2 Non – functional requirements ............................................... 9
1.4.3 System requirements ................................................................. 9
1.4.4 Hardware requirements and Software requirements ............... 10
1.5 About Polly pipe’s ER Diagram ........................................................ 10
1.5.1 Er diagram for Polly Pipe ....................................................... 11
1.5.2 This is the Logical Schema ................................................... 12
1.6 Data normalization ............................................................................. 12
1.6.1 Why Normalize Data?............................................................. 14
1.6.2First Ordinary Type (1NF) ....................................................... 14
1.6.3 The Second Standard Form (2NF) .......................................... 15
1.6.4 The Third Type of Normal (3NF) ........................................... 15
Name :N.M Udesh Ishanka |Subject : Database | Assignment No : 01|
ID : Kan-00142214 Page 1
1.6.5 Fourth normal form ................................................................. 15
1.5.6 Provided logical schema normalization .......................................... 16
1.5.7 What is validation? ......................................................................... 16
1.5.7.1 Data validation ..................................................................... 17
Activity 2 ......................................................................................................... 19
2.1 This is about the Interface of Polly pipe ............................................ 19
2.1.1 Login form .............................................................................. 20
2.1.2 Main Form .............................................................................. 21
2.1.3 Employee details form ............................................................ 21
2.1.4 Customer details form ............................................................. 22
2.1.5 Installation details form .......................................................... 22
2.1.6 Equipment details form......................................................... 23
2.2 What is SQL? ..................................................................................... 23
2.3 What is DDL Statements? ............................................................... 24
2.3.1 DDL ........................................................................................ 24
2.3.2 DML........................................................................................ 26
2.4 Commands which used for Polly pipe database system: ................... 27
2.4.1 Select command ...................................................................... 27
2.4.2 Update Command ................................................................. 28
2.4.3 Delete Command .................................................................. 29
2.5 Polly pipe company system ............................................................... 30
2.5.1 Login form .............................................................................. 30
2.5.2 Employee details form .......................................................... 30
2.5.3 Customer details form........................................................... 31
2.5.4 Equipment details form......................................................... 32
2.5.5 Installation details form ........................................................ 32
2.5.6 Payment details ..................................................................... 33
2.6 Database security ............................................................................... 33
2.7 SQL statements .................................................................................. 34
2.7.1 ‘Select’ SQL Statement........................................................... 34
2.7.2 ‘Where’ statement ................................................................... 35
Table of Figures
Figure 1 DBMS .............................................................................................. 5
Figure 2 4 Hardware requirements and Software requirements .................. 10
Figure 3 Er diagram for Polly Pipe .............................................................. 11
Figure 4 Logical Schema ........................................................................... 12
Figure 5 Insert Data ..................................................................................... 17
Figure 6 Update Data ................................................................................... 18
Figure 7 Delete Data .................................................................................... 19
Figure 8 Login Form .................................................................................... 20
Figure 9 Main form ...................................................................................... 21
Figure 10 Employee form ............................................................................ 21
Figure 11 Customer Details ......................................................................... 22
Figure 12 Installation details form ............................................................... 22
Figure 13 Equipment.................................................................................... 23
Figure 14 Payment form .............................................................................. 23
Figure 1 DBMS
1.2.6Graph databases
A graph database stores data in terms of entities and the relationships between
entities.
An open source database system is one whose source code is open source;
such databases could be SQL or NoSQL databases.
Functional requirements
Non – functional requirements
All the tasks required to upgrade the database are called functional
requirements. Updating the data required to add to the system is one of the main
requirements of the user. The customer's database should be able to enter the
customer's data from the Poly Pipe company's database. Ability to enter information
about employees, what duties they are assigned, etc. Provide the equipment needed
for an installation or order, what type of equipment the organization needs, and the
user needs to have information in the system. (Polly Pipe system should ability to
give customer details, employee details, payments, installation, equipment details.)
It should have creative interface.
Non – functional requirements specify for not covered all the areas by
functional requirements. The details in system design were implement by functional
requirements. Various types of non – functional requirements are accessibility,
audit, efficiency, security, accuracy, availability, backup and restore, capacity,
certification, compliance, reliability, responsibility, virus guard, compatibility of
software.
System requirements are the building blocks developers use to develop the
system. System requirements are categorized as either functional or non – functional
requirements. Functional requirements differentiate something that a user needs to
perform their work very well. For example, in the above scenario system should be
able to provide the required information for customers several installations and
handle daily operations that is functional requirements.
4GB Ram, HDD, SSD, Frequency 2-3.5 GHZ and more, Network interface
bandwidth 100Mbps, SSD for SQL 500Gb, Operating systems – windows
7,8,8.1,10,11
Hard disk space 350GB+, intel i7 dual core processor, Printer, Fax, scanner,
Restore and backup options, Anti-virus software.
Learner has identified the some main entities, attributes and relationships and
have drawn the ER diagram
There are two key benefits of using a highly structured data schema:
Increased coherence. Information is processed in one place and only in one
place, thus reducing the probability of inconsistent information.
Easier mapping of object-to-data. In general, highly-normalized data,
schemes are conceptually closer to object-oriented schemes because similar
solutions (at least from a data point of view) result from object-oriented objectives
of fostering high cohesion and loose coupling between classes.
Usually, you want to have operating data stores (ODSs) and data warehouses
(DWs) that are extremely normalized. Slower reporting efficiency is the primary
drawback of normalization. To support reporting, you would want to have a
renormalized schema, especially in data marts.
Let's think of an example. The type of entity is in the first normal form (1NF)
because it does not contain any repeated data groups. In Figure 1, for example, you
see that in the data Order0NF table there are several recurring attributes-the ordered
item data repeats nine times, and the contact information is used, once for shipping
information and once for billing information. Although this initial order version
could work, what happens when there are more than nine products in an order? Do
you create for them additional order records? What about the vast majority of orders
that have just one component or two? Do we want to waste all the storage space for
the empty fields in the database? Possibly not. Also, even if it is just to marshal it
An entity type is in the second normal form (2NF) when it is in 1NF, and
any attribute that is not part of the primary key is entirely dependent on the primary
key when each non-key attribute is set. This was certainly not the case with the table
of OrderItem1NF, so we need to add the new table of Item2NF. The issue with
OrderItem1NF is that information about the item, such as an item's name and price,
does not rely on the order for that item. For example, if three widgets are ordered by
Hal Jordan and five widgets are ordered by Oliver Queen, the fact that the item is
called a "widget" and that the unit price is $19.95 is constant. This information
depends on the definition of an item, not the concept of an item order, and should
therefore not be stored in the table of items ordered.
An entity type is in the third normal form (3NF) when it is in 2NF and when
the primary key is explicitly dependent on all of its attributes. A better way to phrase
this rule may be that all parts of the primary key must depend on the characteristics
of an entity form. In this case, the problem with the OrderPayment2NF table is that
the definition of the payment form (such as 'Master card' or 'Check') depends only
on the type of payment, not the combination of the order ID and the type of
payment.
This is also known as the Boyce Code Normal Form (BCNF) and exists as
the fifth standard form, but in practice it is considered a coincidence. Ignoring these
rules may result in less than a complete database plan, but it does not affect
performance. For example, if think that there is a company that employs more than
Employee
ID Name
SHA1 Plumber
SHA8 Installation Manager
SHA2 Aquatics installer
SHA11 Aquatics installer
SHA23 Plumber
SHA66 Aquatics installer
SHA55 Brick layer
Table 2 Normalization
Insert
Update
Delete
Activity 2
2.1 This is about the Interface of Polly pipe
This interface design is to get main idea of system for the user. It can be designed on
wireframe or any interface designing tool. Polly pipe company has 7 interface forms
that author created. They are,
Login form
Main form
Employee form
Customer form
Installation form
Equipment form
Payment form
Polly Pipe company system main interface is Login form. It is design on simple
interface include username and password.
Figure 13 Equipment
2.3.1 DDL
DDL can change commands automatically. It’s permanently saved in the database.
DDL does things like create tables and delete tables. DDL as a command,
DROP
ALTER
CREATE
TRUNCATE
Create used
Syntax
Example
Drop used
Syntax
DROP TABLE table__name;
Example
DROP TABLE PAYMENT;
Alter used
Syntax
ALTER TABLE table _name ADD column__name COLUMN-definition;
Example
ALTER TABLE CUS_DETAILS ADD(ADDRESS VARCHAR2(50));
ALTER TABLE CUS_DETAILS MODIFY (NAME VARCHAR2(50));
Truncate used
Syntax
TRUNCATE TABLE table_name;
Example:
2.3.2 DML
DML is used to modify databases. But DML cannot execute automatic commands
like DDL. Data can be reversed via DML. Here are under DML commands,
INSERT
UPDATE
DELETE
Insert used
Syntax
INSERT INTO TABLE_NAME 2. VALUES (value1, value2, value3, ....
valueN);
For example:
INSERT INTO Employee (Address, Name) VALUES ("oak street", "sally dench");
Update used
Syntax:
UPDATE table_name SET [column_name1= value1,...column_nameN =
valueN] [WHERE CONDITION]
For example:
1. UPDATE Installation
2. SET Name = 'Marine'
3. WHERE Installation__Id = '767'
DELETE USED
Syntax:
DELETE FROM table _name [WHERE condition];
For example:
1. DELETE FROM Payment
2. WHERE PaymentID="22";
Figure 15 Select
Figure 16
Figure 17 Update
Figure 18
Figure 19 Delete
Theft fraudulent
Confidentiality loss
Data privacy loss
Integrity loss
Data availability loss
Access control
Figure 26 select
Activity 3
Test the systems against user and system requirements
Test case – 01
Test case – Enter incorrect username or password
Test name – Udesh Ishanka
Test case – 02
Test case – Enter correct username and incorrect password
Test name – Udesh Ishanka
Test case – 03
Test case – Enter correct username and correct password
Test name – Udesh Ishanka
Test case Input data Expected Actual result Test result
result (Pass /Fail)
Enter correct Username – Login Login Pass
username and Polly pipe Success ! success !
correct Password –
password Admin123
Table 5 Test case 03
User Manual
Safe Software. 2022. What is Data Validation? How It Works and Why It's Important.
[online] Available at: https://www.safe.com/what-is/data-validation/
[Accessed 02 December 2022].