Académique Documents
Professionnel Documents
Culture Documents
MANAGEMENT SYSTEM
For
Computer Science
&
Information Technology
By
www.thegateacademy.com
Syllabus
DBMS
Syllabus for
Data Base Management System
ER-model, Relational model (relational algebra, tuple calculus), Database design (integrity
constraints, normal forms), Query languages (SQL), File structures (sequential files, indexing, B
and B+ trees), Transactions and concurrency control.
Percentage of marks
2013
7.00
2012
11.00
2011
7.00
2010
6.00
2009
3.33
2008
7.33
2007
8.00
2006
6.00
2005
7.33
2004
8.00
2003
5.33
Overall Percentage
6.94%
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30 th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Contents
DBMS
CONTENTS
Chapter
#1.
#2.
#3.
Page No.
ER Diagrams
1 - 21
1-3
3-4
4
4 - 12
12
12 - 13
14 - 16
16 - 18
19
19 - 21
Levels of Abstraction
Entities
Relationship
Attribute
Specialization
Utility of E-R Model
Assignment 1
Assignment 2
Answer Keys
Explanations
22 - 51
22 - 24
24 - 25
25 - 28
28 - 29
29 - 32
32 - 42
43 - 45
45 - 47
48
48 - 51
52 - 69
52 - 53
53 - 54
54 - 55
55 - 56
56 - 57
57 - 58
58 - 60
60 - 61
62 - 64
65 - 66
67
67 - 69
Relational Algebra
The Projection Operator
Relational Algebra Operaton from Set Theory
Natural Joins
The Equijoin Operator
Outer Joins
Tuple Relational Calculus
The Domain Relation Calculus
Assignment 1
Assignment 2
Answer Keys
Explanations
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Contents
#4.
#5.
#6.
DBMS
SQL
70 - 99
70
70 - 71
71 - 77
77 - 79
79 - 82
83 - 89
89 - 95
95 - 96
97
97 - 99
What is SQL
DDL Statements
DML Statements
COLUMN Alias
View
Solved Examples
Assignment 1
Assignment 2
Answer Keys
Explanations
100 - 123
100 - 102
102 - 104
104 - 106
106 - 107
107 - 108
108 - 111
112
113 - 117
118 - 120
121
121 - 123
Transactions
Serializability
Concurrency Control Protocol
Time Stamps
Thomass Write Rule
Multiple Granularity
Solved Examples
Assignment 1
Assignment 2
Answer Keys
Explanations
File Structures
124 - 148
124 - 125
125 - 127
127 - 131
131 - 140
141 - 144
144 - 145
146
146 - 148
Module Test
149 - 161
149 - 156
157
157 - 161
Test Questions
Answer Keys
Explanations
Reference Books
162
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Chapter 1
DBMS
CHAPTER 1
ER Diagrams
DBMS Contains Information about a Particular Enterprise
Levels of Abstraction
Physical Level
Describes how a record (e.g., customer) is stored.
Logical Level
Describes data stored in database, and the relationships among the data.
View Level
Application programs hide details of data types. Views can also hide information (such as an
employees salary) for security purposes.
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Page 1
Chapter 1
DBMS
Points to Emphasize
What To Model?
Static Information
Data -- Entities
Associations -- Relationships among entities
Dynamic Information
Processes -- Operations/transactions
Integrity constraints -- Business rules/regulations and data meanings
What is data model?
A collection of tools for describing:data
data relationships
data semantics
data constraints
Data Model
A data model is a collection of concept that can be used to describe the structure of database.
Schema
The description of a database is called the database schema.
System Model Tools
Data flow diagram (DFD)
Hierarchical input process and output (HIPO)
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Page 2
Chapter 1
DBMS
Entity Set
Attribute
Multivated Attribute
Derived Attribute
Relationship Set
Identifying
Relationship Set for
Weak Entity Set
Primary Key
Components of E R model
Total participation of
Entity Set in
Relationship
Discriminating Attribute
of Weak Entity Set
Fig. 1.1
a. Entity
b. Relationship
c. Attributes
Entities
The basic object that the ER model represents is an entity, which is a thing in the real world
with an independent existence and is distinguishable
Examples:
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Page 3
Chapter 1
DBMS
Example:- Identify two entities that might be important for a retail business.
Solution:- Two entities for a business might include employee and customer.
Entity Set
A set of entities of the same type.
Example: All the student entities in a college
Entity sets need not be disjoint.
Example: A person entity could be in both the customer and employee sets
Types of Entities
Entities with physical existence
Example: Student, customer, book etc
Entities with Conceptual existence
Example: Sale, University course etc
Relationship
An association among two or more entities.
Example: The relationship between a Faculty and Student i.e. faculty take course for student
Relationship Set
A set of relationships of the same type
Attribute
The particular properties of entity that describe it
Example: A student entity might have attributes such as: Roll number, name, age, address etc.
As all entities in an entity set have the same attributes, entity sets also have attributes - the
attributes of the contained entities. The value of the attribute can be different for each entity in
the set.
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Page 4
Chapter 1
DBMS
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Page 5
Chapter 1
DBMS
For example 'Date of birth' of a person is a stored attribute. The value for the attribute 'AGE' can
be derived by subtracting the 'Date of Birth'(DOB) from the current date. Stored attribute
supplies a value to the related attribute.
Stored Attribute: An attribute that supplies a value to the related attribute.
Example: Date of Birth
Derived Attribute: An attribute thats value is derived from a stored attribute.
Example : Age and its value is derived from the stored attribute Date of Birth.
Domain of Attribute
A set of possible values for an attribute (the type of the attribute).
Examples: The domain of student name might be strings of some fixed length.
The domain of roll number might be 10 digit positive integers or alphanumeric.
Relationship Degrees
Unary
Binary
Employee
Employee
Work
Department
Supervise
n-ary
Ternary
project
Supply
Part
Supplier
Fig. 1.2
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, info@thegateacademy.com Copyright reserved. Web: www.thegateacademy.com
Page 6