Academic Dairy: II B.Tech
Academic Dairy: II B.Tech
Academic Dairy: II B.Tech
CONTEN
TS
Syllabus
ACADEMIC DAIRY
Lecture
Plan
Assignm
ents
Importan
t
Question
II B.Tech II Semester
Academic Dairy
for
Database Management
II Systems
II B.Tech
SEMESTE
1. Computer Organization
R
2012-13
Faculty:Mr.J.Shiva Prashanth
5.
6.
01
01
01
01
01
09
Important Questions
One mark questions and answers:1. what are the main functions of DBA
authorizing users to access the database
coordinating/monitoring its use
acquiring hardware/software resources for upgrades
2. what is meant by data independence
Data independence is the capacity to change the schema at one level of the architecture
without having to change the schema at the next higher level. We distinguish between
logical and physical data independence according to which two adjacent levels are
involved. The former refers to the ability to change the conceptual schema without
Academic Dairy Handbook II CSE II SEM
2
describes the (logical) structure of the whole database for a community of users. Hides
physical storage details, concentrating upon describing entities, data types, relationships,
user operations, and constraints. Can be described using either high-level or
implementational data model.
Applications:
1) Idea of Format of Data
2) Logical storage of Data
3) Structure of DBMS
Students Expected to Learn:
1) Structure of Data, Database, Database Management Systems
2) Views and Levels of Abstraction
3) Database Languages DDL, DML
Unit-II
Syllabus:
History of Database Systems, Database Design and ER diagrams, Beyond ER design entities,
Attributes and Entity Sets, Relationships and Relationship Sets, Additional features of ER model,
Concept Design with ER Model, Conceptual Design for Large Enterprises.
Objectives:
1)
2)
3)
4)
Time Table:
Topic
No of Hours
History of DBMS,
01
Database design, ER
design,
Beyond ER design,
01
Entities, Attributes
Entities, Relationship
01
and Relationship sets
Additional Features of
01
ER model
Tutorial
01
Concept design with
01
ER model
Conceptual design for
01
Large
Database
Systems
Total
07
Important Questions:
Date
Teaching Plan:
Topic
Relational Model,
Integrity Constraints,
Querying relational
model
Logical Database
design, introduction to
views
Destroying/altering
tables
Relational Algebra
Tutorial
Selection and
Projection
Joins, renaming
Tuple relational
Calculus
Domain relational
calculus
Tutorial
Expressive power of
algebra and calculus
Total
No of Hours
01
01
01
01
01
01
02
01
01
01
01
12
Date
Remark
Important Questions:
Requirements Analysis
user needs; what must database do?
Conceptual Design
high level description (often done with ER model)
Logical Design
translate ER into DBMS data model(Relational model)
(NOW)Schema Refinement
consistency,normalization
Physical Design
- indexes, disk layout
Security Design
- who accesses what
Good Database Design
Unit-IV
Syllabus:
Form of Basic SQL query, Examples of basic SQL queries, introduction to nested queries,
correlated nested queries set, comparison operators, aggregate operators, NULL values,
comparison using NULL values, Logical Connectivitys, Impact on SQL constructs, Outer joins,
disallowing NULL values, complex integrity constraints in SQL triggers and active databases.
Objectives:
1)
2)
3)
4)
5)
No of Hours Required
01
01
01
01
01
01
01
01
01
01
10
Date
Remark
Important Questions:
1. Describe the three schema architecture. Why do we need mapping b/w schema levels
2. list the cases in which null values are appropriate with examples
3. differentiate b/w FPS and DBMS
4. design a conceptual data base design for health insurance system
5. compare and contrast Relational model and Hierarchical model
6. explain the basic operations of Relational Algebra with examples
7. Draw and explain the DBMS component modules
8. what are advantages of DBMS
9. explain the difference b/w among entity, entity type and relation ship set
10. what is integrity constraint explain deferent constraints in DBMS
11. what are the functions of DBA
12. write about architecture of DBMS
13. explain about various database users
14. what are various capabilities of DBMS
15. what is the difference b/w logical data independence and physical data independence
16. discuss the the main types of constraints on specialization and generalization
17. what is e-r model .explain the components E-R model
18. what is sql and various types of commands
19. explain about relation model and advantages of rm.
Unit-V
Syllabus:
Schema Refinement Problems caused by redundancy, Decomposition Problems related to
decomposition, reasoning about functional dependency, first, second, third normal forms, boyce
codd normal form, Loseless Join Decomposition, Dependency preserving decomposition,
Schema refinement in Database design, Multi valued dependency, fourth normal form
Objectives:
1) Learning Redundancy, Problems caused by the redundancy
2) Decomposition and the problems caused by the decomposition
3) Normal Forms 1NF,2NF,3NF, BCNF
Lecture Plan:
Topic
Redundancy, Concept
of Redundancy
Decomposition,
concept of
decomposition
Functional
Dependency, 1NF
2NF, 3NF
Tutorial
Lose less join,
dependency
preservation
Multi valued
dependency
4NF
Total
No of Hours required
01
01
01
01
01
01
01
01
08
Date
Remark
Important Questions:
Normalization:
The process of decomposing unsatisfactory "bad" relations by breaking up their attributes into
smaller relations
Normalization is used to design a set of relation schemas that is optimal from the point of
view of database updating
Normalization starts from a universal relation schema
1NF
Attributes must be atomic:
they can be chars, ints, strings
they cant be
1. _ tuples
2. _ sets
3. _ relations
4. _ composite
5. _ multivalued
Considered to be part of the definition of relation
Unnormalised Relations
Name
PaperList
SWETHA
EENADU, HINDU,DC
PRASANNA EENADU,VAARTHA,HINDU
This is not ideal. Each person is associated with an unspecified
number of papers. The items in the PaperList column do not have a consistent form.
Generally, RDBMS cant cope with relations like this. Each
entry in a table needs to have a single data item in it.
This is an unnormalised relation.
All RDBMS require relations not to be like this - not to havemultiple values in any column (i.e.
no repeating groups)
Name
SWETHA
SWETHA
SWETHA
PRASANNA
PRASANNA
PRASANNA
PaperList
EENADU
HINDU
DC
HINDU
EENADU
VAARTHA
splitting the relation and propagating the primary key to remove multi valued attributes
Example:-
The DEPARTMENT schema is not in 1NF because DLOCATION is not a single valued
attribute.
The relation should be split into two relations. A new relation DEPT_LOCATIONS is
created and the primary key of DEPARTMENT, DNUMBER, becomes an attribute of the
new relation. The primary key of this relation is {DNUMBER, DLOCATION}
Alternative solution: Leave the DLOCATION attribute as it is. Instead, we have one tuple
for each location of a DEPARTMENT. Then, the relation is in 1NF, but redundancy
exists.
A super key of a relation schema R = {A1, A2, ...., An} is a set of attributes S subset-of R
with the property that no two tuples t1 and t2 in any legal relation state r of R will have
t1[S] = t2[S]
A key K is a super key with the additional property that removal of any attribute from K
will cause K not to be a super key any more.
If a relation schema has more than one key, each is called a candidate key.
One of the candidate keys is arbitrarily designated to be the primary key, and the
others are called secondary keys.
A Prime attribute must be a member of some candidate key
Trivial functional dependency means that the right-hand side is a subset ( not necessarily a
proper subset) of the left- hand side.
Main characteristics of functional dependencies in normalization
Have a one-to-one relationship between attribute(s) on the left- and right- hand side of a
dependency;
hold for all time;
are nontrivial.
A set of all functional dependencies that are implied by a given
set of functional dependencies X is called closure of X, written
X+. A set of inference rule is needed to compute X+ from X.
Inference Rules (RATPUP)
1. Relfexivity:
If B is a subset of A, them A B
2NF
Second normal form (2NF) is a relation that is in first normal form and every non--key
attribute is fully functionally dependent on the key.
The normalization of 1NF relations to 2NF involves the removal of partial dependencies. If
a partial dependency exists, we remove the functional dependent attributes from the
relation by placing them in a new relation along with
a copy of their determinant.
Obtaining 2NF
Academic Dairy Handbook II CSE II SEM
20
BCNF
R is in Boyce-Codd Normal Form iff
if X A then X is a superkey of R
more restrictive than 3NF , preferablehas fewer anomalies
Obtaining BCNF
As usual, split the schema to move the attributes of the troublesome FD to another
relation, leaving its determinant in the original so they remain connected
Decomposition:
The process of decomposing the universal relation schema R into a set of
relation schemas D = {R1,R2, , Rm} that will become the relational
database schema by using the functional dependencies.
Attribute preservation condition:
Each attribute in R will appear in at least one relation schema Ri in the
decomposition so that no attributes are lost.
Dependency Preservation Property of a Decomposition:
Definition: Given a set of dependencies F on R, the projection of F on Ri,
denoted by pRi(F) where Ri is a subset of R, is the set of dependencies X g Y in
F+ such that the attributes in X Y are all contained in Ri.
Hence, the projection of F on each relation schema Ri in the decomposition D is
the set of functional dependencies in F+, the closure of F, such that all their leftand right-hand-side attributes are in Ri.
Dependency Preservation Property:
A decomposition D = {R1, R2, ..., Rm} of R is dependency-preserving
with respect to F if the union of the projections of F on each Ri in D is
equivalent
to
F;
that
is
((R1(F)) . . . (Rm(F)))+ = F+
Lossless (Non-additive) Join Property of a Decomposition:
Definition: Lossless join property: a decomposition D = {R1, R2, ..., Rm} of R
has the lossless (nonadditive) join property with respect to the set of
Academic Dairy Handbook II CSE II SEM
24
Normalization
A technique for producing a set of relations with desirable
properties, given the data requirements of an enterprise
UNF is a table that contains one or more repeating groups
1NF is a relation in which the intersection of each row and column contains one
and only one value
2NF is a relation that is in 1NF and every non-primary-key attribute is fully
functionally dependent on the primary key.
3NF is a relation that is in 1NF, 2NF in which no non-primary-key attribute is
transitively dependent on the primary key
BCNF is a relation in which every determinant is a candidate key
4NF is a relation that is in BCNF and contains no trivial multi-valued
dependency
Unit-VI
Syllabus:
Transaction- Transaction Management, Transaction state, Implementation of Atomicity and
durability, Concurrent executions, serializability, recoverability, Implementation of Isolation,
Testing for Serializability, Lock based protocols, Time stamp based protocols, validation based
protocols, multiple granularity
Objective:
1)
2)
3)
4)
Concept of Transaction
ACID properties
Serializability
Locks implementation
Lecture Plan:
Topic
Transaction, Transaction
Management
ACID properties
Atomicity, Durability
Concurrent execution,
Isolation
Locks, Implementation
of Locks
Tutorial
Timestamp based
protocols
Multiple Granularity,
revision
Total
No of Hours
01
Date
Remark
01
01
01
01
01
01
07
Important Questions:
1. What is atomicity property
Transaction boundaries:
o Begin and End transaction.
An application program may contain several transactions separated by the Begin and
End transaction boundaries.
Basic operations are read and write
o read_item(X): Reads a database item named X into a program variable. To
simplify our notation, we assume that the program variable is also named X.
o write_item(X): Writes the value of program variable X into the database item
named X.
7. What is Trigger
Triggers are simply stored procedures that are ran automatically by the database
whenever some event happens.
8. What is the use of serializability
Achieving concurrency by executing no. of transactions at a time
Fast response to the user with correct result
Utilization of recourses efficiently
9. What are transaction primitives
Transaction boundaries are nothing but transaction primitives. They are
Begin Transaction and End Transaction.
10. What is an Assertion
Assertion is nothing but a name given to a set of user defined constraints.
11. What are uses of Transaction
Its all about fast query response time and correctness
DBMS is a multi-user systems
o Many different requests
o Some against same data items
Figure out how to interleave requests to shorten response time while guaranteeing
correct result
o How does DBMS know which actions belong together?
Solution: Group database operations that must be performed together into transactions
o Either execute all operations or none
12. What are Anomalies
Refers to a deviation from the common rule(s), type(s), arrangement(s), or form(s).
The general anomalies are insertion, updation, and deletion anomalies.
13. Define view serializability
View equivalence:
Two schedules are said to be view equivalent if the following three conditions hold:
Academic Dairy Handbook II CSE II SEM
30
Lecture Plan:
Topic
Recovery and
Atomicity
Log based recovery
Recovery with
concurrent execution,
buffer management
Failure with loss of
non volatile systems
Tutorial
Advance recovery
systems, remote back
up systems
Total
No of Hours
01
Date
01
01
01
01
01
06
Important Questions:
1)
2)
3)
4)
Remark
Unit-VIII
Syllabus:
Data on external storage, File Organization and indexing, cluster indexes, Primary and secondary
indexes, Index data structures, hash based indexing, tree based indexing, comparison of file
indexing, index and performance tuning, intuitions for tree indexing, Indexed sequential access
methods B+ trees, A dynamic index structure
Objective:
1)
2)
3)
4)
5)
Lecture Plan:
Topic
Data storage overview
File organization and
indexing
Index data structures,
hash based indexing
Tree based indexing,
index and
performance tuning
Tutorial
Indexed sequential
access methods
Dynamic index trees
Total
No of Hours
01
01
Date
01
01
01
01
01
07
Important Questions:
1)
2)
3)
4)
Define catalog
Define indexing, hash based indexing and tree based indexing
Define B+ trees
What is dynamic indexing
Remark