B.C.A 2017-18 DATA BASE MANAGEMENT SYSTEM Course Outline MODULE SPECIFICATION SHEET This course introduces the fundamental concepts necessary for designing, using and implementing database systems and applications. A Database is a collection of related data organised in a way that data can be easily accessed, managed and updated. Any piece of information can be a data, for example name of your school. Database is actually a place where related piece of information is stored and various operations can be performed on it. A DBMS is software that allows creation, definition and manipulation of database. DBMS is actually a tool used to perform any kind of operation on data in database. DBMS also provides protection and security to database. It maintains data consistency in case of multiple users. Here are some examples of popular DBMS, MySQL, Oracle, Sybase, Microsoft Access and IBM DB2 etc. This course covers varieties of topics including DBMS Architecture, Schemas, Types of DBMS, Entity Relationship Models, Normalization, concurrency control, ACID properties, Relational Algebra, Relational database language using SQL. Faculty Details LAVISHA Assistant Professor Department of BCA lavisha@pes.edu PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS Affiliated to Bangalore University
1. GENERAL INFORMATION Academic Year : 2017-18 Semester : II Title Data Base Management System Credits: 2 Duration Lectures 60 Seminars 0 Total: 60 2. PRE REQUIREMENT STATEMENT Before students start proceeding with this course, it is recommended that students must have a good understanding of basic computer concepts such as primary memory, secondary memory and peripheral devices. 3. COURSE RELEVANCE Database Management System or DBMS in short refers to the technology of storing and retrieving users data with utmost efficiency along with appropriate security measures. 4. LEARNING OUTCOMES To be able to design an ER Diagram. To be able to develop relational database model. To be able to normalize relation. To be able to write data base queries. To be able to differentiate and understand the various data base models. 5. VENUE AND HOURS/WEEK All lectures will normally be held on VIII Floor. Lecture Sessions / Week: 6 Class # 6. MODULE MAP Topics % of portions covered UNIT 1:Introduction and Database System Concepts and architecture Learning Objectives: Be familiar with basic concepts and the applications of database systems. Gain a basic understanding of DBMS architecture, their classifications and advantages also. Understand the different people behind DBMS. Cumulative % of Portions Covered Page 2 of 22
Introduction Topic Outline: Basics of database technology 1. Text Book 2: Chapter 1: Section 1.1, 1.2, Pg 1-6 Characteristics of the Database Approach Topic Outline: Characteristics of the Database Approach 2. Text Book 2: Chapter 1: Section 1.3, Pg 6-9 Different people behind DBMS Topic Outline: Role of DBA, Database Designers, End users 3. Text Book 2: Chapter 1: Section 1.4, Pg 9-12 Implications of Database Approach Topic Outline: Implications of Database Approach 4. Text Book 2: Chapter 1: Section 1.5, Pg 12-13 Advantages of using DBMS, When not to use a DBMS. Topic Outline: Advantages and applications of DBMS 5. Text Book 2: Chapter 1: Section 1.6, 1.7 Pg 13 17 Data Models 16.66% 16.66% Topic Outline: High level, low level, representational model 6. Text Book 2: Chapter 2: Section 2.1, 2.2 Pg 19-22 DBMS Architecture and Data Independence Topic Outline: three schema architecture, logical and physical independence 7. Text Book 2: Chapter 2: Section 2.3, 2.4 Pg 22-25 Database languages and interfaces Topic Outline: DDL, DML, DCL, DQL 8. Text Book 2: Chapter 2: Section 2.5, 2.6 Pg 25 29 The database system Environment Topic Outline: centralized DBMS architecture, Distributed DBMS, Client Server 9. Architecture Text Book 2: Chapter 2: Section 2.6, Pg 29 38 Classification of DBMS Topic Outline: based on data models, based on no of users, based on the 10. purpose, based on cost Text Book 2: Chapter 2: Section 2.7 Pg 38 46 UNIT 2: Data Modelling Using the Entity-Relationship Model and Record Storage and Primary File Organization Learning Objectives: Understand the concepts of entity, attributes and relationship among the entities. Be familiar with basic database storage structures and access techniques: file and page organizations, indexing methods including B-tree, and hashing techniques. Page 3 of 22
11 12 13 14 15 16 17 18 19 20 21 22 Introduction, High level conceptual Data Models for Database Design Topic Outline: phases of database design with example. Text Book 2: Chapter 3: Section 3.1,3.2 Pg 48-52 ER Model Concepts Topic Outline: Entity types, Entity sets, Key attributes, value sets Text Book 2: Chapter 2: Section 3.3, 3.4, 3.5, 3.6 Pg 52-66 Notation for ER Diagrams. Topic Outline: Definition of ER Diagram and symbols for all entities Text Book 2: Chapter 3: Section 3.7 Pg 66 70 Proper naming of Schema Constructs. Topic Outline: relationship naming schemes and types of relationship between entity sets Text Book 2: Chapter 3: Section 3.8 Pg 70-72 Relationship types of degree higher than two. Topic Outline: ternary relationship examples Text Book 2: Chapter 3: Section 3.9 Pg 72-74 ER Diagram Topic Outline: practice of Bank, Company ER diagram ER Diagram Topic Outline: practice of University, Library ER diagram Introduction: Storage Devices Topic Outline: types of memory, Memory Hierarchies, Storage of data bases Text Book 2: Chapter 4: Section 4.1, 4.2, 4.3, 4.4 Pg 77-80 Buffering of Blocks, Placing file Records on Disk Topic Outline: double buffering, allocation file blocks on disk- contiguous, linked and indexed allocation Text Book 2: Chapter 4: Section 4.6, 4.7 Pg 85-89 Operations on Files, File organization Topic Outline: retrieval operations and update operations Text Book 2: Chapter 4: Section 4.8, 4.9 Pg 90-95 Hashing Techniques Topic Outline: internal and external hashing Text Book 2: Chapter 4: Section 4.10 Pg 95-104 Hashing Techniques Topic Outline: hashing techniques that allow dynamic file expansion Text Book 2: Chapter 4: Section 4.10 Pg 95-104 21.66% 38.32% Page 4 of 22
Other Primary file Organization Topic Outline: files of mixed records, B-tress and other data structure, RAID 23 technology Text Book 2: Chapter 4: Section 4.11 Pg 104 111 UNIT 3: Functional Dependencies and Normalization for relational Databases and Relational Data Model and Relational Algebra Learning Objectives: Be familiar with the relational database theory, and be able to write relational algebra expressions for queries. Mater sound design principles for logical design of databases, including the E-R method and normalization approach. Introduction 24 Topic Outline: 12 rules of the relational data base Text Book 2: Chapter 5: Section 5.2 Pg 114-117 Relational Model Constraints 25 Topic Outline: Domain constraints, key constraints, integrity constraints Text Book 2: Chapter 5: Section 5.3 Pg 117-119 Database design, Design Guidelines for Relational schemas Topic Outline: top down and bottom up design, relation schema levels, 26 informal measures of quality for relation schema design Text Book 2: Chapter 5: Section 5.4, 5.5 Pg 119-122 Design Guidelines for Relational schemas 27 Topic Outline: insertion, deletion, updation anomalies Text Book 2: Chapter 5: Section 5.5 Pg 123-126 Functional Dependencies, Normalization of relations Topic Outline: Functional Dependencies, definition of Normalization, 28.36% 66.68% 28 properties of normalized relation Text Book 2: Chapter 5: Section 5.9, 5.11 Pg 129-133 Types of Normalization Topic Outline: General Definitions of first and Second Normal Forms Based on 29 Primary Keys Text Book 2: Chapter 5: Section 5.11 Pg 133-135 Types of Normalization 30 Topic Outline: third and Boyce-Codd Normal Form. Text Book 2: Chapter 5: Section 5.11 Pg 135-139 Types of Normalization 31 Topic Outline: 4 and 5 Normal Form. Text Book 2: Chapter 5: Section 5.11 Pg 140-146 Page 5 of 22
Types of Normalization Topic Outline: comparison between normal forms 32 Text Book 2: Chapter 5: Section 5.11 Pg 146-147 Relational Model Concepts Topic Outline: domains, attributes, tuples, relations, characteristics of relations 33 Text Book 2: Chapter 6: Section 6.2 Pg 149-152 Relational Database Schema Topic Outline: types of constraints 34 Text Book 2: Chapter 6: Section 6.3, Pg 1153-158 Operations on Relations. Topic Outline: insert, delete, update 35 Text Book 2: Chapter 6: Section 6.4, Pg 158-161 Relational Algebra Topic Outline: Basic Relational Algebra Operations 36 Text Book 2: Chapter 6: Section 6.5, Pg 162-165 Unary and binary Relational Operations Topic Outline: projection, selection 37 Text Book 2: Chapter 6: Section 6.6 Pg 166-168 Unary and binary Relational Operations Topic Outline: types of join, division 38 Text Book 2: Chapter 6: Section 6.7 Pg 168-173 Examples of queries in the Relational Algebra Topic Outline: different examples 39 Text Book 2: Chapter 6: Section 6.9 Pg 175-176 Relational Database design Using ER-to-Relational Mapping Topic Outline: 7 steps for ER to relational mapping 40 Text Book 2: Chapter 6: Section 6.10, Pg 176-181 UNIT 4: Relational Database Language and PL/SQL. Learning Objectives: Master the basics of SQL and construct queries using SQL. Master the basics of query evaluation techniques and query optimization. SQL Introduction Topic Outline: features of SQL, attribute data types, basic constraints in SQL 41 Text Book 2: Chapter 7: Section 7.1, 7.2, 7.3, 7.4 Pg 183-186 16.66% 83.34% Page 6 of 22
Data definition in SQL 42 Topic Outline: drop, create, alter Text Book 2: Chapter 7: Section 7.5, Pg 186-195 Queries in SQL 43 Topic Outline: select statement, pattern matching, ordering rows Text Book 2: Chapter 7: Section 7.7, Pg 195-199 Queries in SQL 44 Topic Outline: practicing of all queries Text Book 2: Chapter 7: Section 7.7, Pg 195-199 Functions in SQL 45 Topic Outline: string, date, numeric, aggregate functions Text Book 2: Chapter 7: Section 7.8, Pg 200-208 Views in SQL 46 Topic Outline: create and drop view Text Book 2: Chapter 7: Section 7.9 Pg 208-220 Specifying General Constraints as Assertions 47 Topic Outline: check constraints Text Book 2: Chapter 7: Section 7.11 Pg 220-224 specifying indexes 48 Topic Outline: creation and dropping indexes Text Book 2: Chapter 7: Section 7.12 Pg 224-228 Embedded SQL 49 Topic Outline: Embedded SQL program development Text Book 2: Chapter 7: Section 7.13, Pg 229-234 PL /SQL Topic Outline: Introduction, generic PL,SQL block, features, character set, data 50 types, variables, constants Text Book 2: Chapter 8: Section 8.1,8.2,8.3,8.4 Pg 235-237 UNIT 5: Transaction Processing Concepts and Concurrency Control Techniques Learning Objectives: Be familiar with the basic issues of transaction processing and concurrency control. Understand ACID properties of transaction. Understand the locking Techniques for Concurrency Control. 51 Introduction: Transaction and System Concepts Topic Outline: TPS, Sample transactions Text Book 2: Chapter 9: Section 9.1,9.2 Pg 296-306 16.66% 100% Page 7 of 22
52 53 54 55 56 57 58 59 60 Transaction and System Concepts Topic Outline: transactions operations, states of transaction Text Book 2: Chapter 9: Section 9.1,9.2 Pg 296-306 Desirable properties of transaction Topic Outline: ACID properties Text Book 2: Chapter 9: Section 9.3 Pg 306-307 Schedules and Recoverability Topic Outline: recoverable and non-recoverable schedules Text Book 2: Chapter 9: Section 9.4 Pg 307-309 Serializability of Schedules Topic Outline: serial, non-serial, conflict-seriablizable Text Book 2: Chapter 9: Section 9.5 Pg 309-311 Transaction Support in SQL Topic Outline: characteristics of transaction Text Book 2: Chapter 9: Section 9.6 Pg 311-313 Locking Techniques for Concurrency Control Topic Outline: binary lock operations, implementations, Two Phase Locking Text Book 2: Chapter 10: Section 10.2 Pg 314-320 Problems caused by use of locks Topic Outline: Dead Lock, starvation Text Book 2: Chapter 10: Section 10.2 Pg 320-324 Problems caused by use of locks Topic Outline: starvation Text Book 2: Chapter 10: Section 10.2 Pg 324-325 Concurrency Control based on time stamp ordering. Topic Outline: time stamp ordering, values Text Book 2: Chapter 10: Section 10.3 Pg 325-327 7. RECOMMENDED BOOKS/JOURNALS/WEBSITES A. PRESCRIBED TEXTBOOK a) Elmasri and Navathe: Fundamentals of Database Systems,5th Edition, Pearson Education, 2007 b) Chitra Ravi, Database Management Systems As per New CBCS Syllabus for II semester B.C.A.(Bengaluru University), 2014-2015. Page 8 of 22
c) Raghu Ramakrishnan and Johannes Gehrke: Database Management Systems, 3rd Edition, McGraw-Hill, 2003. B. REFERENCE BOOKS a) Silberschatz, Korth and Sudharshan: Data base System Concepts, 6th Edition, Mc- GrawHill, 2010. b) C.J. Date, A. Kannan, S. Swamynatham: An Introduction to Database Systems, 8th Edition, Pearson Education, 2006. 8. ASSIGNMENT(S) a. ASSIGNMENT 01 1. Explain responsibilities of DBA. 2. Explain the applications of DBMS. b. ASSIGNMENT 02 1. Explain the three schema architecture of DBMS with a neat diagram. 2. What is Functional Dependencies? Explain different types of functional dependencies used in normal forms? c. ASSIGNMENT 03 1. Design E-R diagram for keeping track of information about company database taking into account of at least 4 entities. 2. Explain difference between logical and physical data independence. d. ASSIGNMENT 04 1. Define Normal form. Explain 1NF, 2NF, 3NF and BCNF with suitable examples? 2. Write the difference between 3NF and BCNF? e. ASSIGNMENT 05 1. What is a locking protocol? Describe the Strict Two-Phase locking? 2. Explain ACID properties with examples. f. ASSIGNMENT 06 1. Explain hashing technique in detail. 2. What is locking protocol? Explain 2PL and strict 2PL with suitable example? 10. THEORY ASSESSMENT A. WRITTEN EXAMINATION The Theory Examination is for 70 Marks which will be held for duration of 3 Hrs. The Scheme and Blue Print will be released to the students once the Bangalore University releases it. B. CONTINUOUS ASSESSMENT The Continuous Assessment is conducted as per the following parameters. Page 9 of 22
Parameter Assessment Marks Final Weightage Internal Test 35 Marks 22.5 Marks Assignment / 10 Marks 3.75 Marks Class Test 10 marks 3.75 Marks Total 55 Marks 30 Marks The students are hereby required to note that every internal test weightage will calculated for 24 Marks. This includes timely submission of assignments and attending class tests as conducted. Internal Test 01 Internal Test 02 Internal Test 03 Parameter MARKS 24 MARKS 24 MARKS 24 MARKS Final Internal Marks (Sum The Three Internal Tests) Attendance >95 % : 06 Marks 90-95 % : 05 Marks 85-90 % : 04 Marks 80-85 % : 03 Marks 75-80 % : 02 Marks Total 24 MARKS 06 MARKS 30 MARKS 11. ASSESSMENT / ASSIGNMENT / CLASS TEST / ACTIVITY PLANNER Week 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Internal Test T1 T2 T2 Assignments Submission A1 A2 A3 A4 A5 A6 Class Test /CT /CT /CT T1, T2,T3, CT Legend Meaning Test Topics Examinable Internal Tests, Class test T1 Class 1 20 T2 Class 21-40 A1, A2, A3, A4, A5, A6 Assignments T3 Class 41-60 Page 10 of 22
12. QUESTION BANK Unit 1 1) Define the following terms: i) Data base ii) DBMS iii) Data model iv) Meta data 2) Explain the characteristics of data base approach. 3) What are the responsibilities of data base administrators? 4) Explain the typical components of a DBMS with a neat diagram. 5) Define and explain the following terms with an example for each. 6) Briefly discuss the advantages of using the DBMS? 7) Discuss the main Characteristics of the database approach. How does it differ from Traditional file systems? Unit 2 1) Explain the difference between Logical and physical data Independence? 2) Explain the three-schema architecture. What is the logical data independence and physical data independence? 3) Define the database and briefly explain the implicit properties of the database? 4) List the summary of the notations for ER diagrams. Include symbols used in ER diagram and their meaning. 5) With respect to ER model explain it with example. 6) Define an entity and an attribute; explain the different types of attributes that occur in an ER diagram model, with an example. 7) Design an ER Diagram for keeping track of Information about Bank Database? 8) Describe how to map the following Scenario s in ER Model to schema, with suitable example. 9) Define and explain Partial Key, with example? 10) What is meant by recursive relationship? Bring out the importance of role names in recursive relationship, with an example? 11) Draw the ER diagram of musician who performs for album. Assume any four entities. Indicate all key and constraints and assumptions that are made? Unit 3 1) Explain Relational Model/Relational Algebra. 2) Define the following terms with an example for each. Super key, Domain, Tuple, Nulls, Relational database schema, Entity integrity constraint 3) Define referential integrity constraint. Explain the importance of referential integrity constraint. How this constraint is implemented 4) Explain: Domain constraint, Semantic integrity constraint, Functional dependency constraint 5) Discuss the characteristics of a relation, with an example? 6) What is valid state and an invalid state, with respect to a database 7) List the characteristics of relation? Discuss any one? Page 11 of 22
8) Explain foreign key and its importance. Can foreign key exist, only for single table explain? 9) How an Intersection Operator can be implemented using Union and Minus operator? 10) Write queries in Relational Algebra? 11) Given the schema o EMP ( Fname, Lname, SSN, Bdate, Address, Sex, Salary, SuperSSN, Dno) o DEP T(Dname, Dnumber, MgrSSN, MGrstartdate) o DEPT-LOC (Dnumber, Dloc) PROJECT(Pname, Pnumber, Ploc,Dnum) o WORKS-ON (ESSN,PNo,Hours) o Give the relation algebra expression for the following: o List CSE department details. o Retrieve the first name, last name and salary of all employees who o work in departmental number 50 o Retrieve the name of the manager of each department. Unit 4 1) What is embedded SQL? With an example explain how would you Connect to a database, fetch records and display. Also explain the concept of stored procedure in brief. 2) Explain the syntax of a SELECT statement in SQL. Write the SQL query for the following relation algebra expression. 3) Explain the drop command with an example 4) How are Triggers and assertions defined in SQL? 5) Explain create View which will display the dname, no of employees working and total salary of each department? Unit 5 1) Explain properties of a transaction? 2) What is a schedule? Explain with example serial, non serial and conflict serializable schedules. 3) explain the problems that can occur when concurrent transaction are executed give examples 4) What is Serializibility? How can seriaizability? Justify your answer? 5) Write a short note on 2PL Lock. 6) Explain two Phase Locking Protocol and its disadvantages? 7) Explain Time stamp ordering algorithm. 12. PREVIOUS YEAR QUESTION PAPERS: Page 12 of 22
Page 13 of 22
Page 14 of 22
Page 15 of 22
Page 16 of 22
Page 17 of 22
Page 18 of 22
Page 19 of 22
Page 20 of 22
Page 21 of 22
Page 22 of 22