System Design

18
System Design System Design - Mr. Ahmad Al-Ghoul - Mr. Ahmad Al-Ghoul System Analysis and System Analysis and Design Design

description

System Analysis and Design. System Design. - Mr. Ahmad Al-Ghoul. learning Objectives. Describe the Steps in Database Design Describe relational and object-oriented database models. Steps in Database Design. - PowerPoint PPT Presentation

Transcript of System Design

Page 1: System Design

System DesignSystem Design

- Mr. Ahmad Al-Ghoul- Mr. Ahmad Al-Ghoul

System Analysis and System Analysis and DesignDesign

Page 2: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 22

learning Objectiveslearning Objectives

Describe the Steps in Describe the Steps in Database DesignDatabase Design

Describe relational and Describe relational and object-oriented database object-oriented database modelsmodels

Page 3: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 33

Steps in Database DesignSteps in Database Design

After normalization your table After normalization your table designs and considering the use of designs and considering the use of codes, you are now ready to create codes, you are now ready to create database.database.

The following steps will guide you to The following steps will guide you to create database and file designscreate database and file designs

Page 4: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 44

Steps in Database DesignSteps in Database Design Identify the entitiesIdentify the entities

start by reviewing DFDs and class start by reviewing DFDs and class diagrams to identify system entities. diagrams to identify system entities.

In addition, consider any data stores In addition, consider any data stores shown in DFDs to determine whether shown in DFDs to determine whether they might represent entitiesthey might represent entities

Verify that there is more than one Verify that there is more than one instance of the entity that occurs in the instance of the entity that occurs in the systemsystem

Page 5: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 55

Steps in Database DesignSteps in Database Design

Identify RelationshipsIdentify Relationships Start with an entity and identify all Start with an entity and identify all

entities with which it shares relationshipsentities with which it shares relationships carefully analyze each relationship to carefully analyze each relationship to

determine if it is 1:1, 1:M, or M:Ndetermine if it is 1:1, 1:M, or M:N Describe the relationship with the Describe the relationship with the

appropriate verb phraseappropriate verb phrase Determine the cardinality by discussing Determine the cardinality by discussing

the business rules with knowledgeable the business rules with knowledgeable usersusers

Page 6: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 66

Steps in Database DesignSteps in Database Design

Add attributes and assign identifiersAdd attributes and assign identifiers Identify attributes of the entity that are Identify attributes of the entity that are

relevant to the system under relevant to the system under developmentdevelopment

verify that every data element in the verify that every data element in the data dictionary is associated logically data dictionary is associated logically with an entitywith an entity

Select the entity’s identifierSelect the entity’s identifier

Page 7: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 77

Steps in Database DesignSteps in Database Design

Create 3NF designs for all tablesCreate 3NF designs for all tables Unnormalized tables are converted to Unnormalized tables are converted to

First Normal Form by removing repeating First Normal Form by removing repeating groups into separate tables. Second and groups into separate tables. Second and Third Normal Forms are achieved by Third Normal Forms are achieved by reducing and splitting tables so that the reducing and splitting tables so that the only functional dependencies which exist only functional dependencies which exist are between the primary keys and the are between the primary keys and the remaining non-key attributes.remaining non-key attributes.

Page 8: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 88

Steps in Database DesignSteps in Database Design

Identify all primary, secondary, and foreign keysIdentify all primary, secondary, and foreign keys A primary key is a field or combination of fields that A primary key is a field or combination of fields that

uniquely and minimally identifies a particular member of uniquely and minimally identifies a particular member of an entityan entity

Secondary key is a field or combination of fields that can Secondary key is a field or combination of fields that can be used to access or retrieve recordsbe used to access or retrieve records

A foreign key is a field in one table that must match a A foreign key is a field in one table that must match a primary key value in another table in order to establish primary key value in another table in order to establish the relationship between the two tables.the relationship between the two tables.

When the relationship is one-to-many, the primary key When the relationship is one-to-many, the primary key of the file at the one end of the relationship should be of the file at the one end of the relationship should be contained as a foreign key on the file at the many end of contained as a foreign key on the file at the many end of the relationshipthe relationship

Page 9: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 99

Steps in Database DesignSteps in Database Design

Generate the final ERDGenerate the final ERD include new entities identified during include new entities identified during

normalizationnormalization Make sure that the data dictionary entities Make sure that the data dictionary entities

for all data stores, records, and data for all data stores, records, and data elements are documented completely and elements are documented completely and correctlycorrectly

Be sure that all the codes that were Be sure that all the codes that were developed or identified during the data developed or identified during the data design process are documented in the data design process are documented in the data dictionarydictionary

Page 10: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1010

Database ModelsDatabase Models

database models are ways of organizing database models are ways of organizing data in order to make data processing data in order to make data processing more efficientmore efficient Legacy databaseLegacy database

Hierarchical: depict parent-child relationships using Hierarchical: depict parent-child relationships using inverted treesinverted trees

Network: depict nonhierarchical associations using Network: depict nonhierarchical associations using pointerspointers

The two popular database models now-a The two popular database models now-a day are relational and object-oriented.day are relational and object-oriented.

Page 11: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1111

Database ModelsDatabase Models

Relational DatabasesRelational Databases The principles of The principles of relational model was introduced was introduced

during the 1970s by Dr. E. Coddduring the 1970s by Dr. E. Codd relational model became popular because their relational model became popular because their

ease of use, flexibility in structure, and powerfulease of use, flexibility in structure, and powerful Component of a relational modelComponent of a relational model

Collection of objects or relations that store the Collection of objects or relations that store the datadata

A set of operators that can act on the relations to A set of operators that can act on the relations to produce other relationsproduce other relations

Data integrity for accuracy and consistency Data integrity for accuracy and consistency

Page 12: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1212

Database ModelsDatabase Models

Relational DatabasesRelational Databases Definition of a relational databaseDefinition of a relational database

A relational database uses relations or two dimensional A relational database uses relations or two dimensional tables to store informationtables to store information

Relational database can run on many platforms, Relational database can run on many platforms, including personal computers, and are well including personal computers, and are well suitedsuited to client/server computing to client/server computing

Because all the tables are linked, a user can Because all the tables are linked, a user can request data that meets specific conditionsrequest data that meets specific conditions

New entities and attributes can be added at any New entities and attributes can be added at any time without restructuring the entire databasetime without restructuring the entire database

Page 13: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1313

Relational DatabasesRelational DatabasesNotice that the relational design avoids redundancy and that all tables are in 3NF (all nonkey fields are functionally dependent on the primary key, the whole key, and nothing but the key).

Page 14: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1414

Database ModelsDatabase Models Object-Oriented DatabasesObject-Oriented Databases

Many systems developers are using Many systems developers are using object-oriented database (OODB) design as a natural design as a natural extension of the object-oriented analysis processextension of the object-oriented analysis process

Some IT professionals believe that OODBs will have a Some IT professionals believe that OODBs will have a major impact and eventually replace the relational major impact and eventually replace the relational approach. approach.

(OODB) used primarily for applications with (OODB) used primarily for applications with multimedia or complex datamultimedia or complex data

Each object in an OODB has a unique object identifier, Each object in an OODB has a unique object identifier, which is similar to a primary key in a relational which is similar to a primary key in a relational database. The identifier allows the object to interact with database. The identifier allows the object to interact with other objects and form relationships. other objects and form relationships.

Programmers use object-oriented languages, to describe Programmers use object-oriented languages, to describe and implement object-to-object relationships that and implement object-to-object relationships that resemble the relationships found in a traditional ERD.resemble the relationships found in a traditional ERD.

Page 15: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1515

Object-Oriented DatabasesObject-Oriented Databases

Objects have object identifiers that enable them to communicate and interact.

Object identifier

Contains the object identifier for the driver assigned

Page 16: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1616

Sequence SummarySequence Summary

Data design tasks include identify the entities; identify Data design tasks include identify the entities; identify relationships; add attributes and assign identifiers; relationships; add attributes and assign identifiers; creating an initial ERD; create 3nf designs for all creating an initial ERD; create 3nf designs for all tables; identify all primary, secondary, and foreign tables; identify all primary, secondary, and foreign keys; generate the final ERD; and completing the data keys; generate the final ERD; and completing the data dictionary entries for files, records, and data elementsdictionary entries for files, records, and data elements

The most common database models are relational and The most common database models are relational and object-orientedobject-oriented

The relational model is powerful and flexible, and The relational model is powerful and flexible, and provides the best support for client/server architectureprovides the best support for client/server architecture

Object-oriented (OODB) design is becoming more Object-oriented (OODB) design is becoming more popular as a natural extension of the object-oriented popular as a natural extension of the object-oriented analysis processanalysis process

Each object in an OODB has a unique object identifier, Each object in an OODB has a unique object identifier, which is similar to a primary key in a relational which is similar to a primary key in a relational database and allows the object to interact with other database and allows the object to interact with other objects and form relationshipsobjects and form relationships

Page 17: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1717

Sequence SummarySequence Summary

In this Sequence we haveIn this Sequence we have Explained dExplained data design tasks include identify ata design tasks include identify

the entities; identify relationships; add the entities; identify relationships; add attributes and assign identifiers; creating attributes and assign identifiers; creating an initial ERD; create 3nf designs for all an initial ERD; create 3nf designs for all tables; identify all primary, secondary, and tables; identify all primary, secondary, and foreign keys; generate the final ERD; and foreign keys; generate the final ERD; and completing the data dictionary entries for completing the data dictionary entries for files, records, and data elementsfiles, records, and data elements

Defined and dDefined and distinguished between istinguished between relational relational and object-oriented database modelsand object-oriented database models

Page 18: System Design

AvicennaAvicennaSystem Analysis and Design System Analysis and Design

System Design System Design 1818

ReferenceReference

[1] System Analysis and Design, Sixth [1] System Analysis and Design, Sixth EditionEdition

Authors: Gary B. Shelly, Thomas J. Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Rosenblatt Cashman and Harry J. Rosenblatt

Publisher: SHELLY CASHMAN Publisher: SHELLY CASHMAN SEWIES.SEWIES.