Q1. (SQL) Consider the following table HOSPITAL. Write SQL commands for the statements (i) to (v)

Similar documents
Q5 Question Based on SQL & Database Concept Total Marks 8. Theory Question 2 Marks / SQL Commands 6 Marks / Output of commands 2 Marks

Holiday Homework AUTUMN BREAK : to CLASS XII

INFORMATION TECHONOLOGY (402) UNIT 7 DATABASE DEVELOPMENT PRACTICAL QUESTIONS

INTRODUCTION (SQL & Classification of SQL statements)

Downloaded from

INFOTECH Computer Education, Kishangarh (Raj) Visit : Page 1

Table : Purchase. Field DataType Size Constraints CustID CHAR 5 Primary key CustName Varchar 30 ItemName Varchar 30 PurchaseDate Date

CS2 Current Technologies Lecture 2: SQL Programming Basics

King Fahd University of Petroleum and Minerals

THE INDIAN COMMUNITY SCHOOL, KUWAIT

COMPUTER SCIENCE 1998 (Delhi Board)

KENDRIYA VIDYALAYA SANGATHAN CLASS XII EXAMINATION INFORMATICS PRACTICES (065)

CS2 Current Technologies Lecture 3: SQL - Joins and Subqueries

Department of Computer Science and Information Systems, College of Business and Technology, Morehead State University

CBSE Sample Paper 2015 Computer Science C++ Class XII Time 3hrs M.M 70

Real-World Performance Training SQL Introduction

Programming Languages

SQL-Structured Query Language BY : SHIVENDER KUMAR BHARDWAJ PGT-TAFS

CS2 Current Technologies Note 1 CS2Bh

ajpatelit.wordpress.com

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

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOMEWORK CLASS-XII INFORMATICS PRACTICES

SAMPLE PAPER. Class: XII SUBJECT COMPUTER SCIENCE. Time: 3 Hours MM: 70

CHAPTER 10 SQL 6 MARKS QUESTIONS

software.sci.utah.edu (Select Visitors)

SQL Structured Query Language Introduction

KENDRIYA VIDYALAYA SANGATHAN TINSUKIA REGION PRE BOARD EXAMINATION SUBJECT COMPUTER SCIENCE

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

Database Management System. * First install Mysql Database or Wamp Server which contains Mysql Databse.

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION. REVISION Examination 2013 COMPUTER SCIENCE (083) CLASS XII


Introduction. Introduction to Oracle: SQL and PL/SQL

Informatics Practices (065) Sample Question Paper 1 Section A

Rani Durgavati Vishwavidyalaya Jabalpur (M.P.) (UICSA) Master of Computer Application (MCA) Practical List of. MCA III SEM Session -2010

DELHI PUBLIC SCHOOL, RUBY PARK, KOLKATA CLASS XII SUBJECT: COMPUTER SCIENCE QUESTION BANK FILE HANDLING:-

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

Sample Paper, Subject: Computer Science Class 12 th Time Allowed : 3 Hr. M.M.: 70

Assignment No. 1 DBMS CONCEPTS

Practical 8. SHANKER SINH VAGHELA BAPU INSTITUTE OF TECHNOLGY Subject: - DBMS Branch: - IT/CE Semester: - 3rd. 1. What does SQL stand for?

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

Introduc.on to Databases

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

Excel Functions & Tables

Section 1.2: What is a Function? y = 4x

Downloaded from

Database Programming with SQL

Sample Paper 2015 Class XII- Comm Subject INFORMATICS PRACTICES. Q1 a) Rewrite the code using While Loop? 2

DELHI PUBLIC SCHOOL BOKARO STEEL CITY ASSIGNMENT FOR THE SESSION

Holiday Home work Sub: IP Class: 12

This report is based on sampled data. Jun 1 Jul 6 Aug 10 Sep 14 Oct 19 Nov 23 Dec 28 Feb 1 Mar 8 Apr 12 May 17 Ju

INFORMATICS PRACTICES (065)

1. Answer the following questions: a. Explain Real Time OS.

Database implementation Further SQL

2 SEMESTER EXAM CLASS : 12 DECEMBER 2016 TIME : 3 Hrs MAX MARKS : 70

SESSION ENDING EXAMINATION CLASS XI SUBJECT : INFORMATICS PRACTICES (065) Time Allowed : 3 Hrs. Max Marks : 70

Lecture 10: Boolean Expressions

Pivot Tables Motivation (1)

Part 1 on Table Function

CBSE 12th Computer Science Question Papers

Sample Question Paper

SCI - software.sci.utah.edu (Select Visitors)

1 SQL Structured Query Language

Downloaded from Set :B SECTION A


Asks for clarification of whether a GOP must communicate to a TOP that a generator is in manual mode (no AVR) during start up or shut down.

2016 COMPUTER SCIENCE

THE INDIAN COMMUNITY SCHOOL, KUWAIT

GREENFIELDS PUBLIC SCHOOL HOLIDAY HOMEWORK- COMPUTER SCIENCE SESSION CLASS - XII STRUCTURED QUERY LANGUAGE

HPE Security Data Security. HPE SecureData. Product Lifecycle Status. End of Support Dates. Date: April 20, 2017 Version:

Informatics Practices, Class XII ( ) (Summer Vacation-2015) (Holiday H.W) Java Concepts & Programming, MySQL

THE INDIAN COMMUNITY SCHOOL, KUWAIT

Downloaded from

KENDRIYA VIDYALAYA SANGATHAN ERNAKULAM REGION FIRST COMMON PRE BOARD EXAMINATION

CS Reading Packet: "Views, and Simple Reports - Part 1"

Downloaded from

SECOND TERMINAL EXAMINATION, 2017 INFORMATICS PRACTICES

CIS611 Lab Assignment 1 SS Chung

COURSE LISTING. Courses Listed. Training for Database & Technology with Modeling in SAP HANA. 20 November 2017 (12:10 GMT) Beginner.

(Note: 1. Each Question Carries 5 marks. 2. Solve any two questions) SET-I

VPM s Joshi-Bedekar College of Arts and Commerce TYBCOM Practical Exam Practice Questions MYSQL

1 SQL Structured Query Language

PRACTICAL ASSIGNMENTS [LAB WORK] CLASS XII IP

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

Fluidity Trader Historical Data for Ensign Software Playback

All King County Summary Report


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

RDBMS Using Oracle. BIT-4 Lecture Week 3. Lecture Overview

(Structured Query Language)

KENDRIYA VIDYALAYA ONGC PANVELSESSION ENDING EXAM

SYSTEM CODE COURSE NAME DESCRIPTION SEM

Commission NUMBER(7,2) 15. Create a table with the undermentioned structure (Table name is DEPT)

Seattle (NWMLS Areas: 140, 380, 385, 390, 700, 701, 705, 710) Summary

GUJARAT TECHNOLOGICAL UNIVERSITY

Kenora Public Library. Computer Training. Introduction to Excel

Seattle (NWMLS Areas: 140, 380, 385, 390, 700, 701, 705, 710) Summary

Automatic Renewal Using DIY Technology to Create an Improved Patron Experience

DATABASE DEVELOPMENT (H4)

Seattle (NWMLS Areas: 140, 380, 385, 390, 700, 701, 705, 710) Summary

QUESTION BANK CLASS- XI ( INFORMATICS PRACTICES)

Transcription:

Q1. (SQL) Consider the following table HOSPITAL. Write SQL commands for the statements (i) to Table : HOSPITAL No Name Age Department Date of adm Charges Sex 1 Arpit 62 Surgery 21.01.98 300 M 2 Zarina 22 ENT 12.12.97 250 F 3 Kareem 32 Orthopedic 19.02.98 200 M 4 Arun 12 Surgery 11.01.98 300 M 5 Zubin 30 ENT 12.01.98 250 F (i)to create the above table (ii) To insert a new row in the HOSPITAL table. (iii)to list the names of female patients who are in ENT department (iv) To list names of all patients with their date of admission in ascending order. To display patients name, charges, age for only female patients. Q2. (SQL) Consider the following table EXAM. Write SQL commands for the statements (i) to Table: EXAM Scode SubjectName NumberOfStudents AvgMarks ExamDate 083 Computer Sc 67 95 22-Mar-2014 301 English 110 85 01-Mar-2014 041 Maths 110 80 20-Mar-2014 042 Physics 100 90 05-Mar-2014 043 Chemistry 100 85 11-Mar-2014 (i) (ii) (iii) (iv) Write SQL Command to create above Table. Write Sql Command to insert a row in the above table. To display the name of all Subjects in descending order of their subject codes. To display Average of AvgMarks for each number of students groupings. (As shown in column NumberOfStudents 67, 110, 100) To display the content of the EXAM table in alphabetic order of SubjectName whose exam date is on or after 20-Mar-2014. [Type text] Page 1

Q3. (SQL) Consider the following table EMPLOYEE. Write SQL commands for the statements (i) to Table : EMPLOYEE EmpNo EmpName Job Hiredate Salary DeptNo 7839 KING PRESIDENT 17-NOV-81 5000 10 7698 BLAKE MANAGER 01-MAY-81 3000 30 7782 CLARK MANAGER 19-JUN-81 2450 10 7566 JONES MANAGER 02-APR-81 4975 29 7654 MARTIN SALESMAN 28-SEPT-81 1250 30 (iii) Display details of all employee whose names include either of substring AK or AR. (iv) Display NAME & JOB for all MANAGERs who earn between 2000 and 3000. Display Name & Salary for all employees sorted by their salary in descending order. Q4. (SQL) Consider the following table ITEM. Write SQL commands for the statements (i) to TABLE: ITEM I_ID ItemName Manufacturer Price PC01 Personal Computer ABC 35000 LC05 Laptop ABC 55000 PC03 Personal Computer XYZ 32000 PC06 Personal Computer COMP 37000 LC03 Laptop PQR 57000 (iii) To display the details of Items whose Price is in the range of 35000 to 55000 (Both values included) (iv) To display all the contents in the table Item in the descending order of the ItemName. To display detail of items whose name contains Computer as substring. [Type text] Page 2

Q5. (SQL) Consider the following table TEACHER.Write SQL commands for the statements (i) to Table:TEACHER No. Name Age Department Dateofadm Salary Sex 1 Jugal 34 Computer 10/01/97 12000 M 2 Sharmila 31 History 24/03/98 20000 F 3 Sandeep 32 Maths 12/12/96 30000 M 4 Sangeeta 35 History 01/07/99 40000 F 5 Rakesh 42 Maths 05/09/97 25000 M 6 Shyam 50 History 37/06/98 30000 M 7 Shivam 44 Computer 25/02/97 21000 M 8 Shalakha 33 Maths 31/07/97 20000 F (iii) To show all information about the teacher of History department. (iv) To list the names of female teachers who are in Maths department. To list names of all teachers with their date of admission in ascending order. Q6. (SQL) Consider the following table ACTIVITY.Write SQL commands for the statements (i) to Table: ACTIVITY ACode ActivityName ParticipantsNum PrizeMoney ScheduleDate 1001 Relay 100x4 16 10000 23-Jan-2004 1002 High jump 10 12000 12-Dec-2003 1003 Shot Put 12 8000 14-Feb-2004 1005 Long Jump 12 9000 01-Jan-2004 1008 Discuss Throw 10 15000 19-Mar-2004 (iii) To display the name of all activities with their Acodes in descending order. (iv) To display sum of PrizeMoney for each of the Number of participants groupings (as shown in column ParticipantsNum 10,12,16) To display the Activity name and ACodes in descending order of ACode [Type text] Page 3

Q7. (SQL) Consider the following table DRESS. Write SQL commands for the statements (i) to Table : DRESS DCODE DESCR PRICE MCODE LAUNCHDATE 101 Shirt 515 M004 12-Jan-2008 120 Formal Shirt 1213 M001 09-Sep-2007 112 Frock 450 M002 06-Jun-2008 119 Evening Gown 650 M003 15-Jul-2009 189 Slacks 340 M002 09-Jan-2008 107 Jeans 770 M001 15-Sep-2009 124 Jacket 2050 M003 25-Mar-2009 109 Fancy Top 350 M004 31-Dec-2007 (iii) To display all information of table DRESS in descending order of PRICE that were launched before 2009. (iv) To display dresses detail that prices go beyond 1000 and have been launched between 2007-2008 To modify the schema of table dress by adding an extra attribute namely QTY as integer type. Q8. (SQL) Consider the following table CLIENT. Write SQL commands for the statements (i) to Table : CLIENT C_ID Client Name City P_ID 01 TalcomPowder Delhi FW05 06 Face Wash Mumbai BS01 12 Bath Soap Delhi SH06 15 Shampoo Delhi FW12 16 Face Wash Banglore TP01 (iii) To display Information about the clients belonging to city Delhi. (iv) To display the name of clients whose name starts with F. To count the number of clients from each city with city name [Type text] Page 4

Q9. (SQL) Consider the following table PRODUCT. Write SQL commands for the statements (i) to Table: PRODUCT P_ID Product Name Manufacturer Price TP01 Talcom Powder LAK 40 FW05 Face Wash ABC 45 BS01 Bath Soap ABC 55 SH06 Shampoo XYZ 120 FW12 Face Wash XYZ 95 (i) (ii) (iii) Write SQL Command to create above Table. Write Sql Command to insert a row in the above table. To display the details of Products whose Price is in the range of 50 to 100(Both values included) (iv) To increase the Price of all Products by 10 To display detail of products in descending order of price. Q10. (SQL) Consider the following table WORKER. Write SQL commands for the statements (i) to Table: WORKER ECODE NAME DESIG PLEVEL DOJ DOB 11 Radhe Shyam Supervisor P001 13-Sep-2004 23-Aug-1981 12 Chander Nath Operator P003 22-Feb-2010 12-Jul-1987 13 Fizza Operator P003 14-Jun-2009 14-Oct-1983 15 Ameen Ahmed Mechanic P002 21-Aug-2006 13-Mar-1984 18 Sanya Clerk P002 19-Dec-2005 09-Jun-1983 (i) (ii) (iii) Write SQL Command to create above Table. Write SQL Command to insert a row in the above table. To display the details of all Workers in descending order of DOB (iv) To display Name and Desig of those Workers, whose Plevel is either P001, or P002. To display the content of all the workers table whose DOB is in between 19-Jan-1984 and 18-Jan-1987. [Type text] Page 5

Boolean Algebra Assignments Q1. (K-Map) F(A,B,C,D)= (0,1,2,3, 4,5,6,8,9, 10, 11, 15) Q2. (K-Map) F(U,V,W,Z)= π Q3. (K-Map) F (A,B,C,D) = (0,2,3,4,6,7,8,10,12) Q4. (K-Map) F(U,V,W,X) = (0,1,3,4,7,8,11,12,15) Q5. (K-Map) F(U,V,W,X) = (1,3,5,8,10,12) Q6. (K-Map) F(U,V,W,X) = (1,3,5,8,10,12) Q7. (K-Map) F(A,B,C,D)= (0, 2, 4, 5,7,8, 10, 12, 13, 15) Q8. (K-Map) F(U,V,W,X) = II (0,1,4,5,6,7,8,11,12,13,14,15) Q9. (K-Map) F(P,Q,R,S)= π(0,1,3,5,6,7,10,14,15) Q10. (K-Map) F(A,B,C,D)= π(1,3,4,5,6,7,12,13) [Type text] Page 6