Data Models tells us how to create logical design of database. There are three major types of data models:
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:
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
createtable manager
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.:
Alter table statement: This statement helps us change a value in a database table. E.g.:
altertable manager1
addprimarykey(manager_id);
Drop table statement: This statement helps us to delete a database table along with its schema. E.g.:
droptable 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:
Insertinto 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:
deletefrom 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 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, website 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 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.
Details
Other Assignments
Related Solution
Other Solution