Similar documents
SYED AMMAL ENGINEERING COLLEGE

SYED AMMAL ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE

Data about data is database Select correct option: True False Partially True None of the Above

Solved MCQ on fundamental of DBMS. Set-1

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

Sql Server Syllabus. Overview

SQL Interview Questions

Database Management Systems Paper Solution

Name :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM

A subquery is a nested query inserted inside a large query Generally occurs with select, from, where Also known as inner query or inner select,

Assignment Session : July-March

Northern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester

8) A top-to-bottom relationship among the items in a database is established by a

DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment

CS2255 DATABASE MANAGEMENT SYSTEMS QUESTION BANK UNIT I

D.K.M COLLEGE FOR WOMEN(AUTONOMOUS),VELLORE DATABASE MANAGEMENT SYSTEM QUESTION BANK

Chapter 1 SQL and Data

B. V. Patel Institute of Business Management, Computer and Information Technology, Uka Tarsadia University 2014

RDBMS Concepts 1. What is database? A database is a logically coherent collection of data with some inherent meaning,

MIDTERM EXAMINATION Spring 2010 CS403- Database Management Systems (Session - 4) Ref No: Time: 60 min Marks: 38

Oracle Syllabus Course code-r10605 SQL

DATABASE MANAGEMENT SYSTEMS

RELATIONAL DATA MODEL

Normalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design

Database Management Systems

Querying Data with Transact SQL

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

DATABASE MANAGEMENT SYSTEM

5. Single-row function

Functional Dependencies CS 1270

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer,

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Normalization in DBMS

Functional Dependencies & Normalization for Relational DBs. Truong Tuan Anh CSE-HCMUT

Course Outline Faculty of Computing and Information Technology

Chapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)

Rajiv GandhiCollegeof Engineering& Technology, Kirumampakkam.Page 1 of 10

Review -Chapter 4. Review -Chapter 5

UNIT-IV (Relational Database Language, PL/SQL)

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

Oracle Database 11g: SQL and PL/SQL Fundamentals

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Basant Group of Institution

Bachelor in Information Technology (BIT) O Term-End Examination

Mahathma Gandhi University

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Database Management

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2

SUPERKEY A superkey is a combination of attributes that can be used to uniquely identify a database record. A table might have many superkeys.

Conceptual (high-level, semantic)/ Physical (low-level, internal)/ Implementation (representational)

Chapter 10. Chapter Outline. Chapter Outline. Functional Dependencies and Normalization for Relational Databases

Unit- III (Functional dependencies and Normalization, Relational Data Model and Relational Algebra)

Full file at

MTA Database Administrator Fundamentals Course

Deccansoft softwareservices-microsoft Silver Learing Partner. SQL Server Syllabus

A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query

ORACLE DATABASE 12C INTRODUCTION

Oracle Database: SQL and PL/SQL Fundamentals NEW

Introduction. Sample Database SQL-92. Sample Data. Sample Data. Chapter 6 Introduction to Structured Query Language (SQL)

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Sample Question Paper

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]

DATABASE TECHNOLOGY - 1MB025 (also 1DL029, 1DL300+1DL400)

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems

Database Management System 9

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

QUIZ 1 REVIEW SESSION DATABASE MANAGEMENT SYSTEMS

Domain Constraints Referential Integrity Assertions Triggers. Authorization Authorization in SQL

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

Informal Design Guidelines for Relational Databases

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

CS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I

Integrity and Security

Functional Dependencies and. Databases. 1 Informal Design Guidelines for Relational Databases. 4 General Normal Form Definitions (For Multiple Keys)

- Database: Shared collection of logically related data and a description of it, designed to meet the information needs of an organization.

ADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.

CGS 3066: Spring 2017 SQL Reference

Unit 3 : Relational Database Design

Debapriyo Majumdar DBMS Fall 2016 Indian Statistical Institute Kolkata

Textbook: Chapter 4. Chapter 5: Intermediate SQL. CS425 Fall 2016 Boris Glavic. Chapter 5: Intermediate SQL. View Definition.

Relational Database design. Slides By: Shree Jaswal

Chapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies

Midterm Review. Winter Lecture 13

Debapriyo Majumdar DBMS Fall 2016 Indian Statistical Institute Kolkata

Test Bank for Database Processing Fundamentals Design and Implementation 13th Edition by Kroenke


Chapter 4: Intermediate SQL

2011 DATABASE MANAGEMENT SYSTEM

MaanavaN.Com DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK

CS425 Fall 2017 Boris Glavic Chapter 5: Intermediate SQL

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1

Database Normalization

Applied Databases. Sebastian Maneth. Lecture 5 ER Model, normal forms. University of Edinburgh - January 25 th, 2016

STRUCTURED QUERY LANGUAGE (SQL)

Transcription:

CS6302 DBMS 2MARK & 16 MARK UNIT II SQL & QUERY ORTIMIZATION 1. Define Aggregate Functions in SQL? Aggregate function are functions that take a collection of values as input and return a single value. SQL offers five built-in aggregate functions: Average: avg Minimums: min Maximum : max Total: sum Count: count 2. Define Nested Subqueries. SQL provides a mechanism for the nesting of sub queries. A sub query is a select-from-where expression that is nested within another query. A common use of sub queries is to perform tests for set membership, set comparison, and set cardinality. 3. Define Integrity constraints. Integrity constraints provide a means of ensuring that changes made to the database by authorized user do not result in a loss of data consistency. Thus Integrity constraints guard against accidental damage to the database. The constraints were is the following forms: Key declaration and form of a relationship. 4.Define referential Integrity. Often, we wish to ensure that a value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation. This condition is called referential integrity. 5. Define Assertions. An assertion is a predicate expressing a condition that we wish the database always satisfied. E.g. create assertion <assertion-name> check <predicate> 6. Define Triggers. A trigger is a statement that is executed automatically by the system as a side effect of a modification to the database. To design a trigger mechanism, we must meet two requirements: 1. Specify the conditions under which the trigger is to be executed. 2. Specify the actions to be taken when the trigger executed. 7. Define Functional Dependency and fully functional Dependency? 8. List the pitfalls in Relational Database Design. 1. Repletion of information 2. Inability to represent certain information. 9. Define normalization? It is a process of analyzing the given relation schemas based on their functional Dependencies(FDs) and primary key to achieve the properties. Minimizing redundancy

Minimizing insertion, deletion and update anomalies. 10. List the properties of decomposition. 1. Lossless join 2. Dependency preservation 3. No repletion of information 11. Define 1NF? A relation schema R is in 1NF if the domains of all attributes of R are atomic 12. Define 2 NF? A relation schema R is in 2NF if every non prime attribute A in R is fully functionally dependent on the primary key of R. 13. Define 3NF? A relation schema R is in third normal form if, whenever a nontrivial functional dependency X -> A holds in R, either (a) X is super key of R or (b) A is a prime attribute of R. 14. What is BCNF? A relation schema R is in BCNF if it is in 3NF and satisfies additional constraints that for every FE X->A, X must be a candidate key. 15. What is query? A query with respect to DBMS relates to user commands that are used to interact with a database. The query language can be classified into data definition language and data manipulation language. 16. What do you mean by Correlated subquery? Subqueries, or nested queries, are used to bring back a set of rows to be used by the parent query. Depending on how the subquery is written, it can be executed once for the parent query of it can be executed once for each row returned by the parent query. If the subquery is executed for each row of the parent, this is called correlated subquery. 17.Define SQL and state the difference between SQL and other conventional programming Language. SQL is a nonprocedural language that is designed specifically for data access operations on normalized relational database structures. The primary difference between SQL and other conventional programming languages is that SQL statements Specify what data operations should be performed rather than how to perform them. 18. What is database trigger is a PL/SQL block that can defined to automatically execute for insert, update and deleted statements against a table.the trigger can be defied to execute once for the entire statement or once for every row that is inserted,updated,or deleted. For any one table, there are twelve events for which you can define database triggers. 19. What are Armstrong rules? Reflexive rule: If Y is subset or equal to X the X->Y Augmentation rule: If X->Y then XZ->YZ.

Transitive Rule: If {x->y,y->z} then X->Z The above three are known as Armstrong Rule 20. What are the privileges that can be granted on a table by a user to others? Insert, Update, delete, select, references, index, execute, alter, all 21. What is the difference between TRUNCATE and DELETE command? TRUNCATE is a DDL command whereas DELECTE is a DML command. Hence DELETE operation can be rolled back, but TRUNCATE operation cannot be rolled back. WHERE clause can be used with DELETE and not with TRUNCATE. 22. What is the use of CASCADE CONSTRAINTS? When this clause is used with the DROP command, a parent table can be dropped even when a child table exists. 23. Is it possible for several attributes to have the same domain? Illustrate you answer with suitable examples. Possibility for several attributes to have same domain. Yes, several attributes to have same domain. For example Attributes:name, address, belong to same domains contains all text string of certain length. 24. List out the field level constraints that can be associated with relational table. Unique, Check, Not null, primary key, foreign key 25. Justify the need for normalization. Need for normalization-to avoid insertion, deletion and updating anomalies. To ensure that there is no redundant data. To ascertain that the database design is perfect. 26. Name the different type of joins supported in SQL. Equi join, Natural join, self join, and outer join.

16/10/8 Marks Questions 1.What is a view? How can it be created? Explain with an example. 2.Discuss in detail the operators SELECT, PROJECT, UNION with suitable examples. 3. Explain static and dynamic SQL in detail. 4.Diagrammatically illustrate and discuss the steps involved in processing a query. 5.Give briefly about Query evaluations cost & Selection operation 6.How does a DBMS represent a relational query evaluation plan? 7.Since indices speed query processing, why might they not be kept on several search keys? List as many reasons as possible. 8.Consider the database given by the following schemes. Customer (Cust_No, Sales_ Person_No,City) Sales_ Person(Sales_ Person_No,Sales_ Person_Name, Common_Prec,Year_of_Hire) Give an expression in SQL for each of the following queries: Display the list of all customers by Cust_No with the city in which each is located. Select Cust No, city from Customer List the names of the sales persons who have accounts in Delhi. Select Sales_Person_Name from Sales_Person_Name where( select * from customer where city = delhi) 9.Write short notes on the following: Data Manipulation Language (DML), Data Definition Language (DDL) Transaction Control Statements (TCS),Data Control Language (DCL) 10.Consider the employee database, where the primary keys are Underlined. employee(empname,street,city) works(empname,companyname,salary) company(companyname,city) manages(empname,management) Give an expression in the relational algebra for each request. 1) Find the names of all employees who work for First Bank Corporation. 2) Find the names, street addresses and cities of residence of all employees who work for First Bank Corporation and earn more than 200000 per annum.

3) Find the names of all employees in this database who live in the same city as the company for which they work. 4) Find the names of all employees who earn more than every employees of small Bank Corpor