SUBJECT NAME : DATABASE MANAGEMENT SYSTEMS SUBJECT CODE : CS8492 YEAR/SEM : II Year / Fourth Semester DEPARTMENT : INFORMATION T
Total Page:16
File Type:pdf, Size:1020Kb
SUBJECT NAME : DATABASE MANAGEMENT SYSTEMS SUBJECT CODE : CS8492 YEAR/SEM : II Year / Fourth Semester DEPARTMENT : INFORMATION TECHNOLOGY AUTHOR : R. LAVANYA, M.E., (Ph.D) DESGINATION : ASSISTANT PROFESSOR 1 REGULATIONS - 2017 SYLLABUS OBJECTIVES: To learn the fundamentals of data models and to represent a database system using ER diagrams. To study SQL and relational database design. To understand the internal storage structures using different file and indexing techniques which will help in physical DB design. To understand the fundamental concepts of transaction processing- concurrency control techniques and recovery procedures. To have an introductory knowledge about the Storage and Query processing Techniques UNIT I RELATIONAL DATABASES 10 Purpose of Database System – Views of data – Data Models – Database System Architecture – Introduction to relational databases – Relational Model – Keys – Relational Algebra – SQL fundamentals – Advanced SQL features – Embedded SQL– Dynamic SQL. UNIT II DATABASE DESIGN 8 Entity-Relationship model – E-R Diagrams – Enhanced-ER Model – ER-to-Relational Mapping – Functional Dependencies – Non-loss Decomposition – First, Second, Third Normal Forms, Dependency Preservation – Boyce/Codd Normal Form – Multi-valued Dependencies and Fourth Normal Form – Join Dependencies and Fifth Normal Form. UNIT III TRANSACTIONS 9 Transaction Concepts – ACID Properties – Schedules – Serializability – Concurrency Control – Need for Concurrency – Locking Protocols – Two Phase Locking – Deadlock – Transaction Recovery – Save Points – Isolation Levels – SQL Facilities for Concurrency and Recovery. UNIT IV IMPLEMENTATION TECHNIQUES 9 RAID – File Organization – Organization of Records in Files – Indexing and Hashing –Ordered Indices – B+ tree Index Files – B tree Index Files – Static Hashing – Dynamic Hashing – Query Processing Overview – Algorithms for SELECT and JOIN operations – Query optimization using Heuristics and Cost Estimation. UNIT V ADVANCED TOPICS 9 Distributed Databases: Architecture, Data Storage, Transaction Processing – Object-based Databases: Object Database Concepts, Object-Relational features, ODMG Object Model, ODL, OQL – XML Databases: XML Hierarchical Model, DTD, XML Schema, XQuery – Information Retrieval: IR Concepts, Retrieval Models, Queries in IR systems. 2 Unit –1 RELATIONAL DATABASES PART-A 1. What is the purpose of Database Management System? (NOV 2014) Real world entity Relation-based tables Isolation of data and application Less redundancy Consistency Query Language ACID Properties Multiuser and concurrent Access Multiple Views Security 2.What is Data Definition Language? Give example. (NOV 2016, APR 2018) Data Definition Language (DDL) – specifies constructs for schema definition, relation definition, integrity constraints, views and schema modification. Data Definition Language (DDL) is a standard for commands that define the different structures in a database. DDL statements create, modify, and remove database objects such as tables, indexes, and users. Common DDL statements are CREATE, ALTER, and DROP. 3. Write the Characteristics that distinguish the Database approach with the File-based Approach? (MAY 2015, Nov 2019) Database Approach File-Based Approach A database System contains not only the Data definition is a part of application database itseld but also the descriptions of programs data structure and constraints ( meta-data). In the database approach, the data structure is The structure of the data files is defined stored in the system catalog not in the in the application programs so if a user programs. wants to change the structure of a file, all the programs that access that file might need to be changed as well. A multiuser database system allows multiple Same data is managed more than once user access to the database at the same time. this leads to redundancy and They have concurrency control strategies and inconsistency. integrity checks for several user access. 4.What are the disadvantages of file processing system? (NOV 2015) Data redundancy and inconsistency Difficulty in accessing data Data isolation Marinating Integrity Atomicity Problems 3 Concurrent Access Anomalies Security Problems 5. Differentiate File Processing System with Database Management System. (NOV 2016) 1. A database management system coordinates both the physical and the logical access to the data, whereas a file-processing system coordinates only the physical access. 2. A database management system reduces the amount of data duplication by ensuring that a physical piece of data is available to all programs authorized to have access to it, whereas data written by one program in a file-processing system may not be readable by another program. 3. A database management system is designed to allow flexible access to data (i.e., queries), whereas a file-processing system is designed to allow predetermined access to data (i.e., compiled programs). 4. A database management system is designed to coordinate multiple users accessing the same data at the same time. A file-processing system is usually designed to allow one or more programs to access different data files at the same time. In a file-processing system, a file can be accessed by two programs concurrently only if both programs have read-only access to the file. 5. Redundancy is control in DBMS, but not in file system 6. Unauthorized access is restricted in DBMS but not in file system. 7. DBMS provide back up and recovery. When data is lost in file system then it not recover. 8. DBMS provide multiple user interfaces. Data is isolated in file system, 6. What is a weak entity? Give Example. (NOV 2016, APR 2018) Weak entity set: entity set that do not have key attribute of their own are called weak entity sets In a relational database, a weak entity is an entity that cannot be uniquely identified by its attributes alone; therefore, it must use a foreign key in conjunction with its attributes to create a primary key. Examples. The existence of rooms is entirely depended on the existence of a hotel. 7. Who is a DBA? What are the responsibilities of a DBA? April/May-2011 (OR) Mention some responsibilities of a database Administrator? (NOV 2018) A database administrator (short form DBA) is a person responsible for the design, implementation, maintenance and repair of an organization's database. They are also known by the titles Database Coordinator or Database Programmer, and is closely related to the Database Analyst, Database Modeller, Programmer Analyst, and Systems Manager. The role includes the development and design of database strategies, monitoring and improving database performance and capacity, and planning for future expansion requirements. They may also plan, co-ordinate and implement security measures to safeguard the database. 8. What is a data model? List the types of data model used. (April/May-2011 , May 2019) A database model is the theoretical foundation of a database and fundamentally determines in which manner data can be stored, organized, and manipulated in a database system. It thereby defines the infrastructure offered by a particular database system. The most popular example of a database model is the relational model. 4 Types of data model used -relationship -relational model 9. Define Atomicity in transaction management. (APR 2013) In database systems, atomicity (or atomicness; from Greek a-tomos, undividable) is one of the ACID transaction properties. In an atomic transaction, a series of database operations either all occur, or nothing occurs. 10. Give an example of one to one and one to many relationship? (APR 2013, NOV 2018) One-to-One (1-1) relationship is defined as the relationship between two tables where both the tables should be associated with each other based on only one matching row. This relationship can be created using Primary key-Unique foreign key constraints. With One-to-One Relationship in SQL Server, for example, a person can have only one passport. The One-to-Many relationship is defined as a relationship between two tables where a row from one table can have multiple matching rows in another table. This relationship can be created using Primary key-Foreign key relationship. In the One-to-Many Relationship in SQL Server, for example, a book can have multiple authors. 11. What do you meant by simple and composite attribute? (DEC 2013) Simple attributes are atomic values, which cannot be divided further. For example, a student's phone number is an atomic value of 10 digits. A composite attribute consists of a group of values from more than one domain. For example, the Address attribute consists of several domains such as house number, street number, city, country, etc. 12. Define query? (DEC 2013) A query is a statement requesting the retrieval of information. The portion of DML that involves information retrieval is called a query language. 13. Define database management system? List various applications of DBMS? (MAY 2019) Database management system (DBMS) is a collection of interrelated data and a set of programs to access those data. a) Banking b) Airlines c) Universities d) Credit card transactions e) Tele communication f) Finance g) Sales h) Manufacturing i) Human resources 14.Differentiate between static and Dynamic SQL? (NOV 2016 , NOV 2015, NOV 2014) (or) What is Static SQL how it is different from Dynamic SQL? (NOV 2017) (or) Describe about the static SQL and Dynamic SQL in5 detail? (Apr 2019) Static ( Embedded ) SQL Dynamic (Interactive) SQL In static SQL how databases