Professional Documents
Culture Documents
(DBMS)
Unit -1
©
© Bharati
Bharati Vidyapeeth’s
Vidyapeeth’s Institute
Institute of
of Computer
Computer Applications
Applications and
and Management,
Management, New
New Delhi-63,By
Delhi-63 Dr. Vaishali Joshi, Asst.
1
U1.1
Professor
Data Base Management System
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.2
Professor
Use of DBMS
Corporate
Airlines
Hotels
Banks
Colleges /University
Railway reservation
Telecommunication Industry
Data mining
Libraries
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.3
Professor
Disadvantages of Flat File Systems
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.4
Professor
Advantages of Using DBMS
No Data Redundancy
Data Consistency
Mass Data Storage
Centralized Access
Automatic Backup Possible
Data Recovery Possible
Integrity Constraints
Easy updation & fetching of data
Only authorized Access
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.5
Professor
Data Base Characteristics
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.6
Professor
Classification of DBMS
• Relational DBMS:
Modeling concept: tables and constraints on tables
Query Language: SQL
Applications: suited for traditional business processing
• Object-Oriented DBMS
Modeling concepts: objects, classes, inheritance
Query Language: object oriented OQL
Applications: suited for CAD databases, CASE databases, office
automation
• Object-Relational DBMS:
Incorporate OO concepts into relational model
Similar functionality as OO-DBMS, but different implementations
Language: extended to process objects. Eg: Cloudscape, DB2
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.7
Professor
DBMS Overview
user
Applications/queries
Query processor
Storage manager
metadata data
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.8
Professor
Data Base Users
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.9
Professor
Roles of Data Base Administrator
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
10
Professor
Data Abstraction
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
11
Professor
Three-Layer Abstraction
Conceptual Schema
Physical Schema
isk
D
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
12
Professor
Description of Levels
Users Level:
• Any number of users may exists in this view.
• Different users may have different external views for the same data.
•It insulates the users from the details of internal & conceptual level.
Conceptual Level:
•This level is designed by data base administrator.
•Under this level a schema of data base is created by DBA.
•It represents the entire database and there can be only one conceptual view per database.
•It represents entities, their attributes and relationships between them.
•It is independent on the hardware and software.
• This is also known as Logical Level.
Internal Level:
•It indicates how the data will be stored ad describes the data structures and access
methods to be used by data base (ie. The physical implementation of data).
•It is concerned with storage space allocation, indexes, data compression etc.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
13
Professor
Data Independence
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
14
Professor
Data Independence
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
15
Professor
Mapping between views
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
16
Professor
DBMS Interface
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
17
Professor
DBMS Languages
• Data Definition Language (DDL)
Used to describe a schema
Eg: Create table, drop table, alter table etc
• Data Manipulation Language (DML)
Used by users to query the DB and change the data
Eg: Insert into, update, delete etc
• Data Control Language (DCL)
Used to specify access control on data
Eg: Grant, Revoke etc
• View Definition Language (VDL)
Define views
Eg: Create view etc
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
18
Professor
Data Model
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
19
Professor
Data Model Classification
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
20
Professor
Features of Flat Files
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
21
Professor
Disadvantages of flat files
• Potential duplication
• Data Inconsistency
• No centralized access
• Harder to change data format
• Poor at complex queries
• Poor at authorized access
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
22
Professor
Hierarchical Data Model
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
23
Professor
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
24
Professor
Drawbacks: Hierarchical DBMS
Can not handle Many-Many relationships.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
25
Professor
Network Data Model
In the network model, entities are organised in a graph in which some
entities can be accessed through several path.
The basic data modeling construct in the network model is the set
construct. A set consists of an owner record type, a set name, and a
member record type. A member record type can have that role in more
than one set, hence the multi-parent concept is supported. An owner
record type can also be a member or owner in another set.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
26
Professor
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
27
Professor
Relational Data Model
Relational model is based on relations construct.
It is bounded with 12 codd ’s rules.
Every information is stored in the form of columns and
rows.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
28
Professor
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
29
Professor
Relational Data Model
Example of tabular data in the relational model
Attributes
192-83-7465 Johnson
Alma Palo Alto A-101
019-28-3746 Smith
North Rye A-215
192-83-7465 Johnson
Alma Palo Alto A-201
321-12-3123 Jones
Main Harrison A-217
019-28-3746 Smith
North Rye A-201
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
30
Professor
Sample Relational Database
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
31
Professor
Instance
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
32
Professor
Schema
The overall design of the database is called the
database schema.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
33
Professor
Tuple
Tuple : Record
Attributes: columns
Entity : Tables
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
34
Professor
Semi-Structured Data Model
• Semi structured data model is a self describing data model, in this the
information that is normally associated with a scheme is contained within the
data and this property is called as the self describing property.
• In such database there is no clear separation between the data and the schema,
and the degree to which it is structured depends on the application. In some
forms of semistructured data there is no separate schema, in others it exists but
only places loose constraints on the data.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
35
Professor
Object Based Models
It is designed using the entities in the real world, attributes of each
entity and their relationship. It picks up each thing/object in the real
world which is involved in the requirement.
There are two types of object based data Models – Entity
Relationship Model and Object oriented data model.
ER data model is one of the important data model which forms the
basis for the all the designs in the database world. It defines the
mapping between the entities in the database.
Object oriented data model, along with the mapping between the
entities, describes the state of each entity and the tasks performed
by them.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
36
Professor
Object-Oriented Model
This data model is another method of representing real world
objects. It considers each object in the world as objects and isolates
it from each other. It groups its related functionalities together and
allows inheriting its functionality to other related sub-groups.
Let us consider an Employee database to understand this model
better. In this database we have different types of employees –
Engineer, Accountant, Manager, Clark. But all these employees
belong to Person group. Person can have different attributes like
name, address, age and phone
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
37
Professor
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
38
Professor
Advantages
Because of its inheritance property, we can re-use the attributes and
functionalities. It reduces the cost of maintaining the same data multiple times.
Also, these informations are encapsulated and, there is no fear being misused by
other objects. If we need any new feature we can easily add new class inherited
from parent class and adds new features. Hence it reduces the overhead and
maintenance costs.
Because of the above feature, it becomes more flexible in the case of any
changes.
Codes are re-used because of inheritance.
Since each class binds its attributes and its functionality, it is same as
representing the real world object. We can see each object as a real entity. Hence
it is more understandable.
Disadvantages
It is not widely developed and complete to use it in the database systems. Hence
it is not accepted by the users.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
39
Professor
Entity/Relationship (E/R) Model
• Entities: objects
• Relationships: associate entities
• Roles of entities in a relationship
• Constraints on entities:
domain constraints
key constraints
• Constraints on relationships:
Cardinality constraints
Participation constraints
Weak Entity Sets
• Multiway relationships
• Subclass/superclass Relationships
• Aggregation
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
40
Professor
Symbols Used in E-R Notation
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
41
Professor
Entities and Entity Sets
• Entities:
nouns, “things” in the world
Have attributes: course name, id, address, dept, age,
room, …
• Entity sets: a set of entities
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
42
Professor
Attributes
• Single-valued versus multi-valued:
“telephone number”: multi-valued
“Salary”: single-valued
• Atomic versus composite:
“Age”: atomic
“Address”: composite
• Derived versus stored:
Derived: derived from other attributes or entities, e.g.,
“age” derived from “date of birth.”
Stored: all other attributes
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
43
Professor
Relationships
259, 10K
Tom, 62900, Main, LA
305, 20K
Jane, 62901, North, Irvine
245, 2400
Customer Account
Tom 259 Visualizing relationships as a table.
Tom 305 Each row: pair of entities
Jane 305 participating in the relationship
Jane 245
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
44
Professor
ER Diagram
id name street balance
city number
age
Customer custacct Account
dob
tel
opendate
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
46
Professor
E-R Diagram With Composite, Multivalued, and
Derived Attributes
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
47
Professor
E-R Diagram for Hospital Management System
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
48
Professor
ER Diagram for Library Management System
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
49
Professor
Types of Keys
Super Key is defined as a set of attributes within a table that uniquely identifies each
record within a table. Super Key is a superset of Candidate key.
Candidate Key are minimal superkeys in an entity, one of those keys is selected to be
the primary key.
Primary Key is a candidate key that is chosen to uniquely identify entities within an
entity set like: rollno
Foreign Key is an attribute in an another relation schema whose values are derived from
the primary key of base relation.
Composite key - Key that consist of two or more attributes that uniquely identify an
entity occurance is called Composite key. But any attribute that makes up the Composite
key is not a simple key in its own.
Secondary key or Alternate Key - The candidate key which are not selected for primary
key are known as secondary keys or alternative keys
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
50
Professor
Roles in a Relationship
manager
employee works for
worker
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
51
Professor
Key Constraints on Entity Sets
• Associate each entity set with a “key,” which is set of
attributes that uniquely identify an entity in entity set.
• In ER diagram: denoted by underlining the attributes
• Multiple keys possible:
One primary key is chosen and underlined.
Other keys, called secondary keys, either not
indicated or listed in a side comment attached to the
diagram.
dept name
number balance
course
student
Account
No two accounts have the same number. No two students have the same
name in the same dept.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
52
Professor
Cardinality Constraints
A B A B A B
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
53
Professor
Data Association
•Associations exist between different attributes of
an entity.
•An association between two attributes indicates
that the values of the associated attributes are
interdependent.
•Relationship exists between entities (Binary
Relationship)
•A possible relationship that may exist between any
two sets may be -
• one-to-one
• one-to-many
• many-to-many
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
54
Professor
Many-to-many Relationship
opendate
legal
Customer Account Opendate
• Multiple customers can share an Tom 1001 Jan 20th 1999
account Jane 1001 March 16th 1999
• Many accounts may have one Jane 2001 Feb 18th 1994
owner
legal
U1.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
55
Professor
Many-to-One Relationship
customer
N 1
custacct account
opendate
Illegal
Customer Account Opendate
• Multiple customers can share an Tom 1001 Jan 20th 1999
account, but one customer can Jane 1001 March 16th 1999
have only one account. Jane 2001 Feb 18th 1994
• Represented by an arrow
pointing to “one.” legal
• Note: could have no account! Customer Account Opendate
Tom 1001 Jan 20th 1999
Jane 1001 March 16th 1999
U1.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
56
Professor
Many-to-One Relationship (cont)
opendate
opendate
U1.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
57
Professor
One-to-one Relationship
opendate
Illegal
• 1 customer can have (at most) 1 Customer Account opendate
account. Tom 1001 Jan 20th 1999
• 1 account can be owned by (at Jane 1001 March 16th 1999
most) 1 customer Illegal
• Relationship attributes “opendate” Customer Account opendate
Jane 1001 March 16th 1999
can be shifted to either entity set. Jane 2001 Feb 18th 1994
• One-to-one relationship is
considered as a special case of Legal
many-to-one relationship Customer Account opendate
Jane 1001 March 16th 1999
Tom 2001 Feb 18th 1994
U1.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
58
Professor
Participation Constraints
• It is the participation of an entity set E in a
relationship set R. It can be
- Total
- Partial
A B A B
Total Partial
U1.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
59
Professor
Weak Entity Sets
• Weak entity sets: they do not have sufficient attributes to form a key.
They need to “borrow” attributes from other entity sets to form a key.
• Example:
Transactions of different accounts could have the same trans#, so “trans#”
cannot be a key
By borrowing attribute “number” from “account,” we have a key for
“transaction.”
“Transaction” is a weak entity set related to accounts via log relationship.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
60
Professor
Weak Entity Sets (cont’)
• A weak entity set depends upon (one or more) strong entity sets via a
one-to-many relationship from whom they derive their key.
• The “helper” entity set that provides the attributes is called the “owner”
entity set.
• A weak entity set may have a discriminator (or a partial key) that
distinguish between weak entities related to the same strong entity
• Key of weak entity set = key of owner entity set(s) + discriminator
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
61
Professor
Weak Entity set
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
62
Professor
Strong entity set
An entity set that has a primary key is termed as strong
entity set.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
63
Professor
Subclass/Superclass Relationships
• Reason: An ES may have members with special properties not associated with all
ES members.
• Example: Different accounts have different attributes.
Checking Account: overdraft amount,
Savings account: interest-rate.
• Possible representations in ER:
Add an attribute “accountType”: a checking account has a value for the
“overdraft” attribute. A savings account has a value for the “rate” attribute.
Problem: inconsistency; useless attributes; different accounts participate
in different relationships.
Add two columns : IsCheckingAccount and IsSavingAcc:
The value for overdraft will be stored in IsCheckingAcc column.
And the interest_rate will be stored in IsSavingAcc column.
Problems : there will be many NULL values.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
64
Professor
Subclass/Superclass Relationships
account#
accounts
balance
ISA
savings checkings
rate overdraft
• The problems stated previously can be solved by using subclass/superclass
relationships.
• “Savings” and “checkings” are subclasses of the “account” ES.
• “Accounts” is a superclass of savings and checkings ES’s.
• An entity in a subclass must belong to the superclass as well.
Every savings/checking account is also an account.
• Attribute Inheritance:
Subclasses inherit all attributes of the superclass.
Key of the subclass is the same as the key for the superclass.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
65
Professor
Subclass/Superclass Relationships
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
66
Professor
Specialization
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
67
Professor
Specialization Example
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
68
Professor
Generalization
A bottom-up design process – combine a number of
entity sets that share the same features into a higher-
level entity set.
Generalization is the process of viewing objects as a
single general class by concentrating on the general
properties of the constituent sets while ignoring their
differences.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
69
Professor
Multiple Inheritance
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
70
Professor
Aggregation : Form 1
• This represents “whole-part or a-part-of” relationship. This is represented by a
hollow diamond followed by a line.
• In this type of relationship, a child object does not exist without its parent. And
a parent object may contain multiple instances of child object.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
71
Professor
Another form of Aggregation
Form 2: It allows a relationship set to participate in another relation.
Express that “an employee works on a specific project possibly using some
machines (could be 0).”
machinery
using machinery
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
72
Professor
Aggregation
using machinery
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
74
Professor
E/R Design Principles
• Keep the same schema: Schemas should not change often. So store
frequently changing information as instances.
currently each project consists of 10 members. Since later projects may
have more or less employees, do not hard code the 10 employees as 10
attributes of the project entity
• Avoid redundancy: schemas should prevent representing the same
facts multiple times.
An attribute/relationship is redundant if deleting it does not result in a
loss of any information
Redundancy may cause:
wastage of space
application programming more difficult: need to update all instances of a
fact to avoid inconsistency of database
• Consistent and clear names for attributes, entities, and relationships
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
75
Professor
Redundant Attributes
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
76
Professor
Redundant Relationship
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
77
Professor
Case Study 1
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
78
Professor
Design 1: bad
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
79
Professor
Design 2: good
Belongs-to
cities capitals
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
80
Professor
Case Study 2
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
81
Professor
Design 1: bad
Problem: does not capture the constraints that express trains only stop only at
express stations and local trains stop at all local stations
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
82
Professor
Design 2: good
number engineer
train
time name
address
ISA
local trains StopsAt2 stations
ISA
express trains
time
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
83
Professor
Case Study 3
An accounting firm wants a simple HR application that will help
it to keep track of its Employees, their positions (or
designations), allowances (or perks), salary scales, and which
departments have those positions.
The application must keep track of all the positions in the firm,
the employees appointed to fill up those positions, the
allowances granted to these positions, the salary scales for
these positions, and the departments having these positions.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
84
Professor
Dr. Edgar F. Codd (1923-2003)
Codd completed his PhD at the
University of Michigan in 1963,
and presented a thesis on the topic
of a self-reproducing computer
consisting of a large number of
simple identical cells, each of
which interacts in a uniform
manner with its four immediate
neighbors.
Codd reported this work in a
book entitled Cellular Automata
published by Academic Press in
1968.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
85
Professor
12 Codd's Rules
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
86
Professor
Rule 1 : The Information Rule
10 Rohit 20 Bv
11 Rahul 21 Abes
12 Amit 22 Jss
13 Simran 23 its
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
87
Professor
Rule 2 : Guaranteed Access Rule
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
88
Professor
Rule 3: Systematic treatment of null values
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
89
Professor
Rule 4: Dynamic on-line catalog based on the relational
model
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
90
Professor
Rule 5 : Comprehensive data sub-language Rule
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
91
Professor
Rule 6 : View updating Rule
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
92
Professor
Rule 7 : High-level Insert, Update and Delete
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
93
Professor
Rule 8 : Physical data independence
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
94
Professor
Rule 9 : Logical Data Independence.
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
95
Professor
Rule 10 : Integrity Independence
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
96
Professor
Rule 11 : Distribution Independence
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
97
Professor
Rule 12: The Non subversion rule
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
98
Professor
Short Questions:
Q.1 What is data independence?
Q.2.What do you mean by DBMS?
Q.3What is the difference between Generalization and
specialization?
Q.4 Describe the characteristics of DBMS.
Q.5 Explain all components of E-R Diagram.
Q.6 What is role of keys in DBMS and explain how many types of
keys are there?
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
99
Professor
Long Questions:
© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63,By Dr. Vaishali Joshi, Asst. U1.
100
Professor