Physical and Logical data
Independence
Logical Data Independence
What do you mean by logical data
independence?
The ability to change the logical schema without changing the
external schema or application programs is called as Logical
Data Independence.
OR
The ability to change the logical schema without having to
change the external schema.
Examples
The addition or removal of new entities,
attributes, or relationships to the conceptual
schema should be possible without having to
change existing external schemas or having to
rewrite existing application programs.
Physical Data Independence
What do you mean by Physical Data
Independence
 The ability to change the physical schema without
changing the logical schema is called as Physical Data
Independence. Changes in the physical schema may
include.
 Using new storage devices.
 Using different data structures.
 Switching from one access method to another.
 Using different file organizations or storage structures.
 Modifying indexes.
Examples
A change to the internal schema, such as using
different file organization or storage structures,
storage devices, or indexing strategy, should be
possible without having to change the conceptual or
external schemas.
Entity Relationship
Elements of E-R Model
 In the E/R model, the structure of data is represented
graphically, as an “entity-relationship diagram,” using
three Principal element types:
 Entity Sets.
 An entity is an abstract object of some sort, and a
collection of similar entities forms an entity set.
 Attributes
 The properties of the entities in the set.
 Relationship
 The connections among two or more entity Sets
Example of Elements of E-R Model
Entity Sets
Departments
Professors
Students
Administrators
Attributes
Name of Departments, Phone No., Address...
Name, SSN, Address of Professors...
Relationship
Students and Professors are under a certain department
Admin manage the campus/ departments
Attribute
 An attribute is an item of data held about an
entity
 In computer systems an attribute is a field of
information
 Example : Sales System
 Entity : Customer
 Attributes : Customer Name, Customer Address,
Customer Phone Number
 A key attribute uniquely identifies a specific occurrence of an
entity
 This may also be referred to as a primary key
 Examples of primary keys include:
 ISBN
 Student Number
 Staff ID
 In a Sales System, customer name and address are
attributes of the entity customer.
 The primary key is likely to be Customer Code or
Customer ID as the unique identifier for each customer in
the system.
For Example
Example: A library database contains a listing of authors
that have written books on various subjects (one author per
book). It also contains information about libraries that carry
books on various subjects.
Entity sets: authors, subjects, books, libraries
Relationship sets: wrote, carry, indexed
carry
books indexwrote subjectauthors
SS#
name
title
libraries
quantity
address
isbn
Subject
matter
Entity-Relationship (E-R) Model
COURSE# CTITILE PROF SCHED
ROOM
COURSE
ENROLL
STUDENT
STUID SNAME MAJOR CREDITS
GRADE
Example of the 3 elements in Entity
Relationship Diagram
Entity
B
Relationship
Attribute
Entity
C
Entity
A
Attribute
Attribute

Dbms logical dependance

  • 1.
    Physical and Logicaldata Independence
  • 2.
  • 3.
    What do youmean by logical data independence? The ability to change the logical schema without changing the external schema or application programs is called as Logical Data Independence. OR The ability to change the logical schema without having to change the external schema.
  • 4.
    Examples The addition orremoval of new entities, attributes, or relationships to the conceptual schema should be possible without having to change existing external schemas or having to rewrite existing application programs.
  • 6.
  • 7.
    What do youmean by Physical Data Independence  The ability to change the physical schema without changing the logical schema is called as Physical Data Independence. Changes in the physical schema may include.  Using new storage devices.  Using different data structures.  Switching from one access method to another.  Using different file organizations or storage structures.  Modifying indexes.
  • 8.
    Examples A change tothe internal schema, such as using different file organization or storage structures, storage devices, or indexing strategy, should be possible without having to change the conceptual or external schemas.
  • 9.
  • 10.
    Elements of E-RModel  In the E/R model, the structure of data is represented graphically, as an “entity-relationship diagram,” using three Principal element types:  Entity Sets.  An entity is an abstract object of some sort, and a collection of similar entities forms an entity set.  Attributes  The properties of the entities in the set.  Relationship  The connections among two or more entity Sets
  • 11.
    Example of Elementsof E-R Model Entity Sets Departments Professors Students Administrators Attributes Name of Departments, Phone No., Address... Name, SSN, Address of Professors... Relationship Students and Professors are under a certain department Admin manage the campus/ departments
  • 13.
    Attribute  An attributeis an item of data held about an entity  In computer systems an attribute is a field of information  Example : Sales System  Entity : Customer  Attributes : Customer Name, Customer Address, Customer Phone Number
  • 14.
     A keyattribute uniquely identifies a specific occurrence of an entity  This may also be referred to as a primary key  Examples of primary keys include:  ISBN  Student Number  Staff ID  In a Sales System, customer name and address are attributes of the entity customer.  The primary key is likely to be Customer Code or Customer ID as the unique identifier for each customer in the system. For Example
  • 16.
    Example: A librarydatabase contains a listing of authors that have written books on various subjects (one author per book). It also contains information about libraries that carry books on various subjects. Entity sets: authors, subjects, books, libraries Relationship sets: wrote, carry, indexed carry books indexwrote subjectauthors SS# name title libraries quantity address isbn Subject matter
  • 17.
    Entity-Relationship (E-R) Model COURSE#CTITILE PROF SCHED ROOM COURSE ENROLL STUDENT STUID SNAME MAJOR CREDITS GRADE
  • 18.
    Example of the3 elements in Entity Relationship Diagram Entity B Relationship Attribute Entity C Entity A Attribute Attribute