Вы находитесь на странице: 1из 8

KADI SARVA VISHWAVIDYALAYA

BCA SEM-III REGULAR [PRACTICAL EXAMINATATION]


NOVEMBER -2014
307-DATABASE MANAGEMENT SYSTEM-II
Date: Time:______ To_____

SET-1 TOTAL MARKS: 30

Viva : 10 marks
Logbook : 5 marks
Practical : 15 marks

Q-1 Create following tables. Give Primary key in each table. Provide appropriate
constraints to the tables. [5]

Client_Master (Client_no, Name, City, Pincode, State, Balance_due)


Sales_Order (Order_No, Order_Date, Client_No, Delivery_Address, Salesman_No)

Q-2 Insert following data into the tables. [5]

Client_no Name, City Pincode State Balance_due


C1001 Raj Ahmedaba 380052 Gujara 10000
d t
C1002 Arati Kadi 382715 Gujara 5000
t
C1003 Komal Kalol 382721 Gujara 15000
t
C1004 Ramesh Visnagar 382715 Gujara 800
t

Order_No Order_Date Client_No Delivery_Address Salesman_No


R1001 10/1/2013 C1001 Ahmedabad S1001
R1002 15/2/2013 C1002 Kadi S1002
R1003 17/2/2013 C1004 Visnagar S1003
R1004 20/4/2013 C1002 Kadi S1004
R1005 30/6/2013 C1003 Kalol S1003

Q-3 Perform following queries on the basis of above table. [5]

1. Find the names of all clients having ‘a’ as the second letter in their names.
2. Find out the clients who stay in a city whose First letter is ‘a’.
3. Find the list of all clients who stay in ‘Kadi ‘Kalol.
4. Print the list of clients who’s Balance_Due is greater than value 10000.
5. Display the order information for Client_No ‘C1001’ or ‘C1002’.
KADI SARVA VISHWAVIDYALAYA
BCA SEM-III REGULAR [PRACTICAL EXAMINATATION]
NOVEMBER -2014
307-DATABASE MANAGEMENT SYSTEM-II
Date: Time:______ To_____

SET-2 TOTAL MARKS: 30

Viva : 10 marks
Logbook : 5 marks
Practical : 15 marks

Q-1 Create following tables. Give Primary key in each table. Provide appropriate
constraints to the tables. [5]

Salesman_Master (Salesman_No, Salesman_Name, City, Pincode, State, Sales_Amount)


Sales_Order (Order_No, Order_Date, Client_No, Delivery_Address, Salesman_No)

Q-2 Insert following data into the tables. [5]

Salesman_No Salesman_Name City Pincode State Sales_Amount


S1001 Ravi Ahmedaba 380052 Gujarat 10000
d
S1002 Ramesh Kadi 382715 Gujarat 15000
S1003 Mahesh Kalol 382721 Gujarat 19000
S1004 Hresh Visnagar 382715 Gujarat 25000

Order_No Order_Date Client_No Delivery_Address Salesman_No


R1001 10/1/2013 C1001 Ahmedabad S1001
R1002 15/2/2013 C1002 Kadi S1002
R1003 17/2/2013 C1004 Visnagar S1003
R1004 20/4/2013 C1002 Kadi S1004
R1005 30/6/2013 C1003 Kalol S1003

Q-3 Perform following queries on the basis of above table. [5]

1. Find the names of all Salesman having ‘a’ as the second letter in their names.
2. Find out the Salesman who stay in a city whose First letter is ‘a’.
3. Find the list of all Salesman who stay in ‘Kadi ‘Kalol.
4. Print the list of Salesman’s name who’s Sales amount is greater than value 15000.
5. Display the order information for Salesman_No ‘S1001’ or ‘S1002’.
BCA SEM-III REGULAR [PRACTICAL EXAMINATATION]
NOVEMBER -2014
307-DATABASE MANAGEMENT SYSTEM-II
Date: Time:______ To_____

SET-3 TOTAL MARKS: 30

Viva : 10 marks
Logbook : 5 marks
Practical : 15 marks

Q-1 Create following tables. Give Primary key in each table. Provide appropriate
constraints to the tables. [5]

Movies(Code, Title, Rating)


MoviesTheaters(M_code, Name, Code)

Q-2 Insert following data into the tables. [5]


Table name :- Movies
Code Title Rating
1 Citizen Kane PG
2 Singin in the Rain G
3 The Wizard of Oz G
4 The Quiet Man NULL
5 North by Northwest NULL
6 The Last Tango in Paris NC-17
7 Some Like it Hot PG-13
8 A Night at the Opera NULL

Table name :- MoviesTheaters


M_Code Name Code
1 Odeon 5
2 Imperial 1
3 Majestic NULL
4 Royale 6
5 Paraiso 3
6 Nickelodeon NULL

Q-3 Perform following queries on the basis of above table. [5]

1. Show all the distinct ratings in the movies database.


2. Select all movie theaters that are not currently showing a movie.
3. Set the rating of all unrated movies to "G".
4. Remove movie theaters projecting movies rated "NC-17".
5. Show all unrated movies.
BCA SEM-III REGULAR [PRACTICAL EXAMINATATION]
NOVEMBER -2014
307-DATABASE MANAGEMENT SYSTEM-II
Date: Time:______ To_____

SET-4 TOTAL MARKS: 30

Viva : 10 marks
Logbook : 5 marks
Practical : 15 marks

Q-1 Create following tables. Give Primary key in each table. Provide appropriate
constraints to the tables. [5]

Employees(FirstName , LastName, Employee_ID, State)


Job_History(Employee_ID, Job_Code);

Q-2 Insert following data into the tables. [5]

FirstName LastName Employee_ID State


Ho Louie 1 FL
Chan John 2 FL
Ma Joseph 4 MA
Lee Dean 10 MA
Yiu Leslie 5 FL

Employee_ID Job_Code

1 MENG
2 DMGR
3 DMGR
4 DMGR
5 MENG
6 SECR
7 DMGR
8 DMGR
9 DMGR
10 DMGR

Q-3 Perform following queries on the basis of above table. [5]

1. List LastName, FirstName and Job_Code of each employee from the two tables.
2. List the LastName, FirstName from employees table with the value ‘MA’ in state column.
3. Find the number of rows in the Employees table.
4. Display the number of unique values in the state column of the employees table.
5. Display first name and state whose last name start with ‘J’
BCA SEM-III REGULAR [PRACTICAL EXAMINATATION]
NOVEMBER -2014
307-DATABASE MANAGEMENT SYSTEM-II
Date: Time:______ To_____
SET-5 TOTAL MARKS: 30

Viva : 10 marks
Logbook : 5 marks
Practical : 15 marks

Q-1 Create following table structure. Provide appropriate constraints to the tables. [5]
Table Name:- Student
Field Data Type Constraint
Name
Sid Number(3) Primary Key
Fname Char(20) Not Null
Lname Char(20) Not Null
Sadd Varchar(30)  
spno Number(10) Unique
Semail_id Varchar(40)  
City Char(15) Not Null
Zip_code Number(6) Not Null
    Check sid>=300

Q-2 Insert following data into the tables. [5]

Sid Fname Lname Sadd Spno Semail_id City


201 Gita Patel 11, yash society 9898989898 123y@gmail.com surat
301 Sita Parmar B-11, Krishna 9876543212 abc@yahoo.com kalol
society
302 Michael Rogers A-5,Radhe Flat 9866665585 y23@yahoo.co.in ahmedabad
305 Anand Manikutty 105/b, hiravali 9868879425 hi33@hotmail.co gandhinagar
society m
312 Carol Smith 15,yash society 9864443321 w3@yahoo.co.in ahmedabad
318 Joe Stevens 4-b, new roman 8888777766 rit34@gmail.com kalol
flat
303 Mary- Foster B-5,Radhe Flat 8877663322 e123@gmail.co.in surat
Anne
320 John Doe B-51,vallabh 8844338525 jay56@yahoo.com valsad
Tower

Q-3 Perform following queries on the basis of above table. [5]

1. In the above table add one column (Semester), which has default value as ‘Sem3’.
2. In the above table delete the column Zip_code.
3. Change the data type of Sadd to char(50).
4. Display name of the student whose id between 300 and 318.
5. Display name and city of the student whose city has second letter ‘a’
KADI SARVA VISHWAVIDYALAYA
BCA SEM-III REGULAR [PRACTICAL EXAMINATATION]
NOVEMBER -2014
307-DATABASE MANAGEMENT SYSTEM-II
Date: Time:______ To_____

SET-6 TOTAL MARKS: 30

Viva : 10 marks
Logbook : 5 marks
Practical : 15 marks

Q-1 Create following tables. Give Primary key in each table. Provide appropriate
constraints to the tables. [5]

Dept (Deptno,Dname,Loc)
Employee (Empno, Empname, Job, Mgr, Hireddate, Sal, Comm, DeptNo)

Q-2 Insert following data into the tables. [5]

Deptno Dname Loc


10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON

Empno Empname Job Hireddate Sal Comm DeptNo


Mgr
7839 KING PRESIDENT 17-NOV-81 5000 10
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 1500 10
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARATIN SALESMA 7698 28-SEP-81 1250 1400 30
N
7499 ALLEN SALESMA 7698 20-FEB-81 1600 300 30
N
7844 TURNER SALESMA 7698 08-SEP-81 1500 0 30
N
7900 JAMES CLERK 7698 03-DEC-81 950 30
7521 WARD SALESMA 7698 22-FEB-81 1250 500 30
N
7902 FORD ANALYST 7566 03-DEC-81 3000 NULL
7369 SMITH CLERK 7902 17-DEC-80 800 NULL
7788 SCOT ANALYST 7566 09-DEC-82 3000 20
7876 ADAM CLERK 7788 12-JAN-83 1500 20

Q-3 Perform following queries on the basis of above table. [5]

1. Find out who earns the least.


2. Which positions are paid higher than the average salary?
3. Give the details of those departments that do not have any employee.
4. Find the location of the employee named CLARK.
5. Show the details of those employees who have salaries equal to any employee of the
department 30.

KADI SARVA VISHWAVIDYALAYA


BCA SEM-III REGULAR [PRACTICAL EXAMINATATION]
NOVEMBER -2014
307-DATABASE MANAGEMENT SYSTEM-II
Date: Time:______ To_____

SET-7 TOTAL MARKS: 30

Viva : 10 marks
Logbook : 5 marks
Practical : 15 marks

Q-1 Create following table structure. Provide appropriate constraints to the tables. [5]
Table Name:- empinfo
Field Data Type Constraint
Name
First name Char(20) Not Null

Last name Char(20) Not Null


id Number(5) Primary Key
age Number(2)  
city Char(20) Not Null
state Char(20) Not Null

Q-2 Insert following data into the tables. [5]


Sample Table: empinfo
first last id age city state
John Jones 99980 45 Payson Arizona
Mary Jones 99982 25 Payson Arizona
Eric Edwards 88232 32 San Diego California
Mary Ann Edwards 88233 32 Phoenix Arizona
Ginger Howell 98002 42 Cottonwood Arizona
Sebastian Smith 92001 23 Gila Bend Arizona
Gus Gray 22322 35 Bagdad Arizona
Mary Ann May 32326 52 Tucson Arizona
Erica Williams 32327 60 Show Low Arizona
Leroy Brown 32380 22 Pinetop Arizona
Elroy Cleaver 32382 22 Globe Arizona

Q-3 Perform following queries on the basis of above table. [5]


1. Display the first name and age for everyone that's in the table.
2. Display the first name, last name, and city for everyone that's not from Payson.
3. Display all columns for everyone that is over 40 years old.
4. Display the first and last names for everyone whose last name ends in an "ay".
5. Display all columns for everyone whose first name equals "Mary".

Вам также может понравиться