DATABASE DESIGN

          SUBMITTED BY :
          SURBHI JAGGI
          NEELESH VAISH
Fields
A field is the physical implementation of a data
attribute. They are the smallest unit of meaningful
data.
A primary key is a field
                                 A descriptive field is any
whose values identify one
                                 other (nonkey) field that
and only one record in a file.
                                 stores business data.
A secondary key is an
alternate identifier for a
record.
A foreign key is a pointer to
a record in a different file.
Records
A record is a collection of fields arranged in a
predefined format.
   Fixed-length record structures
   Variable-length record structures


A blocking factor is the number of logical
records included in a single read or write
operation (from the computer’s perspective).

        3
DBMS Environment


  Skills
Inventory




  Profit
 Sharing           DBMS          • Skills Data
Inventory                        •Profit Sharing Data
                                 •Benefits Data



Employee
 Benefits
Application
Objectives Of
Database
 Controlled Redundancy
 Ease of learning and use
 Data Independence
 More Information at Low Cost
 Accuracy and Integrity
 Recovery From Failure
 Privacy and security
 Performance

         5
Key Terms
       Users View


       Processing


       Data Model


       Data File



  6
What is DBMS?
“ In a Database Environment, a DBMS is the
 software that provides the interface between
 the data file on disk and the program that
 requests processing. ”



         7
Some Important Terms
 DML – or ‘Data Manipulation Language’
DML manipulates data, i.e. it specifies what is required

 DDL – or ‘Data Definition Language’
DDL describes how the data is structured




        8
Functions of a DBMS
 Storing, Retrieving and Updating data
 Creating program and data independence
 Enforcing Procedures for data integrity
 Reducing data redundancy
 Providing security facilities for defining users and
  enforcing authorizations
 Reducing Physical storage requirements by
  separating the logical and physical aspects of the
  database.

         9
LOGICAL AND
PHYSICAL
VIEWS OF DATA
PHYSICAL VIEW OF              DATA

 It is the way data exist in physical storage.
 It deals with how data stored, accessed, or
 related to other data in storage.




         11
LOGICAL VIEW OF DATA


 what the data look like, regardless of how
  they are stored.
 The logical views are the user’s view, the
  programmer’s view, and the overall logical
  view, called a schema.


        12
SCHEMAS
 It is the view that helps the DBMS (database
  management system) decide what data in
  storage it should act upon as requested by the
  application program.
 Example: Is the arrival and departure display at
  an airport.



        13
SUBSCHEMAS
 It is the programmer’s (pilot’s) view.
 Many subschemas can be derived from one
  schema.
 Example: just as different pilots visualize
  different views of landing approach, although
  all (it is hoped) arrive at the sheduled time
  indicated on the CRT screen display (schema).


         16
What is an ENTITY ??
AN ENTITY IS A THING OR OBJECT OF
IMPORTANCE ABOUT WHICH DATA MUST BE
CAPTURED. ALL THINGS AREN'T
ENTITIES—ONLY THOSE ABOUT WHICH
INFORMATION SHOULD BE CAPTURED. AN
ENTITY IS SOMETHING THAT EXISTS
INDEPENDENTLY .
Cardinality
DATABASE            NORMALIZATION
 Database normalization is a design technique by
  which relational database systems are structured in
  such a way as to make them less vulnerable to certain
  types of logical inconsistencies and anomalies.

 Tables can be normalized to varying degrees:
  relational database theory defines "normal forms" of
 successively higher degrees of stringency.


         22
Data Normalization
An logical entity (or physical table) is in first normal
  form if there are no attributes (fields) that can have
  more than one value for a single instance (record).

An logical entity (or physical table) is in second normal
  form if it is already in first normal form and if the values
  of all nonprimary key attributes are dependent on the
  full primary key.

An logical entity (or physical table) is in third normal
  form if it is already in second normal form and if the
  values of all nonprimary key attributes are not
  dependent on other nonprimary key attributes .
           23
First Normal Form
 The criteria for first normal form :
   A table must be guaranteed not to have
    duplicate records.
   There must not be any repeating groups, ie,
    no attributes which occur a different number
    of times on different records.

          24
R NO.   NAME   DOB            SUBJECT       GRADE
    1       ABC    2 MARCH,1989   OS            A
                                  BS            A+
                                  CONA          B+

    2       DEF    25 DECEMBER,92 BS            A
                                  ENGLISH       A




R NO.       NAME     DOB              SUBJECT           GRADE
1           ABC      2 MARCH,1989     OS                A

1           ABC      2 MARCH,1989     BS                A+

1           ABC      2 MARCH,1989     CONA              B+

2           DEF      25 DECEMBER,92 BS                  A

2           DEF      25 DECEMBER,92 ENGLISH             A
Second Normal Form
 Criteria for second normal form :
   The table must be in 1NF
   None of the non-prime attributes of the
    table are functionally dependant on a part of
    a candidate key.
   None of a 1NF’s candidate keys are
    composite.
         26
R NO.   NAME      DOB


1       ABC       2 MARCH,1989


2       DEF       25 DECEMBER,92



R NO.   SUBJECT   GRADE
1       OS        A
1       BS        A+
1       CONA      B+
2       BS        A
2       ENGLISH   A
Third Normal Form
 Criteria for third normal form:
   Table must be in 2NF.
   There are no non-trivial functional
   dependencies between two non prime
   attributes.

        28
SSN   PNUMBER   HOURS       ENAME      PNAME       PLOCATION




SSN    PNUMBER   HOURS         SSN               ENAME




                  PNUMBER   PNAME    PLOCATION
Roles of Database
Administrator

Managing data activities
Managing database structure
Managing DBMS



     30

Database

  • 1.
    DATABASE DESIGN SUBMITTED BY : SURBHI JAGGI NEELESH VAISH
  • 2.
    Fields A field isthe physical implementation of a data attribute. They are the smallest unit of meaningful data. A primary key is a field A descriptive field is any whose values identify one other (nonkey) field that and only one record in a file. stores business data. A secondary key is an alternate identifier for a record. A foreign key is a pointer to a record in a different file.
  • 3.
    Records A record isa collection of fields arranged in a predefined format.  Fixed-length record structures  Variable-length record structures A blocking factor is the number of logical records included in a single read or write operation (from the computer’s perspective). 3
  • 4.
    DBMS Environment Skills Inventory Profit Sharing DBMS • Skills Data Inventory •Profit Sharing Data •Benefits Data Employee Benefits Application
  • 5.
    Objectives Of Database  ControlledRedundancy  Ease of learning and use  Data Independence  More Information at Low Cost  Accuracy and Integrity  Recovery From Failure  Privacy and security  Performance 5
  • 6.
    Key Terms  Users View  Processing  Data Model  Data File 6
  • 7.
    What is DBMS? “In a Database Environment, a DBMS is the software that provides the interface between the data file on disk and the program that requests processing. ” 7
  • 8.
    Some Important Terms DML – or ‘Data Manipulation Language’ DML manipulates data, i.e. it specifies what is required  DDL – or ‘Data Definition Language’ DDL describes how the data is structured 8
  • 9.
    Functions of aDBMS  Storing, Retrieving and Updating data  Creating program and data independence  Enforcing Procedures for data integrity  Reducing data redundancy  Providing security facilities for defining users and enforcing authorizations  Reducing Physical storage requirements by separating the logical and physical aspects of the database. 9
  • 10.
  • 11.
    PHYSICAL VIEW OF DATA  It is the way data exist in physical storage.  It deals with how data stored, accessed, or related to other data in storage. 11
  • 12.
    LOGICAL VIEW OFDATA  what the data look like, regardless of how they are stored.  The logical views are the user’s view, the programmer’s view, and the overall logical view, called a schema. 12
  • 13.
    SCHEMAS  It isthe view that helps the DBMS (database management system) decide what data in storage it should act upon as requested by the application program.  Example: Is the arrival and departure display at an airport. 13
  • 16.
    SUBSCHEMAS  It isthe programmer’s (pilot’s) view.  Many subschemas can be derived from one schema.  Example: just as different pilots visualize different views of landing approach, although all (it is hoped) arrive at the sheduled time indicated on the CRT screen display (schema). 16
  • 18.
    What is anENTITY ?? AN ENTITY IS A THING OR OBJECT OF IMPORTANCE ABOUT WHICH DATA MUST BE CAPTURED. ALL THINGS AREN'T ENTITIES—ONLY THOSE ABOUT WHICH INFORMATION SHOULD BE CAPTURED. AN ENTITY IS SOMETHING THAT EXISTS INDEPENDENTLY .
  • 21.
  • 22.
    DATABASE NORMALIZATION  Database normalization is a design technique by which relational database systems are structured in such a way as to make them less vulnerable to certain types of logical inconsistencies and anomalies.  Tables can be normalized to varying degrees: relational database theory defines "normal forms" of successively higher degrees of stringency. 22
  • 23.
    Data Normalization An logicalentity (or physical table) is in first normal form if there are no attributes (fields) that can have more than one value for a single instance (record). An logical entity (or physical table) is in second normal form if it is already in first normal form and if the values of all nonprimary key attributes are dependent on the full primary key. An logical entity (or physical table) is in third normal form if it is already in second normal form and if the values of all nonprimary key attributes are not dependent on other nonprimary key attributes . 23
  • 24.
    First Normal Form The criteria for first normal form :  A table must be guaranteed not to have duplicate records.  There must not be any repeating groups, ie, no attributes which occur a different number of times on different records. 24
  • 25.
    R NO. NAME DOB SUBJECT GRADE 1 ABC 2 MARCH,1989 OS A BS A+ CONA B+ 2 DEF 25 DECEMBER,92 BS A ENGLISH A R NO. NAME DOB SUBJECT GRADE 1 ABC 2 MARCH,1989 OS A 1 ABC 2 MARCH,1989 BS A+ 1 ABC 2 MARCH,1989 CONA B+ 2 DEF 25 DECEMBER,92 BS A 2 DEF 25 DECEMBER,92 ENGLISH A
  • 26.
    Second Normal Form Criteria for second normal form :  The table must be in 1NF  None of the non-prime attributes of the table are functionally dependant on a part of a candidate key.  None of a 1NF’s candidate keys are composite. 26
  • 27.
    R NO. NAME DOB 1 ABC 2 MARCH,1989 2 DEF 25 DECEMBER,92 R NO. SUBJECT GRADE 1 OS A 1 BS A+ 1 CONA B+ 2 BS A 2 ENGLISH A
  • 28.
    Third Normal Form Criteria for third normal form:  Table must be in 2NF.  There are no non-trivial functional dependencies between two non prime attributes. 28
  • 29.
    SSN PNUMBER HOURS ENAME PNAME PLOCATION SSN PNUMBER HOURS SSN ENAME PNUMBER PNAME PLOCATION
  • 30.
    Roles of Database Administrator Managingdata activities Managing database structure Managing DBMS 30