LICE-JTO SAMPLE STUDY MATERIAL. Limited Internal Competitive Examination DATA BASE MANAGEMENT SYSTEMS

Similar documents
1 File Processing Systems

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.

BCA. Database Management System

Chapter 1: Introduction

IT2305 Database Systems I (Compulsory)

Chapter 1: Introduction

DATABASE MANAGEMENT SYSTEMS. Question Bank:

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY


IT2304: Database Systems 1 (DBS 1)

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

Databases What the Specification Says

Introduction to Databases

Chapter 2 Database System Concepts and Architecture

Chapter 1: Introduction. Database Management System (DBMS)

Core Syllabus. Version 2.6 B BUILD KNOWLEDGE AREA: DEVELOPMENT AND IMPLEMENTATION OF INFORMATION SYSTEMS. June 2006

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

1. INTRODUCTION TO RDBMS

Introduction to database management systems

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Lesson 8: Introduction to Databases E-R Data Modeling

ECS 165A: Introduction to Database Systems

COURSE NAME: Database Management. TOPIC: Database Design LECTURE 3. The Database System Life Cycle (DBLC) The database life cycle contains six phases;

Database System Concepts

B.Sc (Computer Science) Database Management Systems UNIT-V

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

COMP5138 Relational Database Management Systems. Databases are Everywhere!

Introduction to Database Systems

CSE 233. Database System Overview

Database Systems Introduction Dr P Sreenivasa Kumar

Database 10g Edition: All possible 10g features, either bundled or available at additional cost.

Database Management. Chapter Objectives

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati

Basic Concepts of Database Systems

Author: Abhishek Taneja

DATABASE MANAGEMENT SYSTEM

Chapter 3. Database Environment - Objectives. Multi-user DBMS Architectures. Teleprocessing. File-Server

CSE 132A. Database Systems Principles

Demystified CONTENTS Acknowledgments xvii Introduction xix CHAPTER 1 Database Fundamentals CHAPTER 2 Exploring Relational Database Components

Conventional Files versus the Database. Files versus Database. Pros and Cons of Conventional Files. Pros and Cons of Databases. Fields (continued)

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Introduction to Database Systems. Chapter 1 Introduction. Chapter 1 Introduction

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Database Management Systems. Chapter 1

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: DATABASE MANAGEMENT (Code: ) Information Technology

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

DBMS / Business Intelligence, SQL Server

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

Database Programming with PL/SQL: Learning Objectives

Introduction: Database management system

B.Com(Computers) II Year RELATIONAL DATABASE MANAGEMENT SYSTEM Unit- I

Fundamentals of Database Design

Database Concepts. Database & Database Management System. Application examples. Application examples

Introduction to Computing. Lectured by: Dr. Pham Tran Vu

How To Create A Table In Sql (Ahem)

Oracle USF

Developing Microsoft SQL Server Databases 20464C; 5 Days


Course 20464: Developing Microsoft SQL Server Databases

Oracle Database 10g: Introduction to SQL

Instant SQL Programming

SQL Simple Queries. Chapter 3.1 V3.0. Napier University Dr Gordon Russell

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

INTRODUCTION TO DATABASE SYSTEMS

Databases and BigData

20464C: Developing Microsoft SQL Server Databases

Chapter 1 File Organization 1.0 OBJECTIVES 1.1 INTRODUCTION 1.2 STORAGE DEVICES CHARACTERISTICS

Section of DBMS Selection & Evaluation Questionnaire

Chapter 1 Databases and Database Users

Chapter 1 - Database Systems

The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3

SQL, PL/SQL FALL Semester 2013

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 1 Outline

Physical Database Design Process. Physical Database Design Process. Major Inputs to Physical Database. Components of Physical Database Design

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. The Relational Model. The relational model

Database Systems. Session 1 Main Theme Introduction to Database Systems Dr. Jean-Claude Franchitti

Principles of Database. Management: Summary

Concepts of Database Management Seventh Edition. Chapter 7 DBMS Functions

Transactions and the Internet

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Oracle 10g PL/SQL Training

Introduction This document s purpose is to define Microsoft SQL server database design standards.

ICOM 6005 Database Management Systems Design. Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 2 August 23, 2001

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems

Oracle(PL/SQL) Training

Overview of Data Management

12 File and Database Concepts 13 File and Database Concepts A many-to-many relationship means that one record in a particular record type can be relat

Relational Database Systems 2 1. System Architecture

Overview. Physical Database Design. Modern Database Management McFadden/Hoffer Chapter 7. Database Management Systems Ramakrishnan Chapter 16

Oracle Database: SQL and PL/SQL Fundamentals NEW

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Oracle Database 11g SQL

Developing Microsoft SQL Server Databases

Transcription:

LICE-JTO Limited Internal Competitive Examination SAMPLE STUDY MATERIAL DATA BASE MANAGEMENT SYSTEMS DATA BASE MANAGEMENT SYSTEMS DATA BASE MANAGEMENT SYSTEMS DATA BASE MANAGEMENT SYSTEMS

C O N T E N T 1. FUNDAMENTALS OF DBMS AND ER DIAGRAMS 03-12 2. ER MODEL.. 13-30 3. RELATIONAL ALGEBRA &RELATIONAL CALCULUS. 31-45 4. STRUCTURED QUERY LANGUAGE [SQL]. 46-75 5. FUNCTIONAL DEPENDENCIES & NORMALIZATION.. 76-93 6. TRANSACTIONS AND CONCURRENCY CONTROL 94-121 7. FILE STRUCTURES (SEQUENTIAL FILES, INDEXING, B AND B+ TREES) 122-145 8. DATABASE SECURITY.. 146-157 LICE PRACTICE TEST AT THE END OF CHAPTER SYLLABUS DATABASE, DATA MODELS, RATIONAL ALGEBRA AND NORMALIZATION, STATISTICAL QUALITY LEVEL, DISTRIBUTED AND OBJECT DATA BASIS. INTRODUCTION TO THE RELATIONAL MODEL; NORMALISATION AND QUERY PROCESSING; RECOVERY, CONCURRENCY MANAGEMENT AND DATABASE SECURITY.

CHAPTER-1 FUNDAMENTALS OF DBMS Database: Database is a collection of related data while data is raw fact or figures or entity. Information: Processed data or meaningful data is called as information. Example: 25 years then it is only data. If I say my age is 25 years then it will become information. DBMS (database management system) A Database management system (DBMS) is a collection of interrelated data and a set of application programs used to access, update and manage those data.the goal of DBMS is to provide an environment that is both convenient and efficient to retrieve and store information into the database. Disadvantage of File Processing System over Database Management System Traditionally, the organization used files to store the data. In single organization, multiple files can be there. Each file is independent from one another. Files are manipulated using the program written in C, C++, and JAVA. 1. Data redundancy and inconsistency 2. Difficulty in accessing data 3. Data Isolation 4. Integrity problems 5. Atomicity problems 6. Concurrent access anomalies 7. Security Problems Data Redundancy: The files are created in the file system as and when required by an enterprise over its growth path. So in that case the repetition of information about an entity cannot be avoided. Example:The addresses of bank customers will be present in the two files makes wastage of storage: a) One in savings account files and b) Other in current account, files. Data Inconsistency: Data redundancy leads to greater problem than just wasting the storage i.e. it may lead to inconsistent data. Same data which has been repeated at several places may not match after it has been updated at some places.disadvantage of this ismismatch of data.

Example: If a customer requests to change the address for his account in the Bank and it has been updated at the saving bank account file only but his current bank account file is not updated. Afterwards the addresses of the same customer present in saving bank account file and current bank account file will not match. Finally there is no way to find out which address is latest out of these two. Difficulty in Accessing Data: For analyzing the data the programs are not already present and only programmers will have to write a new program to generate requested report or will have to work manually. This is going to take impractical time and will be more expensive. Data Isolation: Since the data files are created at different times by different people in different formats the structures of different files generally will not match. The data will be scattered in different files for a particular entity. So it will be difficult to obtain appropriate data. Example:Suppose the Address in Saving Account file have fields: Add line1, Add line2, City, State, Pin While the fields in address of Current account are: House No., Street No., Locality, City, State, Pin. Administrator is asked to provide the list of customers living in a particular locality. Providing consolidated list of all the customers will require looking in both files. But they both have different way of storing the address. Writing a program to generate such a list will be difficult. Security and Access Control:Database should be protected from unauthorized users for privacy and security purpose. Every user should not be allowed to access every data. For example: 1. The Payroll Personnel in a bank should not be allowed to access accounts information of the customers 2. An employee can t see salary of other employees View of Data A major purpose of a database system is to provide users with an abstract view of the data. That is the system hides certain details how data are stored and maintained. Data abstraction is provided at different level of view. 1. Physical View (internal view) At physical level, we have very low level details. It provides the details about how data are actually stored. 2. Logical View At this level, we know about what data are stored and what relationship exist among those data. This level hides the details of physical level. 3. View level (External View) This level describes the part of the database that is relevant to each user. This level hides the details of logical level and physical level.

Figure: Abstraction level of Database Instance Schema The collection of information stored in the database at a particular moment is called an instance of the database. The overall design of the database is called schema. a. Physical schema: - Physical view is represented by physical schema. b. Logical Schema: -Logical view is represented by logical schema. Programmers construct the application using this schema. c. Sub Schema: - External view is represented by sub schema. Schema at view level called subschema s Database Users:- There are five types of users that interact with database as follow: 1. Naïve Users/unsophisticated user: - indirectly interact with database using application program. 2. Application programmers: -application programmers are responsible for developing the application program and user interface. They use RAD (rapid application development) tools to construct forms and reports with minimal programming effort. 3. Sophisticated user: - Interact with system without writing program. Sophisticated user interacts to database by writing query. 4. Specialized user: - users Interact with system by writing application program. 5. Database administrator: These are the users who are the incharge for creating and maintaining the database. DBA can assign and remove access level to database user.dba responsibility includes following : 1. Schema definition 2. Storage structure and access-method definition

3. Schema and physical organization modification 4. Granting of authorization for data access 5. Routine maintenance(periodically backup, upgrade disk space, monitoring the job) Functional Component of Database Functional component of a database system can broadly divided into the storage manager and the query processor components. Functional component of a database system is shown in figure: system structure. A. Storage Manager 1. A storage manager is a program module that provides the interface between the low level Data stored in the database and the application program and query submitted to the system. 2. The storage manager is responsible for interaction with file manager.the storage manager translates the various DML statements into low level file system command. 3. The storage manager is responsible for storing, retrieving, and updating data in database. 4. The storage manager components include: a. Authorization and integrity manager b. Transaction manager c. File manager(storage on disk system) d. Buffer manager(use for fetching data from disk storage to memory) 5. Data structure implemented by storage manager includes: a. Data files, which stores the database itself. b. Data dictionary, which stores metadata and schema of database c. Indices are used to provide fast access to database. B. The query processor Query processor is used to facilitate access to data stored into database. The query processor components include: 1. DDL interpreter It interprets the DML statements and records the definition in the data dictionary. 2. DML compiler It converts DML statement into low level that query evaluation engine can understand and performquery optimization. 3. Query evaluation engine It is responsible for executing low level instruction.

Database Architecture 1. Two tier architecture In two tier architecture the application resides at client and database resides at server. Whenever client required accessing the database, it invokes the server for database access using query language statement.

2. Three tier architecture In the three tier architecture, the client machine works as a front end (user interface). Application logic (business logic resides) at application server machine and database resides at database server. Client machine interact with database server using application server. 3. N-tier architecture Data Models 1. Relational Model 2. The Entity-Relationship Model 3. Object-Based Data Model 4. Semi structured Data Model(XML) Relational model: The relational model uses a collection of tables. Each table is called as relation and each row is called as tuple and each column is called as attribute. Entity Relationship Model: Entity relationship model uses a entity to show the object. Each object have attributes. This model also represents relationship between entities. Object based data model: In this data model we combine the feature of object oriented data model and relation data model. Semi structured data model: Semi structure data model permits the specification of data where individual data items of same type may have different attributes. Database Language There are two types of database language:

1. DDL (Data Definition Language )is used to specify database schema.ddl provides facility to specify the constraints on tables. It includes create, alter, drop, remove. Example: CREATE TABLE student ( student_idint, student_namechar(20), department_namechar(20)); Constraints that can be specified by DDL include: I. Domain constraints Declaring an attribute to be of a particular domain (integer type, character type, and date/time types) acts as a constraints on the values that it can take. Domain constraints are tested by the system whenever a new data item is entered into the database. II. Referential integrity When we required to have same value for some attribute in two different table then the constraints on table is called as referential integrity constraints. These constraints sometimes called as foreign key constraints. Referential integrity constrain requires that the values appearing in specified attributes of any tuple in the referencing relation also appears in specified attributes of at least one tuple in the referenced relation. For example department name values in the student table should be the same as department name value in the department. III. Assertions An assertion is any condition that the database must always satisfy. For example minimum balance of saving account should be 1000. IV. Authorizations It is used to check the access of each user. Example: The following table has two attributes A and C where A is the primary key and C is the foreign key referencing A with on delete cascade. A C 2 4 3 4 4 3 5 2 7 2 8 5 9 4 The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (2, 4) is deleted is: (a.) (3, 4) and (6, 4) (b.) (5, 2) and (7, 2) (c.) (5, 2) (7, 2) and (9, 5) (d.) 1 Solution: c If (2, 4) is deleted then 2 is the primary key but in (5, 2) and (7, 2) 2 is the foreign key so these must be deleted. The primary key for (5, 2) and(7, 2) is and (7, 2) is 5 and 7 respectively but in (9, 5) 5 is the foreign key so it is also deleted.

Note: The output of DDL is placed in the data dictionary which contains meta data.meta data is data about data. 2. DML (Data Manipulation Language) is used to express database query and update to manipulate the data into database. It includes select, insert, delete, update. INSERT INTO EMPLOYEE VALUES( RAMESH, KUMAR, SINGH ) There are two types of DML: a. Procedural DML require a user to specify what data are needed and how to get those data. b. Declarative DML/nonprocedural DML requires only to specify what data are needed. 3. Data Control Language: The Data Control Language (DCL) component of the SQL language is used to create privileges to allow users access to, and manipulation of, the database. There are two main commands: a. GRANT to grant a privilege to a user b. REVOKE to revoke (remove) a privilege from a user Key Point 1. A data model is a collection of concepts that can be used to describe the structure of database. 2. A view can represent the subset of data stored in a table. View can join and simplify multiple tables into a single virtual table. 3. A query is a statement requesting the retrieval of information. The portion of DML that involves information retrieval is called a query language. LICE Practice SET :Level 1 (1.) Which component of database system is responsible for interaction with file manager? (a.) DDL interpreter (b.) compiler and linker (c.) Storage manager (d.) buffer manager (2.) Which of the following translate DML statement into the language understand by query evaluation engine. (a.) DML interpreter (b.) DDL compiler (c.) DML compiler (d.) DDL interpreter (3.) Query optimization is performed by (a.) DML compiler (b.) DML interpreter (c.) DDL compiler (d.) Storage manager (4.) Which of the following is semi structured data model? (a.) XML (b.) C++ (c.) HTML (d.) Relational model (5.) Data manipulation language used for (a.) Describing physical structure of database (b.) Modification of physical database structure of database (c.) Defining the physical structure of database (d.) Manipulation and processing of database (6.) The database schema is represented in: (a.) Data definition language (b.) Data manipulation language (c.) Data control language (d.) Transaction control language (7.) In the database architecture view level is also called as: (c.) Conceptual level (b.) External level (c.) Internal level (d.) Logical level

Answer Key 1 2 3 4 5 6 7 c c a a d a b (1.) Consider two tables table1 and table2 Table-1 Table-2 A C D A 1 4 5 1 2 3 6 1 3 2 2 2 LICE Practice SET Level 2 In Table-1 A is primary key and in Table-2 D is primary key. A Table-2 has A as a foreign key. So deletion of which max rows from A violets the referential integrity? (a.) (1, 4) (b.) (1, 4) and (2, 3) (c.) (2, 3) (d.) (3, 2) (2.) Consider the following table that has three attributes. A is the primary key of table and B is the foreign key of table referencing A with on delete cascade the set of all tuples that must be additionally deleted to preserve. Referential integrity when the tuple (3, 5) is deleted: A B C 1 4 1 2 1 2 3 5 3 4 2 4 5 3 4 (a.) (1, 4, 1) (b.) (2, 1, 2) (c.) (5, 3, 5) (d.) All the rows (3.) Which is not data manipulation language (a.) Select (b.) drop (c.) delete (d.) insert (4.) Which of the following is not data definition language (a.) Create (b.) delete (c.) alter (d.) drop (5.) Buffer manage is responsible for (a.) Fetching data from disk into the main memory (b.) Manage the storage allocation on disk (c.) Store the data into disk. (d.) Which test for satisfaction of integrity constraint and checks the authoring of used to access data. Answer Key 1 2 3 4 5 b c b b a

Explanation (1.) 1. If I delete (1, 4) then in table 2 first row is referencing A have (5, 1). So referential integrity violets 2. If I delete (2, 3) then also it violet 3. If I delete (3, 2) then no row in table 2 referencing this value. so this can be deleted without violating the referential intensity. (2.) If I delete the row (3, 5, 2) in table then I have to delete the (5, (3), 5) (3.) Select, delete, insert are DMC query drop is DDL query (4.) Create, after, drop are DDL query. Delete is DML query. SAMPLE FILE To Buy complete package Call +91-9990657855, 011-26514888