BITS WILP Database Design and Applications Handout 2017-H1


BITS WILP Database Design and Applications Handout 2017-H1
BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI
WORK INTEGRATED LEARNING PROGRAMMES
Digital Learning
Part A: Course Design
Course Title
Database Design and Applications
Course No(s)
SS ZG518
Credit Units
5
Credit Model
NA
Content Authors
R Gururaj

Course Objectives
No
Course Objective
CO1
Enrich the skill and competency of students in Design and Development of Database Systems through experiential learning.
CO2
Provide knowledge about the internals of Database Management Systems.
CO3
Prepare students to tackle the challenges in operationalizing Database Systems, like- maintaining consistency and integrity, performance etc .

Text Book(s)
T1
Ramez Elmasri & Shamkant B. Navathe, Database Systems; Models, Languages, Design and Application Programming, Pearson Education, 5th Edition, 2007.

Reference Book(s) & other resources
R1
Abraham Silberschatz, Henry F Korth and S Sudarshan, Database System Concepts,  McGraw Hill, 6th  Ed., 2013
R2
Date C.J., An Introduction to Database Systems, Addison Wesley, 8th Ed., 2006.



Content Structure
      1.            Introduction to Database Management Systems (DBMS) Concepts and Architecture
                        1.1.            Database Management Systems Introduction
                                          1.1.1.            Basics and advantages of storing data using DBMS
                                          1.1.2.            Database systems environment
                        1.2.            Database Management System Architecture
                                          1.2.1.            Abstraction and Three-schema architecture
                                          1.2.2.            Basic modules of DBMS
                                          1.2.3.            DBMS Users
      2.            Data Modeling
                        2.1.            Database Design and ER Modeling
                                          2.1.1.            Steps in database Design Process
                                          2.1.2.            Concepts and notations
                                          2.1.3.            Relationships and constraints
                                          2.1.4.            Examples
                        2.2.            Relational Data Model concepts
                                          2.2.1.            Relational data model fundamentals
                                          2.2.2.            Constraints in Relational data model
                                          2.2.3.            Representation of schemas
                        2.3.            ER to Relational Mapping
                                          2.3.1.            Mapping rules/guidelines for mapping ER constructs
                                          2.3.2.            Mapping rules/guidelines for mapping heirarchies
                                          2.3.3.            Examples

      3.            Relational Query Languages
                        3.1.            Relational Algebra
                                          3.1.1.            Basic Relational operations
                                          3.1.2.            Other operations and Joins
                        3.2.            SQL
                                          3.2.1.            Introduction to SQL
                                          3.2.2.            SQL features
                                          3.2.3.            SQL join operations
                                          3.2.4.            SQL Grouping operations
                                          3.2.5.            SQL views
      4.            Schema Refinement
                        4.1.            Functional Dependencies
                                          4.1.1.            Functional dependencies
                                          4.1.2.            Inference rules
                        4.2.            Normalization and Decomposition
                                          4.2.1.            First and Second Normal forms
                                          4.2.2.            Third and BCNF normal forms
                                          4.2.3.            Decomposition and desirable properties
                                          4.2.4.            Lossless join decomposition
                                          4.2.5.            Dependency preserving decomposition
      5.            Data storage, Hashing and Indexing
                        5.1.            Disk storage
                                          5.1.1.            Disk features
                                          5.1.2.            Storage capacity
                                          5.1.3.            File and Record organization
                                          5.1.4.            Types of File organizations
                                          5.1.5.            Types of record organizations
                        5.2.            Hashing Techniques
                                          5.2.1.            Static external Hashing
                                          5.2.2.            Dynamic hashing schemes
                        5.3.            Indexing Techniques
                                          5.3.1.            Introduction to indexing
                                          5.3.2.            Primary and secondary indexing
                                          5.3.3.            Multilevel indexing
                                          5.3.4.            B+ tree indexing
      6.            Transaction processing, concurrency control and recovery
                        6.1.            Transaction model
                                          6.1.1.            Transaction significance
                                          6.1.2.            States of a transaction
                                          6.1.3.            Schedules- serial and concurrent
                        6.2.            Concurrency Control
                                          6.2.1.            Need for Concurrency control
                                          6.2.2.            Lock based concurrency control and Deadlocks
                                          6.2.3.            Time-stamp based concurrency control
                        6.3.            Database Recovery
                                          6.3.1.            Log based recovery techniques
                                          6.3.2.            Checkpointing
                                          6.3.3.            Shadow paging
      7.            Advanced topics
                        7.1.            Query optimization and Tuning
                                          7.1.1.            Query execution steps
                                          7.1.2.            Query trees
                                          7.1.3.            Heuristics
                                          7.1.4.            Database tuning concepts
                        7.2.            Database security
                                          7.2.1.            Access control mechanisms
                                          7.2.2.            Statistical database security challenges
                                          7.2.3.            Flow control and sec
                        7.3.            Database Design methodology and UML
                                          7.3.1.            Role of information systems
                                          7.3.2.            Design process
                                          7.3.3.            UML and tools in Database
                        7.4.            XML data model
                                          7.4.1.            Basics of XML
                                          7.4.2.            DTD and schemas
                                          7.4.3.            XML storage
                                          7.4.4.            XML query languages- XPath and  XQuery 



Learning Outcomes:
No
Learning Outcomes
LO1
More effective and efficient Database Systems leading to more elegant Information System.
LO2
Students are equipped with knowledge on database concepts like- Modelling, Querying, Transactions, Indexing, Recovery etc.
LO3
Students are equipped with the knowledge to tune the Database Systems and Applications for improved performance, response-time etc.

Part B: Contact Session Plan

Academic Term
Second Semester 2016-2017
Course Title
DATABASE DESIGN AND APPLICATIONS
Course No
SS ZG518
Content Developer
R Gururaj

Glossary of Terms:
1.      Contact Hour (CH) stands for a hour long live session with students conducted either in a physical classroom or enabled through technology. In this model of instruction, instructor led sessions will be for 20 CH.
a.       Pre CH = Self Learning done prior to a given contact hour
b.      During CH = Content to be discussed during the contact hour by the course instructor
c.       Post CH = Self Learning done post the contact hour
2.      RL stands for Recorded Lecture or Recorded Lesson. It is presented to the student through an online portal. A given RL unfolds as a sequences of video segments interleaved with exercises
3.       SS stands for Self-Study to be done as a study of relevant sections from textbooks and reference books. It could also include study of external resources.
4.      LE stands for Lab Exercises
5.      HW stands for Home Work will consists could be a selection of problems from the text.


Contact Hour 1
Time
Type
Sequence
Content Reference
Pre CH
RL1.1
DBMS_RL_1.1:
Database Systems
DBMS
Database System environment
Traditional file systems for storing data
Advantages of DBMS over traditional file systems

Ch.1 (T1) 1.1 to 1.6

Pre CH
RL1.2
DBMS_RL_1.2:
Describing and Storing data in DBMS
Three schema Architecture
Data independence
Queries
Transactions
Structure of a DBMS
People who work with DBMS
Ch.2  (T1) 2.1 to 2.4
During CH
CH1
We discuss important concepts like advantages of using DBMS over traditional file systems; Three schema architecture; Data independence; DBMS architecture.
Ch.1 (T1) 1.1 to 1.6
and Ch.2  (T1) 2.1 to 2.4
Post CH
SS1
To be announced at the end of the contact hour(CH1).
Ch.2  (T1) 2.5 & 2.6
Ch.1  (R1) 1.6 and 1.13


Notes: T1 stands for Textbook 1, R1 stand for Reference book 1
Contact Hour 2
Time
Type
Sequence
Content Reference
Pre CH
RL2
DBMS_RL_2.1:
Steps in Database Design Process
ER Concepts (Entities, Attributes, Associations, etc)
ER Notations
Class Hierarchies

 Ch.3 (T1) 3.1 to 3.7
 Ch.4 (T1) 4.1 to 4.3

During CH
CH2
We discuss ER concepts, notations with appropriate examples. We learn how to model databases using ER techniques.
Ch.3 (T1) 3.1 to 3.7
Ch.4 (T1) 4.1 to 4.3

Post CH
HW2
To be announced at the end of the contact hour (CH2).





Contact Hour 3
Time
Type
Sequence
Content Reference
Pre CH
RL3
DBMS_RL_2.2:
What is Relational model
Characteristics
Relational constraints
Representation of schemas
Ch.5 (T1)
During CH
CH3
We discuss to have a better understanding of characteristics and Constraints of Relational model with proper examples.
Ch.5 (T1)
Post CH
SS3
Updates and dealing with constraint violations in Relational model
Ch.5 (T1) 5.3
Ch.2  (R1) 2.6

Post CH
QZ3
To be announced at the end of the contact hour (CH3).


Contact Hour 4
Time
Type
Sequence
Content Reference
Pre CH
RL4
DBMS_RL_2.3:
Guidelines for ER to Relational Mapping.
Ch.7 (T1) 7.1, 7.2
During CH
CH4
We understand Mapping rules/ guidelines for mapping various ER constructs to Relational model with appropriate examples
Ch.7 (T1) 7.1, 7.2
Post CH
HW4
To be announced at the end of the contact hour (CH4).


Contact Hour 5
Time
Type
Sequence
Content Reference
Pre CH
RL5
DBMS_RL_3.1:
Relational Query Languages Formal Query Languages
Introduction to Relational Algebra
Relational operators
Set operators
Join operators
Aggregate functions.
Grouping operator
Relational Calculus concepts
Ch.6 (T1) 6.1, 6.6
During CH
CH5
We practice writing Relational algebra queries for data retrieval with sample relational schemas. This consolidates our understanding of relational algebra operations. 
 Ch.6 (T1) 6.1, 6.6
Post CH
SS5
More on Tuple relational calculus (TRC)

Ch.6 (T1)  6.6
Post CH
HW5
To be announced at the end of the contact hour (CH5).

Post CH
QZ5
To be announced at the end of the contact hour (CH5).


Contact Hour 6
Time
Type
Sequence
Content Reference
Pre CH
RL6
DBMS_RL_3.2:

Introduction to Structured Query Language (SQL)
Features of SQL
DDL Statements

Ch.8 (T1)  8.1 to 8.4
During CH
CH6
We practice writing SQL queries for data retrieval with sample relational schemas. This consolidates our understanding of SQL operations. 
Ch.8 (T1)  8.1 to 8.4
Post CH
HW6
To be announced at the end of the contact hour (CH6).


Contact Hour 7
Time
Type
Sequence
Content Reference
Pre CH
RL7
DBMS_RL_3.2_Cntd:

SQL features like Nested Joins; Explicit join operations, Aggregate and Grouping operations; DML statements; SQL Views
Ch.8 (T1)  8.5 to 8.8
During CH
CH7
We practice writing SQL queries for data retrieval with sample relational schemas. This consolidates our understanding of SQL operations. 
Ch.8(T1) 8.1 to 8.8
Post CH
SS7
Advanced SQL Concepts:
Triggers, Functions, Procedures, and Sequences.
Ch.5 (R1)  5.1 to 5.3
Post CH
HW7
To be announced at the end of the contact hour (CH7).

Post CH
QZ7
To be announced at the end of the contact hour (CH7).


Contact Hour 8
Time
Type
Sequence
Content Reference
Pre CH
RL8
DBMS_RL_4.1:

Introduction to Schema Refinement
Functional Dependencies
Inference Rules
Normalization
Normal Forms (1NF and 2NF)
Ch.10 (T1)  10.1 to 10.3
Ch. 15 (T1, 6e)
During CH
CH8
Understand Functional dependencies, 1 NF and 2 NF with examples

Ch.10 (T1)  10.1 to 10.3
Ch. 15 (T1, 6e)
Post CH
HW8
To be announced at the end of the contact hour (CH8).


Contact Hour 9
Time
Type
Sequence
Content Reference
Pre CH
RL9
DBMS_RL_4.2:

3 NF, BCNF, Decomposition and properties to be taken care
Ch.10 (T1)  10.4 and 10.5
Ch. 15 (T1, 6e)

Ch.11 (T1)  11.1 and 11.2
During CH
CH9
Look at 3 NF, BCNF and Decomposition with examples

Ch.10 (T1)  10.4 and 10.5 Ch. 15 (T1, 6e)
Ch.11 (T1)  11.1 and 11.2
Post CH
HW9
To be announced at the end of the contact hour (CH9).

Post CH
QZ9
To be announced at the end of the contact hour (CH9).



Contact Hour 10
Time
Type
Sequence
Content Reference
Pre CH
RL10
DBMS_RL_5.1 &
DBMS_RL_5.2:

Disk pack features
Records and Files
File operations
Ordered and Unordered  files
Ch.13 (T1)  13.1 to 13.7
Chapter 17 Disk Storage, Basic File Structures, and Hashing (T1 6e)
During CH
CH10
To understand Secondary disk storage device; Files, records, blocks on disks

Ch.13 (T1)  13.1 to 13.7

Post CH
SS10
More on Storage devices
Ch.10 (R1)  10.1-10.4


Contact Hour 11
Time
Type
Sequence
Content Reference
Pre CH
RL11
DBMS_RL_5.3:
Hashing
Collision
External Hashing
Static and Dynamic Hashing
Ch.13 (T1)  13.8
Chapter 17 Disk Storage, Basic File Structures, and Hashing (T1 6e)
During CH
CH11
To understand the concept of Hashing with examples.

Ch.13 (T1)  13.8

Post CH
SS11
More on Hashing
Ch.11 (R1)  11.6 to 11.7

Post CH
HW11
To be announced at the end of the contact hour (CH11).

Post CH
QZ11
To be announced at the end of the contact hour (CH11).


#MID SEM EXAM (Syllabus for DBMS EC-2 Mid-semester exam is - all the topics covered up to Contact Hour-11 (i.e., from starting to Dynamic Hashing techniques).)

Contact Hour 12
Time
Type
Sequence
Content Reference
Pre CH
RL12
DBMS_RL_5.4:

Introduction to indexing
Primary Index
Secondary Index
Clustering Indexes
Multilevel Index
Ch.14 (T1)  14.1 and  14.2

During CH
CH12
Understanding Primary and Multilevel Indexing with Examples
Ch.14 (T1)  14.1 and  14.2

Post CH
SS12
Other Indexing schemes; Indexing using SQL
Ch.11 (R1)  11.8 to 11.10

Post CH
HW12
To be announced at the end of the contact hour (CH12).


Contact Hour 13
Time
Type
Sequence
Content Reference
Pre CH
RL13
DBMS_RL_5.4_Contd:

Dynamic Multilevel Indexing with B+ Trees
Ch.14 (T1)  14.3

During CH
CH13
Understanding B+ Indexing with Examples
Ch.14 (T1)  14.3

Post CH
SS13
B Tree indexing , Indexing on multiple keys and Other types of Indexing
Ch.14 (T1)  14.3 to 14.5

Post CH
HW13
To be announced at the end of the contact hour (CH13).



Contact Hour 14
Time
Type
Sequence
Content Reference
Pre CH
RL14
DBMS_RL_6.1:

Introduction to Transaction Model
Significance of Transaction Model
States of a transaction
ACID properties
Ch.17 (T1)  17.1 to 17.3

During CH
CH14
Discuss on significance of Transaction model and ACID properties in detail with examples

Ch.17 (T1)  17.1 to 17.3


Contact Hour 15
Time
Type
Sequence
Content Reference
Pre CH
RL15
DBMS_RL_6.2

Concurrent Transactions
Transaction Schedule
Serial and Concurrent Schedules
Need for Concurrency Control
Conflicting Operations
Conflict Equivalent Schedule
Test for Conflict Serializability

Ch.17 (T1)  17.4 and 17.5

During CH
CH15
We understand serializability of concurrent schedules with examples
Ch.17 (T1)  17.4 and 17.5

Post CH
SS15
View equivalence and view serializability
Ch.17 (T1)  
Ch.14 (R1)   14.4 to 14.7




Contact Hour 16
Time
Type
Sequence
Content Reference
Pre CH
RL16
DBMS_RL_6.2_Cntd:
Introduction to Concurrency Control
Implementing Serializability
Lock-based protocols
Deadlock condition
Two-phase locking protocol
Time-stamp based protocols
Ch.18 (T1)  18.1 and 18.2

During CH
CH16
We work with appropriate examples to understand lock-based concurrency control, time-stamp based concurrency control and Deadlock detection technique.
Ch.18 (T1)  18.1 and 18.2

Post CH
SS16
Multiversion Concurrency Control
Validation
Ch.18 (T1)  18.3 and 18.4

Post CH
HW16
To be announced at the end of the contact hour (CH16).

Post CH
QZ16
To be announced at the end of the contact hour (CH16).


Contact Hour 17
Time
Type
Sequence
Content Reference
Pre CH
RL17
DBMS_RL_6.3:

Introduction to Recovery
Recovery strategies
Log-based recovery
Check-pointing
Shadow paging
Ch.19 (T1)  19.1 to 19.4

During CH
CH17
Consolidate our understanding of Recovery concepts with examples.
Ch.19 (T1)  19.1 to 19.4

Post CH
SS17
ARIES; Recovery in multidatabase Systems; Database backup
Ch.19 (T1)  19.1 to 19.4

Post CH
HW17
To be announced at the end of the contact hour (CH17).


Contact Hour 18
Time
Type
Sequence
Content Reference
Pre CH
RL18.1
DBMS_RL_7.1:

Steps in executing  SQL queries;
 Algorithms for query operations

Ch.15 (T1)  15.1 and 15.5

Pre CH
RL18.2
DBMS_RL_7.1_Contd01:

Query optimization using heuristics;
Cost estimation

Ch.15 (T1)  15.7 and 15.8

Pre CH
RL18.3
DBMS_RL_7.1_Contd02:
Database Tuning concepts
Approaches

Ch.16 (T1)  16.1 and 16.2

During CH
CH18
We consolidate our understanding on operations for Query execution and Optimization.

Post CH
SS18
Optimization in Oracle
Web references on Oracle site

Post CH
HW18
To be announced at the end of the contact hour (CH18).

Post CH
HW18
To be announced at the end of the contact hour (CH18).


Contact Hour 19
Time
Type
Sequence
Content Reference
Pre CH
RL19
DBMS_RL_7.2:

Introduction to database security;
Access control;
Statistical database security;
Flow control ;
Other challenges;
Ch.23 (T1)  23.1 to 23.9

During CH
CH19
Look at access control options in Oracle and understand statistical databases.


Contact Hour 20
Time
Type
Sequence
Content Reference
Pre CH
RL20
DBMS_RL_7.3:

Role of Information systems;
Database design; and implementation process;
UML diagrams for Database design;
Tools;
Ch.12(T1)  12.1 to 12.5

During CH
CH20
Discuss various aspects of Database design process with examples

Post CH
QZ20
To be announced at the end of the contact hour (CH120).


Contact Hour 21
Time
Type
Sequence
Content Reference
Pre CH
RL21
DBMS_RL_7.4:

XML data model; Significance; Structure; features;
XML DTD and XML Schema;
Ch.27(T1)  27.1 to 27.2

During CH
CH21
Understanding XML concepts with examples.
Ch.27(T1)  27.1 to 27.2

Post CH
HW21
To be announced at the end of the contact hour (CH21).


Contact Hour 22
Time
Type
Sequence
Content Reference
Pre CH
RL22.1
DBMS_RL_7.4_Cntd:

XML documents and databases
Storing XML data
XML Querying
Sample XML applications
Ch.27(T1)  27.3 and  27.4
During CH
CH22.1
Understanding XML query languages with examples.
Ch.27(T1)  27.3 and  27.4
During CH
CH22.2
Conclusions to the course.

Post CH
HW22
To be announced at the end of the contact hour (CH22).



Detailed Plan for Lab work
Install SQLite & SQLiteBrowser on your laptop for carrying out the lab exercises
Lab No
Topic
Lab Objective
1
Basics of SQL
Understand installation of DBMS such as SQLite and SQLiteBrowser and explore its features
2
Data Definition Language (DDL) 
Understand how to CREATE tables
4
Data Manipulation Language(DML)
Basics of SQL: SELECT & JOIN
5
DML
Understand usage of Aggregate functions
6
DML
Understand how to use UPDATE and DELETE operations
7.
PLSQL
Writing Triggers, Functions, Stored Proceedures

Please refer to the attached lab sheet to perform the SQL exercises
Assignment
  1. Think of a web-based software application (with a central database), that you think will be useful to many people (1 week)
  2. Write a brief description of the application (1 week)
      Who will be the users?
      What are the benefits of this application?
      List of functions & features of the application
      How many users will use it simultaneously?
  1. Draw ER diagram for the application(2 weeks)
  2. Convert ER model to relational model (2 weeks)
  3. Write SQL queries to fulfil the end user needs (2 weeks)
  4. Design indices to enhance the performance of queries and justify your choice of indices
Work Integrated activities (8 weeks)
Activity No
Topic
Description
1
Conceptual model
Draw ER diagram of the database used by your application
2
Logical database model
Study the tables of your application & determine if it satisfies 3rd Normal Form. Recommend improvements if any, to the table design
3
Physical design
Study the indexes of your application & suggest improvements if any.
4
Database administration
Talk to your DBA and find out what their challenges are. Think of ways to address these challenges and discuss your suggestions with them. What is the outcome of these discussions?
5
Security
What security features of DBMS are implemented in your application (set of applications). Give examples of situations where these features are used.






Evaluation Scheme:  
Legend: EC = Evaluation Component; AN = After Noon Session; FN = Fore Noon Session
No
Name
Type
Duration
Weight
Day, Date, Session, Time
EC-1
Quiz-I
Online
-
5%
February 1 to 10, 2017

Quiz-II
Online
-
5%
March 1 to 10, 2017

Quiz-II
Online
-
5%
March 20 to 30, 2017

Lab / Assignment
Online

10%
To be announced
EC-2
Mid-Semester Test
Closed Book
2 hours
30%
26/02/2017 (AN) 2 PM – 4 PM
EC-3
Comprehensive Exam
Open Book
3 hours
45%
09/04/2017 (AN) 2 PM – 5 PM

Syllabus for Mid-Semester Test (Closed Book): Topics in Session Nos.  1 TO 11
Syllabus for Comprehensive Exam (Open Book): All topics (Session Nos. 1 to 22)
Important links and information:
Elearn portal: https://elearn.bits-pilani.ac.in
Students are expected to visit the Elearn portal on a regular basis and stay up to date with the latest announcements and deadlines.
Contact sessions: Students should attend the online lectures as per the schedule provided on the Elearn portal.
Evaluation Guidelines:
1.      EC-1 consists of either two Assignments or three Quizzes. Students will attempt them through the course pages on the Elearn portal. Announcements will be made on the portal, in a timely manner.
2.      For Closed Book tests: No books or reference material of any kind will be permitted.
3.      For Open Book exams: Use of books and any printed / written reference material (filed or bound) is permitted. However, loose sheets of paper will not be allowed. Use of calculators is permitted in all exams. Laptops/Mobiles of any kind are not allowed. Exchange of any material is not allowed.
4.      If a student is unable to appear for the Regular Test/Exam due to genuine exigencies, the student should follow the procedure to apply for the Make-Up Test/Exam which will be made available on the Elearn portal. The Make-Up Test/Exam will be conducted only at selected exam centres on the dates to be announced later.

It shall be the responsibility of the individual student to be regular in maintaining the self study schedule as given in the course handout, attend the online lectures, and take all the prescribed evaluation components such as Assignment/Quiz, Mid-Semester Test and Comprehensive Exam according to the evaluation scheme provided in the handout.

No comments:

Post a Comment