Database Design by Kamalakar Dandu

Embed Size (px)

Citation preview

  • 8/2/2019 Database Design by Kamalakar Dandu

    1/15

    Database Design

    Requirement Formulation and AnalysisCollection and documentation of requirement

    Analysis of Requirement Conceptual Design

    Data ModelingFirst Level E-R Modeling

    Second Level NormalizationE-R ModelingPhysical Design and Implementation

  • 8/2/2019 Database Design by Kamalakar Dandu

    2/15

    Database design is the process of developing

    database structures to hold data to cater to user

    requirements. The final design must satisfy user

    needs in terms of completeness integrity,

    performance and other factors.

    For a large enterprise, the database design willturn out to be an extremely complex task leaving a

    lot to the skill and experience of the designer.

    A number of tools and techniques, including

    computer-assisted techniques, are available tofacilitate database design.

  • 8/2/2019 Database Design by Kamalakar Dandu

    3/15

    Requirement Formulation and Analysis

    The primary input to the database design processis the organizations statement of requirements.poor definition of these requirements is a major

    cause of poor database design, resulting indatabases of limited scope and utilities which areunable to adapt change.

    Requirement analysis is the process of identifying

    and documenting the data the user requires in thedatabase to meet present and future informationneeds. During this phase, the analyst studies dataflows and decision making processes in theorganization and works with the users.

  • 8/2/2019 Database Design by Kamalakar Dandu

    4/15

    The objective of this phase is to answer the

    following question:

    What are user-views of the data(present and

    future)?

    What data elements(or attribute) are required in

    these user-views?

    What are the entities and their primary keys?

    What are the operational requirements regardingsecurity, integrity and response time?

  • 8/2/2019 Database Design by Kamalakar Dandu

    5/15

    Conceptual Design

    The major step in conceptual design is to

    identify the entities and relationships that

    reflect the organizations data, naturally.The objective of this step is to specify the

    conceptual structure of the data and is often

    referred to as data modeling. The E-Rmodel, with an emphasis on the top-down

    approach.

  • 8/2/2019 Database Design by Kamalakar Dandu

    6/15

    Data Modeling

    Describes relationship between data objects

    First LevelEntity relationship diagrams

    Second LevelNormalization

    The relationship between the collection of data in a system maybe graphically represented using data modeling. If therelationship are complex, data modeling provides a simplifiedapproach to the structured design of the system. It helpsdetermine the data objects in the system, the composition of

    each, and the relationship that exist between them.

    Data modeling is achieved in two levelsthe first level buildsthe conceptual model of the data, using E-R Modeling. Thesecond level organized this model better, by removing

    redundancies, through a process called Normalization. Thenormalized model is then converted into the physical database.

  • 8/2/2019 Database Design by Kamalakar Dandu

    7/15

    Entity Relationship Diagram

    Entity Relationship Modeling is a technique

    for analysis and logical modeling of a

    systems data requirements. It uses threeconcepts, entities, their attributes and the

    relationships that exist between the entities.

    It uses graphical notations for representingthese.

  • 8/2/2019 Database Design by Kamalakar Dandu

    8/15

    Graphical Notations for E-R diagram

    Name : Entity

    Symbol :

    Function :data objects in the system

    uniquely identifiable by identifier has

    attributes that describe it.

  • 8/2/2019 Database Design by Kamalakar Dandu

    9/15

    Name: Attributes

    Symbol:

    Function: Describe an entity.

    Name: Relationship

    Symbol:

    Function: Relates two entities uniquely

    identified by the identifier.

  • 8/2/2019 Database Design by Kamalakar Dandu

    10/15

    Normalization

    Normalization is the process of refining the data modelbuilt by the Entity-Relationship diagram. TheNormalization technique, logically groups the data over anumber of tables, with minimum redundancy of data. The

    entities of tables resulting from Normalization contain dataitems, with relationships being represented by replicationof key data item(s).

    The first step towards Normalization is to convert the E-Rmodel into Tables of relations. The next step is to examine

    the tables for redundancy and if necessary, change them tonon-redundant forms. This non-redundant model is thenconverted to a database definition, which achieves the

    objective of the Database Design Phase.

  • 8/2/2019 Database Design by Kamalakar Dandu

    11/15

    Need for Normalization

    Improves database design

    Ensures minimum redundancy of data.

    Reduces need to reorganize data when

    design is modified/enhanced.

    Removes anomalies for database activities.

  • 8/2/2019 Database Design by Kamalakar Dandu

    12/15

    Steps in Normalization

    First Normal Form (1 NF)

    Second Normal Form (2 NF)

    Third Normal Form (3 NF)

  • 8/2/2019 Database Design by Kamalakar Dandu

    13/15

    First Normal Form (1 NF)

    Identify repeating groups of fields

    Remove repeating groups to a separate table

    Identify the keys for the tables.

    Key of parent table is bought as part of the

    concatenated key of the second table.

  • 8/2/2019 Database Design by Kamalakar Dandu

    14/15

    Second Normal Form (2 NF)

    Check if all fields are dependent on thewhole key.

    Remove fields that depends on part of thekey.

    Group partially-dependent fields as a

    separate table Name the tables

    Identify key(s) to the table(s)

  • 8/2/2019 Database Design by Kamalakar Dandu

    15/15

    Third Normal Form (3 NF)

    Remove fields that

    depend on other non-key attribute

    can be calculated or derived from logic

    Group interdependent fields as separate

    tables, identify the key and name the table.