DBMS - 1
DBMS - 1
occupation.
2. Display details of customer eliminating duplicate
or greater than 10000.
3. Display details of customer whose dubalance is less than 5000
year 1980.
4. Display details of customer born in the
2) Solve
a Write a PLISQL block to accept a number and print sum of digits of that number. [10]
b) Write a PL/SQL block to accept 2 numbers and print table of numbers between range of that
numbers. [10]
a) Commit b)Savepoint
c) Lock d) Rollback
2. Functions that act on a set of values are
called as functions.
a) Single b) Group
c) Scalar d) OneValue
3 To reduce redundant data to the minimum possible, an object is created
called a
a) View b) Index
c) Cluster d) Key
4
Cursor defined by the users are called cursor.
a) Explicit b) Implicit
c) Users d) Public
The clause allows removing duplicates from the result set.
a) Null b) Alternate
c) Distinct d) Remove
2.
State True/False. (5)
1. Business rules that have to be applied to data are completely system dependent.
2. Privileges once given cannot be taken back by the owner of the object.
3. A rollback statement is used to make permanent changes.
4. The table in which the foreign key is defined is called as detail table.
5. The having clause imposes a condition on the Group By clause.
1) Create following table with proper constraints (Enter at least 5 valid records )
Book (Bookno, Bookname, Author, No_Of_Pages, Price )
2) Write a PL/SQL block to accept a number and print reverse of that number.
[151
1) Create following table with proper constraints (Enter at least 5 valid records )
Customer ( Custno, Name, City, Birthdate, Phoneno, Duebalance )
Solve -
[O5)
a) Display name of customer living in Mumbai' or 'Delhi.
b) Add column State' to customer table.
2)Write a PL/SQL block to accept a number and check whether it is positive, negative or zero. [
101
1)Create following table with proper constraints ( Enter at least 5 valid records )
Book ( Bookno, Bookname, Author, No Of _Pages, Price ) [15]
2) Write a PL/SQL block to accept 2 numbers and print table even numbers between
of
that range of that numbers.
[15]
1) Create following table with proper constraints ( Enter at least 5 valid
records ) [15]
Customer ( Custno, Name, City, Birthdate, Phoneno,
Duebalance )
Solve
a) Display Custno, name, city of customer whose duebalance [05]
is less than 5000 or
name starting with S.
b) Display total duebalance.
records) [10]
proper constraints ( Enter at least 5 valid
table with [10]
1)Create following Birthdate, Occupation,
Duebalance )
City,
Customer ( Custno, Name,
Solve
customer whose name starts with “P".
1. Display details of
duebalance.
2. Display total
customer eliminating city.
3. Display details of on 10" November 1980.
customer born
4. Display details of
2) Solve sum odd numbers between that range. [10]
print
a) Write a PL/SQL
block to accept 2 numbers and using max)
numbers and print maximum number. (without
to accept 3
b) Write a PL/SQL block [10]
function ).
) [10]
table with proper constraints (Enter at least 5 valid records
1) Create following )
Empid, Ename, Salary, Joindate, Deptname, Commission
Employee ( [10]
Solve
of employee getting commission.
1. Display details ename.
Display details of employee in descending order of
2. greater than15000.
ename, salary of employee whose salary is
3. Display empid,
customer join in the month of June'.
4. Display details of
2) Solve Without using length)
a) Write a PL/SQL block to
accept a string and print length of string. (
[10]
function ). without using min)
to accept 3 numbers and print minimum number. (
b) Write a PL/SQL block [10]
function).