Program |
Diploma in Computing and Systems Development |
Unit Number and Title |
Unit 33 Data Analysis and Design |
QFC Level |
Level 4 |
Data Models tells us how to create logical design of database. There are three major types of data models:
Consider an example, where there is a company with various departments. Each department has certain developing manager and employees. Every entity is related to each other.
File systems and database management systems (DBMS) are two ways of managing data. DBMS is a computer based system to record persistent data.
Organizations these day’s follow four major techniques of designing databases. These are:
Get assignment help from full time dedicated experts of Locus assignments.
Call us: +44 – 7497 786 317
Email: support@locusassignments.com
Database normalization is a technique to arrange, manage or organize the data (fields and tables) in a relational database. This process is followed to minimize redundancy and to ensure that data is logically stored. If our database is not normalized, it becomes difficult to maintain and update database without data loss. We might face three kinds of anomalies if database is not normalized. These are:
Insertion Anomaly:
Consider table Manager:
Manager_id |
Manager_name |
Manager_address |
Department |
01 |
Neil |
Gurgaon |
Marketing |
02 |
Edwin |
Mumbai |
Production |
03 |
Stuart |
Delhi |
Production |
04 |
Neil |
Gurgaon |
Sales |
Suppose for table Manager, for a new entry we have manager_id, manager_name, manager_address, but the newly recruited person has not been assigned any department yet, still then we have to insert NULL there, leading to insertion anomaly.
Deletion Anomaly: In above table, if for ‘01’ manager_id there is only one department assigned, but if he temporarily drops it, then we might have to delete entire record corresponding to it, rather than only one column.
Updation Anomaly: To update the address of the manager, who occurs more than once in a table, we need to update address in all entries, else data will become inconsistent. E.g.: In above table, Manager_name = Neil occurs more than once, so manager_address entries needs to be changed two times in the table.
Therefore, to remove such anomalies, we need to normalize our database tables.
There are 4 major types of Normal Forms:
First Normal Form (1NF): According to this rule, no two groups of data or records in table must contain same information. E.g.:
Manager Table: (Before normalization)
Manager_name |
Manager_age |
Manager_department |
Neil |
45 |
Marketing, Sales |
Edwin |
42 |
Production |
Stuart |
49 |
Textile |
Manager Table: (After Normalization)
Manager_name |
Manager_age |
Manager_department |
Neil |
45 |
Marketing |
Neil |
45 |
Sales |
Edwin |
42 |
Production |
Stuart |
49 |
Textile |
After normalizing manager table, each row has unique data, but data redundancy increases.
Second Normal Form (2NF): There must not be any partial dependencies, according to this rule. The concatenation must depend on primary key.
Manager table after 2NF:
Manager name |
Manager age |
Neil |
45 |
Edwin |
42 |
Stuart |
49 |
Manager_name |
Manager_department |
Neil |
Marketing |
Neil |
Sales |
Edwin |
Production |
Stuart |
Textile |
Third Normal Form (3NF): According to this rule, all the transitive dependencies must be removed from the table and every non-prime attribute must be dependent on primary key.
Manager_id |
Manager_name |
Manager_age |
Manager_street |
Manger_city |
Manager_zip |
|
|
|
|
|
|
New tables after 3NF:
Manager_id |
Manager_name |
Manager_age |
Manager_zip |
|||
|
|
|
|
|||
Manager_street |
Manger_city |
Manager_zip |
|
|||
|
|
|
|
Boycc Codd Normal Form (BCNF): A table is said to be in BCNF, if it is in 3NF and if it does not have multiple overlapping candidate keys.
Table |
Attributes |
Data Type |
Constraints |
Manager |
Manager_id |
int |
Primary Key |
|
Manager_fname |
Varchar(50) |
|
|
Manager_lname |
Varchar(50) |
|
|
Manager_dob |
datetime |
|
|
Manager_pob |
Varchar(50) |
|
|
|
|
|
Players |
Player_id |
int |
Primary key |
|
Player_fname |
Varchar(50) |
|
|
Player_lname |
Varchar(50) |
|
|
Player_dob |
datetime |
|
|
Player_pob |
Varchar(50) |
|
|
Game_id |
int |
Foreign Key |
|
score |
int |
|
|
|
|
|
Coach |
Coach_id |
int |
Primary key |
|
Coach_fname |
Varchar(50) |
|
|
Coach_lname |
Varchar(50) |
|
|
|
|
|
Refree |
Refree_id |
int |
Primary Key |
|
Refree_fname |
Varchar(50) |
|
|
Refree_lname |
Varchar(50) |
|
|
|
|
|
Team |
Team_id |
int |
Primary Key |
|
Team_name |
Varchar(50) |
|
|
Score |
int |
|
|
city |
Varchar(50) |
|
|
Manager_id |
int |
Foreign key |
|
Coach_id |
int |
Foreign Key |
|
Player_id |
int |
Foreign Key |
|
Game_id |
int |
Foreign Key |
|
|
|
|
Table: Manager
create table manager
(
manager_id int not null primary key,
manager_fname varchar(50),
manager_lname varchar(50),
manager_dob datetime,
manager_pob varchar(50)
)
Table: Players
create table players
(
player_id int not null primary key,
player_fname varchar(50),
player_lname varchar(50),
player_dob datetime,
player_pob varchar(50),
)
Table: Coach
create table Coach
(
coach_id int not null primary key,
coach_fname varchar(50),
coach_lname varchar(50)
)
Table: refree
create table refree
(
refree_id int not null primary key,
refree_fname varchar(50),
refree_lname varchar(50)
)
Table: Team
create table Team
(
team_id int not null primary key,
team_name varchar(50),
score int,
city varchar(50),
manager_id int not null,
coach_id int not null,
player_id int not null,
game_id int not null,
refree_id int not null
)
Table: Game
create table game
(
game_id int primary key,
team_id int,
refree_id int,
date datetime,
score int
)
Creation of Table - Manager:
Creation of Table - Players:
Creation of table – Coach:
Creation of Table – refree:
Creation of Table – Team:
Creation of Table – Game:
Update table with Primary Key Constraint:
Insertion of Data into Table:
Updation of Data into table:
SQL DDL commands – DDL stands for data definition language. These commands help us to define the database structure.
Create Table statement, Drop table statement and Alter table statement are three major commands which help us to define structure of database and schema.
Create Table statement: This statement helps us to create table in database. E.g.:
create table manager1
(
manager_id int NOT NULL,
manager_fname varchar(50),
manager_lname varchar(50),
manager_dob datetime NOT NULL,
manager_pob varchar(50)
)
Alter table statement: This statement helps us change a value in a database table. E.g.:
alter table manager1
add primary key(manager_id);
Drop table statement: This statement helps us to delete a database table along with its schema. E.g.:
drop table manager1;
SQL DML commands – DML stands for data manipulation language. These help us to manage data with schema objects.
Insert statement, update statement and delete statement are three major commands which help us to manipulate with the date in the database tables.
Insert Statement: It helps us to insert data or records in database table.
E.g. – To insert a record of data into table manager we write following query in SQL Server Management Studio IDE:
Insert into manager
(manager_id,manager_fname,manager_lname,manager_dob,manager_pob)
values(1,'Neil','Armstrong','february 27,1984','london')
Delete Statement: It helps us to delete data from database table.
E.g. – To delete a record of data from table manager, we write following query in SQL Server Management Studio IDE:
delete from manager
where manager_id = 2;
Update Statement : This statement helps us to modify data from database table.
Eg – To update a record of data from table manager, we have to write following query in SQL Server Management Studio IDE:
update manager
set manager_fname ='Edwin' where manager_id = '1';
By above query, the record with manager_id = 1 will update, manager_fname to Edwin.
All the queries mentioned above have been executed using SQL Server Management Studio IDE, and are thus successful in retrieving relevant information. By decision making use of SQL DDL (Data definition language) and DML (Data Manipulation Language), meaningful data can be fetch in IDE.
There are six entities in this given scenario based upon which I have designed the relational database for the system. Manager, Players, Coaches, Refree, Team, Game. I have developed the relational database for this system by defining tables with primary key and foreign key constraints. Each entity and relationship has been converted into table, and attributes into corresponding fields.
The database thus developed has important data which must be tested from time to time for any discrepancy. In day to day basis, databases are accessed by thousands of users in an organization. These databases even have important functionality like stored procedures, stored functions, triggers, views, instances, queries etc. There must be a complete regression test suite, to be run over the database periodically. There are number of reasons why we must test our database on regular basis:
According to given scenario, English premier league has managers, players, and coaches, refree. Teams participate in English premier league and play games. Team can be either home team or away team. The players who play the game can be goalkeeper, midfielder, defender, and striker.
The entire database developed for this scenario is normalized up to 3nf (3rd normal form) and thus there is no transitive dependency or redundancy.
In this project, I have created 6 database tables: Manager, Players, Coach, Refree, Team, and Game.
Description of tables is as follows:
Where pk represents primary key and fk represents foreign key.
We have V-Model in software development, popularly known as verification and validation model. It is executed in sequential manner and each phase must be completed before the next phase begins. These tasks are performed to identify how consumers or users perceives the final product or software. Is the final product satisfy the quality standards and is it good to be used.
Verification |
Validation |
|
|
It is the process in software development life cycle to check if we are in the right track of developing the product or software. |
It is the process in software development life cycle to check whether the final product meets business needs. |
|
|
This process involves checking the intermediary documents like ER Diagrams, database design, test cases, test plan, design documents, traceability matrix. |
This process involves checking that all the design documents and requirement specification reflect the requirement and are fit to be used. When placed in intended environment, it is to be checked that product fulfills its intended use. |
|
|
Verification is done before software execution |
Validation involves software execution |
|
|
This process involves all techniques of static testing. |
This process involves all techniques of dynamic testing. |
|
|
Examples of verification are : Reviews, inspection, walkthrough |
Examples of validation are : All types of testing like Regression testing, System testing, User Acceptance testing, smoke testing etc. |
|
|
In this project, all design documents like ER Diagrams and requirement specifications have been verified and all system requirements have been addressed therein. |
After system completion, it will undergo various types of testing to check if it is fit to be used. |
Control mechanisms are methods or process to define and manage variables in a desirable way. For example a test manager at deployment site might install a variety of control mechanisms to help them monitor various testing activities in software testing life cycle.
We need to apply control mechanisms over our system to ensure that a high standard of quality is met. To keep the entire process on track, it is important to have quality control. It helps us to figure out the problem, fix it and also helps us in judging the effectiveness of implemented solution. The entire process of quality systems control must go on smoothly. A control feature must be devised, to manage major portion of work in standardized manner. If in the entire process of controlling the system work flow, we are not able to achieve any task by straight method, we need to devise some alternative control mechanisms, which comply with the standardized methods. In the process of controlling, one must also know how to react in case of defects. The areas of system where defects are most likely to occur must be monitored carefully, so that the defects can be caught and fixed there and then, rather than continuing the work flow further. Defects must be caught and treated in their nascent stage or must be reduced to near zero, so that we can say that six sigma is attained.
ER Diagram in DBMS [Online]. [Accessed on 17 November 2014]. Available on world wide web: <http://www.studytonight.com/dbms/er-diagram.php>
Structured Query Language/Data Manipulation Language [Online]. [Accessed on 18 November 2014]. Available on world wide web <http://en.wikibooks.org/wiki/Structured_Query_Language/Data_Manipulation_Language>
Database Testing [Online]. [Accessed on 18 November 2014]. Available on world wide web <http://www.agiledata.org/essays/databaseTesting.html>
Why to test a database [Online]. [Accessed on 18 November 2014]. Available on world wide web <http://www.softwaretestinggenius.com/why-should-we-test-a-relational-database>
What is verification and validation [Online]. [Accessed on 18 November 2014]. Available on world wide web <http://www.softwaretestinghelp.com/what-is-verification-and-validation/>
Six Sigma control phase [Online]. [Accessed on 18 November 2014]. Available on world wide web <http://www.managementstudyguide.com/six-sigma-control-phase.htm>
Normalization of Database [Online]. [Accessed on 18 November 2014]. Available on world wide web <http://www.studytonight.com/dbms/database-normalization.php>
Database design strategies [Online]. [Accessed on 18 November 2014]. Available on world wide web <http://databasemanagement.wikia.com/wiki/Database_Design_Strategies
Details
Other Assignments
Related Solution
Other Solution