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

Similar documents
Programming Languages

FIRST PRE BOARD CLASS-XII INFORMATICS PRACTICES

King Fahd University of Petroleum and Minerals

CS2 Current Technologies Lecture 2: SQL Programming Basics

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

Real-World Performance Training SQL Introduction

CS2 Current Technologies Lecture 3: SQL - Joins and Subqueries

CS2 Current Technologies Note 1 CS2Bh

INFORMATION TECHONOLOGY (402) UNIT 7 DATABASE DEVELOPMENT PRACTICAL QUESTIONS

Pivot Tables Motivation (1)

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

SQL Structured Query Language Introduction

Introduction. Introduction to Oracle: SQL and PL/SQL

Informatics Practices (065) Sample Question Paper 1 Section A

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

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

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

PRACTICAL ASSIGNMENTS [LAB WORK] CLASS XII IP

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

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

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

Database implementation Further SQL

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

INTERNATIONAL INDIAN SCHOOL, RIYADH XI XII BOYS SECTION

Time Allowed :3 hours Maximum Marks : 70

1 SQL Structured Query Language

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

1 SQL Structured Query Language

INTERNATIONAL INDIAN SCHOOL, RIYADH XI XII BOYS SECTION. Subject- Informatics Practices

Introduc.on to Databases

IBM DB2 9 Family Fundamentals. Download Full Version :

IBM A Assessment: DB2 9 Fundamentals-Assessment. Download Full Version :

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

Downloaded from

Babu Madhav Institute of Information Technology 2015

ajpatelit.wordpress.com

THE INDIAN COMMUNITY SCHOOL, KUWAIT

Downloaded from

KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT INFORMATICS PRACTICES(065) CLASS XII. Total Marks Questions VSA SA I LA Total 34 70

5 Years Integrated M.Sc.(IT) Semester 1 Practical LIST CC2 Database Management Systems

CBSE International Class XII Informatics Practices Annual Examination Sample Question Paper

Assignment No. 1 DBMS CONCEPTS

Create Rank Transformation in Informatica with example

Sample Question Paper

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

1Z0-007 ineroduction to oracle9l:sql


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

KENDRIYA VIDYALAYA SANGATHAN CLASS XII EXAMINATION INFORMATICS PRACTICES (065)

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

Databases - 4. Other relational operations and DDL. How to write RA expressions for dummies

INDIAN SCHOOL SOHAR FIRST TERM EXAM ( ) INFORMATICS PRACTICES

DTS PAX (Public Access)

Downloaded from

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

Maintaining Data 3.3.1

Holiday Homework AUTUMN BREAK : to CLASS XII

Creating and Managing Tables Schedule: Timing Topic

Database Modelling. Lecture 4 (b): Database Integrity, Keys & Constraints. Akhtar Ali 10/14/2014 1

NURSING_STAFF NNbr NName Grade

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

Revised Guidelines for B.A. Programme Semester II Paper: Database Management System (Meeting held on 15 th Jan 2015)

SECOND TERMINAL EXAMINATION, 2017 INFORMATICS PRACTICES

2011 DATABASE MANAGEMENT SYSTEM

SAMPLE PAPER CLASS XII SUBJECT Informatics Practices

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

Step 1: Download the Overdrive Media Console App

USER GUIDE UTRADE ID Mobile for iphone & ipad

GIFT Department of Computing Science. CS-217: Database Systems. Lab-4 Manual. Reporting Aggregated Data using Group Functions


Visit for more.

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

Q.1 Short Questions Marks 1. New fields can be added to the created table by using command. a) ALTER b) SELECT c) CREATE. D. UPDATE.

Definitions. Database Architecture. References Fundamentals of Database Systems, Elmasri/Navathe, Chapter 2. HNC Computing - Databases

CITY UNIVERSITY OF NEW YORK. Creating a New Project in IRBNet. i. After logging in, click Create New Project on left side of the page.

D.A.V. PUBLIC SCHOOL, NEW PANVEL

ES I INFORMATICS PRACTICES Set I Class XII Sec- A,B,C Date: April 2017 Time: 1 hr 10 min M.M.: 30

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

Topic 8 Structured Query Language (SQL) : DML Part 2

Databases. Relational Model, Algebra and operations. How do we model and manipulate complex data structures inside a computer system? Until

. : B.Sc. (H) Computer Science. Section A is compulsory. Attempt all parts together. Section A. Specialization lattice and Specialization hierarchy

: ADMINISTRATION I EXAM OBJECTIVES COVERED IN THIS CHAPTER:

Answer any four from (a) to (g) questions : (4 x 2=8)

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

PRE BOARD EXAM Sub:Informatics Practices (065) Class:XII

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

BACHELOR OF COMPUTER APPLICATIONS (BCA)

Chapter _CH06/CouchmanX 10/2/01 1:32 PM Page 259. Manipulating Oracle Data

Chapter 9: Working with MySQL

Oracle Database 18c. Gentle introduction to Polymorphic Tables Functions with Common patterns and sample use cases

12. MS Access Tables, Relationships, and Queries

Tables From Existing Tables

CITY UNIVERSITY OF NEW YORK. i. Visit:

Question Bank. Class : XII( ) Subject : Informatics Practices(065)

DATABASE MANAGEMENT APPLICATIONS

Mathematics Shape and Space: Polygon Angles

This homework contains 8 pages. Please scroll down to see all of the pages.

INDEX. 1 Introduction. 2 Types of Cursors 2.1 Explicit cursor 2.2 Attributes 2.3 Implicit cursor 2.4 Attributes. 3 Parameterized cursor

Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Slide 17-1

SYSTEM CODE COURSE NAME DESCRIPTION SEM

Transcription:

Q1. Write SQL query for the following : (i) To create above table as per specification given (ii) To insert 02 records as per your choice (iii) Display the Item name, qty & s of all items purchased by customer whose custid is C101. (iv) Delete record of customer Kamala. Q2. Write SQL query for the following : (i) To create above table as per specification given (ii) Add new column ItemCategory to store one Characters only. (iii) Display the ItemName purchased between dates 2015-01-22 and 2015-02-21. (iv) Display customer name who purchased TEA from the shop.

Q3. Write SQL query for the following : Table : SHOP ItemID CHAR 5 Primary key (i) To create above table as per specification given (ii) Add new column ItemType to store one Characters only. (iii) To update the table and change the of TEA If item TEA sold in qty 50, (iv) Display ItemName whose is more than 10 but is less than Rs. 100;. 04 (i) (ii) (iii) (iv) Display Customer No., Customer Address of all customers. Display details of Touch Screen phone. Insert new record in Customer as per your choice. To drop table customer

05. Consider the tables PURCHASE and CUSTOMERS given below: CUSTOMER Cust_Id First_Name Last_Name DOB Purchase 1 Alisha Madan 20/01/1989 200 2 Akhil Sachdeva 01/02/1990 199 3 Rajesh Mehta 10/09/1986 600 Rani Garg 24/11/1986 99 With reference to these tables, write commands in SQL for (i) and (iv) (i) Display the first name, last name and DOB of all the customers. (ii) Display the names of all customers whose purchase amount is more than Rs. 200 (iii) Display Sum of purchase of above table. (iv) Display First Name whose DOB between 10/09/1986 and 20/01/1989. Q6. Write the SQL command for (i) to (iv) on the basis of the table SUPPLIER: Table: SHOP SNo PName SName Price City S1 Bread Britannia 150 8.00 Delhi S2 Cake Britannia 250 20.00 Mumbai S3 Coffee Nascafe 170 45.00 Mumbai S4 Chocolate amul 380 10.00 Delhi S5 Sauce kissan 470 36.00 Jaipur (i) Display details for all products whose quantity is between 170 and 370. (ii) Display data for all products sorted by their quantity. (iii) Display City where City should not repeat. (iv) Give SName for that entire product whose name starts with C.

Q7. Use the following structure of Customer table to write SQL as follows : Column Name Cust_ID (Primary Key) Cust_Name Cust_Add1 Pin_Code Cust_Phone Data type NUMBER VARCHAR2 VARCHAR2 NUMBER VARCHAR2 Length 7 30 20 6 10 (i) (ii) (iii) (iv) To create the above table including its Constraints. To insert a record into created table. Add new column in above table as DateOfReg of date type. Drop the column Pin_Code Q8. Consider following tables and write SQL Table: Emp EMPNO ENAME JOB HIREDATE SAL COMM DEPTNO 7566 JONES MANAGER 02-Apr-81 2975 NULL 20 7654 MARTIN SALESMAN 28-Sep-81 1250 1400 30 7698 BLAKE MANAGER 01-May-81 2850 NULL 30 7782 CLARK MANAGER 09-Jun-81 2450 NULL 10 7788 SCOTT ANALYST 09-Dec-82 3000 NULL 20 (i) To list the EName who is not getting any commission(comm). (ii) Display ENAME and SAL of all employee getting salary more that 1000 (iii) Display different jobs available in EMP table. (Hint : unique jobs) (iv) Display Name of Employee whose name start with character A.

Q9. Write SQL query for the following : (v) To create above table as per specification given (vi) To insert 02 records as per your choice (vii) Display the Item name, qty & s of all items purchased by customer whose custid is C101. (viii) Delete record of customer Kamala. Q10. Write SQL query for the following : (v) To create above table as per specification given (vi) Add new column ItemCategory to store one Characters only. (vii) Display the ItemName purchased between dates 2015-01-22 and 2015-02-21. (viii) Display customer name who purchased TEA from the shop.

Q11. Write SQL query for the following : Table : SHOP ItemID CHAR 5 Primary key (v) To create above table as per specification given (vi) Add new column ItemType to store one Characters only. (vii) To update the table If item TEA sold in qty 50, (viii) Display ItemName whose is more than 10 but is less than Rs. 100;. Q12. Write SQL query for the following : (ix) To create above table as per specification given (x) To insert 02 records as per your choice (xi) Display the Item name, qty & s of all items purchased by customer whose custid is C101. (xii) Delete record of customer Kamala.

Q13. Write SQL query for the following : (ix) To create above table as per specification given (x) Add new column ItemCategory to store one Characters only. (xi) Display the ItemName purchased between dates 2015-01-22 and 2015-02-21. (xii) Display customer name who purchased TEA from the shop. Q14. Write SQL query for the following : Table : SHOP ItemID CHAR 5 Primary key. (ix) To create above table as per specification given (x) Add new column ItemType to store one Characters only. (xi) To update the table and change the of TEA If item TEA sold in qty 50, (xii) Display ItemName whose is more than 10 but is less than Rs. 100;

Q15 (v) (vi) (vii) (viii) Display Customer No., Customer Address of all customers. Display details of Touch Screen phone. Insert new record in Customer as per your choice. To drop table customer Q16 Consider the tables PURCHASE and CUSTOMERS given below: CUSTOMER Cust_Id First_Name Last_Name DOB Purchase 1 Alisha Madan 20/01/1989 200 2 Akhil Sachdeva 01/02/1990 199 3 Rajesh Mehta 10/09/1986 600 Rani Garg 24/11/1986 99 With reference to these tables, write commands in SQL for (i) and (iv) (iii) Display the first name, last name and DOB of all the customers. (iv) Display the names of all customers whose purchase amount is more than Rs. 200 (iii) Display Sum of purchase of above table. (iv) Display First Name whose DOB between 10/09/1986 and 20/01/1989.

Q17. Write the SQL command for (i) to (iv) on the basis of the table SUPPLIER: Table: SHOP SNo PName SName Price City S1 Bread Britannia 150 8.00 Delhi S2 Cake Britannia 250 20.00 Mumbai S3 Coffee Nascafe 170 45.00 Mumbai S4 Chocolate amul 380 10.00 Delhi S5 Sauce kissan 470 36.00 Jaipur (v) Display details for all products whose quantity is between 170 and 370. (vi) Display data for all products sorted by their quantity. (vii) Display City where City should not repeat. (viii) Give SName for that entire product whose name starts with C. Q18. Use the following structure of Customer table to write SQL as follows : Column Name Cust_ID (Primary Key) Cust_Name Cust_Add1 Pin_Code Cust_Phone Data type NUMBER VARCHAR2 VARCHAR2 NUMBER VARCHAR2 Length 7 30 20 6 10 (v) (vi) (vii) (viii) To create the above table including its Constraints. To insert a record into created table. Add new column in above table as DateOfReg of date type. Drop the column Pin_Code

Q19. Consider following tables and write SQL Table: Emp EMPNO ENAME JOB HIREDATE SAL COMM DEPTNO 7369 SMITH CLERK 17-Dec-80 800 NULL 20 7499 ALLEN SALESMAN 20-Feb-81 1600 300 30 7521 WARD SALESMAN 22-Feb-81 1250 500 30 7566 JONES MANAGER 02-Apr-81 2975 NULL 20 7654 MARTIN SALESMAN 28-Sep-81 1250 1400 30 (v) To list the EName who is not getting any commission(comm). (vi) Display ENAME and SAL of all employee getting salary more that 1000 (vii) Display different jobs available in EMP table. (Hint : unique jobs) (viii) Display Name of Employee whose name start with character A. Q22. Write SQL query for the following : (xiii) To create above table as per specification given (xiv) To insert 02 records as per your choice (xv) Display the Item name, qty & s of all items purchased by customer whose custid is C101. (xvi) Delete record of customer Kamala.