You are on page 1of 2

A STUDENT LIBRARY SCENARIO

SCHEMA

Student(Stud_no : Number, Stud_name: Varchar, Dept: Varchar)


Membership(Mem_no: Number, Stud_no: Number, Fine: Number)
Book(book_no: Number, book_name: Varchar, author: Varchar, Category: Varchar)
Iss_rec(iss_no: Number, iss_date: date, Mem_no: Number, book_no: Number)

DATASET

Stud_No Stud_Name Dept Mem_n Stud_no


UR20CS110 ABHILA CSE o
UR20CS111 KARTHICK CSE 15675 UR20CS110
UR20ME112 GOWRI MECH 15676 UR20CS111
UR20CE113 RESHMA CIVIL 15677 UR20CS112
UR20CS114 SHANKAR CSE 15678 UR20CS113
UR20CS115 SHALMAN CSE 15679 UR20CS114

Book Book Author Pric Category


Numbe Name e
r
978452 Head First Cathy 450 Program
Java Siera ming
978453 Database Silbersc 500 Computer
Systems hatz
978454 Operating Silbersc 500 Computer
Systems hatz
978455 Software Fenton 350 Software Ex.1 CREATING AND
Metrics engineeri MANAGING TABLES
ng  Create the table using
978456 Digital Morris 250 Electroni DDL
Design Mano cs  Maning the table
978457 Hadoop Tom 600 Cloud using DML
White  Data Control using
DCL
 Authorization using TCL
Iss_ Iss_dat Mem_ Book_No Fine
No e No Lab Exercise
165 12- 15677 978453 50
1. For the student library schema
Apr-14
create the tables with appropriate
166 18-Jun- 15678 978454 50
integrity constraints and describe the
14
structure of the tables.
167 29-Sep- 15679 978455 25
2. Change the datatype of the Student
14
number attribute to Varchar.
168 1-Oct- 15677 978456 0
14
169 6-Nov- 15676 978457 0
14
3. Ensure by adding appropriate constraints the author column of the book table is a
valid input(Not Null).
4. Avoid the redundant entry for the book number by adding appropriate constraint to
the column.
5. Remove the author column in the Book table.
6. Add the author column in the book table.
7. Populate 5 records for each table.
8. Show the student names with their membership numbers.
9. Show the issues for the current date with student and Book names.
10. Create a new user LIBMAN.
11. Give insert, delete and update priviliges to the LIBMAN user.
12. Revoke the privileges from the LIBMAN user.
13. Change the issue date to current date where the issue number is 15678
14. Remove the records for the issues made in the current date.
15. Experiment how the transaction is recovered using rollback.

You might also like