Database Programming Past Papers Exam Questions

By: Prof. Fazal Rehman Shamil

Guess Paper 1:Database Programming Fall – 2020 Past Papers

Time Allowed: 3 hours

Total Marks:    70, Passing Marks (35)

Q: 1 Explain the following terms:
i. Arithmetic operators
ii. Transaction control
iii. Schema
iv. Comparison operators
v. PL/SQL records
vi. Concatenation operators
vii. Query

Q: 2: What are composite data types? How to create PLSQL record, tables and their methods? Explain with examples.

Q: 3: What do you mean by database programming? Explain Relational database and describe the role of DBMS along with its advantages.

Q: 4: What is meant by index? Write types of index? Also discuss in details requirements for index.

Q: 5: What do you mean by loops? Briefly discuss Basic, while and for loop in PLSQL with the help of at least two examples each.

Q: 6 What is cursor? Describe its types. How you will implement for loop in cursors.

Q: 7: Write short notes on any two of the following:
a. Privileges
b. Benefits of PL/SQL
c. Blocks in PL/SQL

Guess Paper 2:Database Programming Spring – 2020 Past Papers

Time Allowed: 3 hours

Total Marks:    70, Passing Marks (35)

Q1: Choose appropriate answer from the choices given below.
i. You can add a row using SQL in a database with which of the following?
a) ADD b) CREATE c) INSERT d) MAKE
ii. The command to remove rows from a table ‘CUSTOMER’ is
a) Remove from customer … b) drop from customer … c) delete from customer where …
d) Update from customer
iii. Which of the following is the original purpose of SQL?
a) To specify the syntax and semantics of SQL data definition language..
b) To specify the syntax and semantics of SQL manipulation language..
c) To define the data structures
d) All of the above.
iv. The command to eliminate a table from a database is:
a) REMOVE table customer; b) DROP table customer; c) DELETE table customer;
d) UPDATE table customer
v. The SQL command to create a table is:
a) MAKE TABLE. b) ALTER TABLE c) DEFINE TABLE. d) CREATE TABLE
vi. The DROP TABLE statement:
a) deletes the table structure only. b) deletes the table structure along with the table data.
c) Works whether or not referential integrity constraints would be violated.
d) is not an SQL statement.
vii. Which of the following is the correct order of keywords for SQL SELECT statements?
a) SELECT, FROM, WHERE.. b) FROM, WHERE, SELECT,,,
c) WHERE, FROM, SELECT.. d) SELECT,WHERE, FROM

Q2: What do you mean by database programming? Explain Relational database and describe the role of DBMS along with its advantages.

Q3: Explain the Character, Numeric, Datetime & Rowid Data Types in details with examples.

Q4: Write commands for the following:
i. Creation of table using a sub-query
ii. Alteration of table (add, modify) a column
iii. Dropping a table
iv. Selection of data from table
v. Eliminating rows and column from a table
vi. Changing the name of the object
vii. Comments in the tables

Q5: Explain the following terms:
i. Data types
ii. Table structure
iii. Privileges
iv. Operator types in oracle
v. PL/SQL records
vi. Field and table
vii. Schema objects

Q6: a) What is cursor? Describe its types. And briefly discuss its structure in details.
b) How for and while loop can be used in PL/SQL?

Q7: Write short notes on any two of the following:
a. If statements
b. Logical and Boolean conditions
c. Benefits of PL/SQL

Prof. Fazal Rehman Shamil