SYSTEM CODE COURSE NAME DESCRIPTION SEM

Similar documents
Oracle Class VII More on Exception Sequence Triggers RowID & Rownum Views

Institute of Engineering & Management

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement

D a t a b a s e M a n a g e m e n t S y s t e m L a b Institute of Engineering and Management

Sample Question Paper

Institute of Engineering & Management. Course:CS603- Operating System. Course pre-requisites

PROGRAMME: COMPUTER SCIENCE & ENGINEERING COURSE: Operating System Lab SEMESTER: VI CREDITS: 2

Oracle Database 10g: Introduction to SQL

Creating and Managing Tables Schedule: Timing Topic

Objectives. After completing this lesson, you should be able to do the following:

Institute of Engineering & Management. CONTACT HOURS: 6 (weekly) CODE COURSE NAME DESCRIPTION SE M CS201 Basic Computation & Principles of Computer

Bsc (Hons) Software Engineering. Examinations for / Semester 1. Resit Examinations for BSE/15A/FT & BSE/16A/FT

CODE COURSE NAME DESCRIPTION SEM CS401 Communication Engineering & Coding Theory Knowledge of communication engineering & coding theory IV

Introduction to Computer Science and Business

Introduction. Introduction to Oracle: SQL and PL/SQL

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Oracle Database 11g: SQL and PL/SQL Fundamentals

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

Course Title: Introduction to Database Management System Course Code: CSIT116 Course Level: UG Course Credits:04 L T P/ S SW/F W

P.G.D.C.M. (Semester I) Examination, : ELEMENTS OF INFORMATION TECHNOLOGY AND OFFICE AUTOMATION (2008 Pattern)

1 Prepared By Heena Patel (Asst. Prof)

BraindumpsVCE. Best vce braindumps-exam vce pdf free download

Table of Contents. Oracle SQL PL/SQL Training Courses

Course Outline and Objectives: Database Programming with SQL

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.

CS2 Current Technologies Note 1 CS2Bh

GIFT Department of Computing Science. CS-217/224: Database Systems. Lab-5 Manual. Displaying Data from Multiple Tables - SQL Joins

Retrieving Data Using the SQL SELECT Statement. Copyright 2009, Oracle. All rights reserved.

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292

DB2 SQL Class Outline

Database Programming with SQL

Writing Queries Using Microsoft SQL Server 2008 Transact-SQL. Overview

Oracle Database: SQL and PL/SQL Fundamentals NEW

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

CS2 Current Technologies Lecture 2: SQL Programming Basics

Additional Practice Solutions

GIFT Department of Computing Science. [Spring 2016] CS-217: Database Systems. Lab-3 Manual. Single Row Functions in SQL

THE INDIAN COMMUNITY SCHOOL, KUWAIT

Tables From Existing Tables

COWLEY COLLEGE & Area Vocational Technical School

CS2 Current Technologies Lecture 3: SQL - Joins and Subqueries

SQL. Char (30) can store ram, ramji007 or 80- b

Ministry of Higher Education and Scientific research

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

DATABASE DEVELOPMENT (H4)

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

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

King Fahd University of Petroleum and Minerals

Course Outline Faculty of Computing and Information Technology

15CSL58: DATABASE MANAGEMENT LABORATORY

5 Integrity Constraints and Triggers

Chapter 4. Basic SQL. SQL Data Definition and Data Types. Basic SQL. SQL language SQL. Terminology: CREATE statement

Oracle Syllabus Course code-r10605 SQL

JEFFERSON COLLEGE COURSE SYLLABUS CIS236 SQL AND DATABASE DESIGN. 3 Credit Hours. Revised by: Chris DeGeare March 11, 2013

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

DATABASE MANAGEMENT SYSTEM SUBJECT CODE: CE 305

Using the Set Operators. Copyright 2006, Oracle. All rights reserved.

ITCertMaster. Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way!

Part III. Data Modelling. Marc H. Scholl (DBIS, Uni KN) Information Management Winter 2007/08 1

Database implementation Further SQL

COWLEY COLLEGE & Area Vocational Technical School

GUJARAT TECHNOLOGICAL UNIVERSITY

Oracle Database SQL Basics

SQL Interview Questions

Marwadi University Bachelor of Computer Application Semester II (w.e.f. July, 2016)

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.

Certification Exam Preparation Seminar: Oracle Database SQL

School of Computing and Information Technology. Examination Paper Autumn Session 2017

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables

CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C

Learning Alliance Corporation, Inc. For more info: go to

COWLEY COLLEGE & Area Vocational Technical School

Laboratory Manual. For. Database Management System (IT 502) B.Tech (IT) SEM V. June 2010

Oracle SQL & PL SQL Course

EE221 Databases Practicals Manual

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

Table-3: B.C.A. SEMESTER III

RDBMS Topic 4 Adv. SQL, MSBTE Questions and Answers ( 12 Marks)

Introduction to Computer Science and Business

Oracle Database: Introduction to SQL Ed 2

Database Management Systems,

CSC Web Programming. Introduction to SQL

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.

Introduction to Views

Oracle - MySQL Developer Techniques with Advanced

ASSIGNMENT NO 2. Objectives: To understand and demonstrate DDL statements on various SQL objects

Appendix A Practices and Solutions

Greenplum SQL Class Outline

CSC 261/461 Database Systems Lecture 6. Fall 2017

Oracle MOOC: SQL Fundamentals

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant

Misc. Triggers Views Roles Sequences - Synonyms. Eng. Mohammed Alokshiya. Islamic University of Gaza. Faculty of Engineering

An Introduction to Structured Query Language

PDA Database Programming in PL/SQL (Oracle PL/SQL Developer Certified Associate Certification Course)

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

Schema And Draw The Dependency Diagram

The SQL data-definition language (DDL) allows defining :

ORACLE DATABASE 12C INTRODUCTION

CS Final Exam Review Suggestions

Transcription:

Course: CS691- Database Management System Lab PROGRAMME: COMPUTER SCIENCE & ENGINEERING DEGREE:B. TECH COURSE: Database Management System Lab SEMESTER: VI CREDITS: 2 COURSECODE: CS691 COURSE TYPE: Practical COURSE AREA/DOMAIN: Laboratory Skills CONTACT HOURS: 3 (weeks) CORRESPONDING Theory COURSE CODE : CS601 THEOTY COURSE NAME: DATABASE MANAGEMENT SYSTEM Course pre-requisites CODE COURSE NAME DESCRIPTION SEM Course Objectives 1. To develop conceptual understanding of database management system 2. To understand how a real world problem can be mapped to schemas 3. To develop understanding of different applications and constructs of SQL PL/SQL Course Outcomes 1. Ability to crate database tables 2. Ability to formulate SQL queries based on the problems given 3. Ability to apply PL/SQL Lab Outcomes addressed in this course I.1. Develop students understanding through laboratory activities to solve problems related to key concepts taught in the classroom. L2. Develop students ability to solve open ended problems through the design and construction of new artifacts or processes. L3. Develop debugging capability in order to propose and apply effective engineering solutions. Department of CSE Page 1

Syllabus Creating Database Creating a Database Creating a Table Specifying Relational Data Types Specifying Constraints Creating Indexes 2. Table and Record Handling INSERT statement Using SELECT and INSERT together DELETE, UPDATE, TRUNCATE statements DROP, ALTER statements 3. Retrieving Data from a Database The SELECT statement Using the WHERE clause Using Logical Operators in the WHERE clause Using IN, BETWEEN, LIKE, ORDER BY, GROUP BY and HAVING Clause Using Aggregate Functions Combining Tables Using JOINS Subqueries 4. Database Management Creating Views Creating Column Aliases Creating Database Users Using GRANT and REVOKE 5. Oracle PL SQL Cursors in Oracle PL / SQL Writing Oracle PL / SQL Stored Procedures Department of CSE Page 2

Gaps in the syllabus - to meet industry/profession requirements S.NO. DESCRIPTION 1 Knowledge of other basic objects like inbuit and use defined functions and triggers Knowledge of how to handle Exceptions Skill of mapping a problem statement to ER diagram and then making the schema PROPOSED ACTIONS Extra Assignments LO MAPPING L1, L2,L3 Topics beyond syllabus/advanced topics S.NO. DESCRIPTION HOURS Introduction to different in built functions Introduction to function and trigger 1 Introduction to Exception Handing Modeling a real work problem to data base tables 9 Design Student Attendance System ( Project). Web Source References S.NO. 1 Delivery/Instructional Methodologies URL http://docs.oracle.com/cd/e11882_01/nav/portal_5.htm S.NO. DESCRIPTION 1 Chalk and Talk 2 PPTs, Lab demos Assessment Methodologies S.NO. DESCRIPTION TYPE 1 Student Assignments. Direct 2 Lab Tests Direct 3 University Examination Direct 4 Student Feedback Indirect Department of CSE Page 3

Assignment Lists Assignment 1 : 1. Complete schema design for a student attendance system 2. It should have entity for class, student, subject, routine, attendance 3. Create proper primary key and foreign keys 4. Write notes on Temporary table and Global Temporary table 5. Give an example where CATS will be necessary, with necessary syntax 6. Give a listing of the tables, columns and constraints Assignment 2: 7. write query to select all the columns of emp table 8. write query to select only Empname, Ename and Job 9. write query to select unique Jobs 10. write query to select only those employees who are salesman 11. select employee name, grade and salary, in the order of their salary 12. Mgmt is considering a pay raise, however they want to find out, if they give a flat 200$ increment to all, then what % each person is getting. So in your result display, ename, salary and pctincr 13. Express work experience of each of the employeses by using sysdate and hiredate in terms of no of years. Hints : you would need to use cast 14. select only those employees who are a clerk and a manager. Use all of or condition, IN and NOT IN clause a. Comment on the case sensitivity of the string literal within single quote 15. use emp table and use different columns and string concatenation to display a message like below for each of the employees Department of CSE Page 4

b. Output Example : c. JAMES is a CLERK and is working in the company for last 32 Years 16. use emp table to display only those employees who have joined in the year 80 and 81. d. Comment on if between clause is inclusive or exclusive 17. Use like statement to display name of the employees which start with A i. Write your remarks on use of wildcards with like statement 18. Select those employees, who has joined on or before 31 st December 1982 and is either a clerk or having a salary greater than 2500 Assignment 3: 19. List down no of employees, minimum salary, maximum salary for each department 20. Update Email_id, if department id is a) < 1000 update the EMAIL field by appending @oracle.com b) < 5000 update the EMAIL field by appending @oracle.co.uk c) Else update it as oracle.co.in 21. Apart from Delete a Truncate statement can also be used for deleting the rows. Comment on their difference. 22. Display a department id wise count of employees a. Getting salary more than 5000 b. Apart from the above condition, select only those departments which has an average salary in excess of 6500 23. Explain how two levels of filtering is happening based on firstly where clause secondly having clause based on this particular scenario 24. You want to add a new row in the employees table with employee id 10000, First Name = Scott, Last Name = Tiger, Email = Stiger, Hire Date, 01/02/2014, Job id PR_Prsdnt ( Title Company President ) Department_id 280 ( Department_Name Database ) Salary 50000 25. Issue necessary insert statements. 26. After the update is over in the email column, use instr and substr to display email id and domain information separately. 27. Display day, month and year of the hire date of the employees Department of CSE Page 5

28. Display the last name of the employees in a manner, so that they are right aligned. However please make sure the last name is displayed in a manner, so that they are sorted in descending order by the no. of character in each name 29. Select an appropriate query which displays the fistname and lastname of all the employees, however if the fisrstname is not available display it as Unknown 30. If an employee have spent less than 5 years then he is considered entry level id 5 10 then midlevel else a senior employee. Write a query, which will label the employees in either of the above categories 31. Write query to find out any departments that are present in department table but does not have employees 32. Write a query which will display job id, which are present in both job and employee columns Assignment 4: 33. Display name of employees, department name and job name for each employee 34. Display the department name along with no of employees and average salary of that department 35. For each department, find out no. of jobs the employees are assigned to. 36. Check for correctness of the above queries in terms of count, if you want to bring in all entries, how would you achieve the same? 37. Group by the employees based on the first character of employee first name. Display the results in alphabetic order (descending) of first character. 38. Display name of those employees who get a salary more than the average salary 39. Display name of the all the employees who are stock manager, except the one who gets the minimum salary. 40. Display firstname,lastname,salary of those sales representatives who earns a higher salary than the minimum salary a sales manager receives. 41. Display the name of the employees/employee who gets the second highest salary. (sub query) 42. Come up with the query for previous question using set operators 43. Display the name of the employee (manager) who has the maximum no. of employees reporting to him. Department of CSE Page 6

44. Display the name of those employees, who are in the same department as Timothy Gates and gets an salary more than the average salary of all the employees 45. If an employee have spent less than 5 years then he is considered entry level id 5 10 then midlevel else a senior employee. Write a query, which will label the employees in either of the above categories 46. Write query to find out any departments that are present in department table but does not have employees 47. Write a query which will display job id, which are present in both job and employee columns 48. Increase salary of each employee of all the department who draws the minimum salary by 100$. Assignment 5: 49. Create a function which takes two parameters tablename and columnname and returns second max value of the columns. Assignment 6: 50. Write a simple procedure, which executed now will return the time that of two hours earlier. 51. For emp table in scott, write a stored procedure that creates a table for each unique department_id and stores the employee records that belong to that particular department. 52. Write a stored procedure that expects one parameter no and based on the no it shows that many name of employees in terms of salary they are getting. 53. Write a simple procedure, similar to previous assignments, given an email id, this displays username and domain respectively, have correct messages displayed. Assignment 7: 54. Modify the procedure that takes salary and returns the name, handle the exception so that if user gives a nonnumeric value this exits gracefully. 55. Create a table books, which has columns as bookid and bookname. Insert two rows with booknames database fundamentals and database technologies. Use a sequence to populate the bookid for both the rows. 56. There is a circular from federal govt. no employees can get salary less than 1000$. So in case some employees are being inserted in the table with salary less than 1000 automatically this should be updated to 1000, Write a trigger for the same. Do it first by a just changing the below in insert before, and also by an update command after insert is done. 57. Create a trigger on emp table such that when a new employee is inserted with a deptno that is new, first insert that record in department and then insert the same in emp to avoid foreign key error. 58. Create a view, which hides the salary column from the user. Department of CSE Page 7

59. Create a view which has ename and dname respectively, check if you can update/insert into the views, justify your results Lesson Plan: S.NO. DESCRIPTION 1 Different Types of Data, Creating Tables, Data Types, Constraints, Data Dictionary 2 Select, Insert, Delete, Update, Dual 3 Group By, Having Clause, Different Set Operators 4 Different Types of Joins, Subquery 5 Introduction to PL/SQL, Basic Stored Procedures and functions 6 Stored Procedure Continued 7 Exceptions, Cursors, For Loop 8 Trigger, Sequence, Row ID, Rownum, Views 9 Project Department of CSE Page 8