Comp2016 Data Management Demonstration Instructions Demo 2016

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 3

Comp2016 Data Management Demonstration Instructions
Please follow the instructions below to prepare the demo (each demo will be given 10
minutes).
1. Hand in a hard-copy paper that describes the definitions of the tables in your
database.
2. Use the following command to list the tables:
select table_name from user_tables;
3. Add some student, book and borrow data into the database (some sample data are
shown below, yet your tables may not follow exactly the structures below)
insert into table_name values(…);
Student-number
Name
Gender
Department
12345678
A
M
Comp
11111111
B
M
Math
22222222
C
F
COMM
33333333
D
F
COMM
44444444
E
M
Comp
55555555
F
M
COMM
66666666
G
F
Math
77777777
H
M
Comp
If your table doesn’t have field “Book-number”, you can consider the values in
this field as ISBN
Book-number
ISBN
Tittle
Author
Location
A0000
0-306-40615-1
AA
XX
S1E01
B0000
0-306-40615-2
BB
YY
S2E02
C1111
0-306-40615-3
CC
ZZ
D1E11
B0001
0-306-40615-4
DD
UU
G1E00
A1111
0-306-40615-5
EE
VV
B1E00
D0101
0-306-40615-6
FF
WW
B2E11
E0000
0-306-40615-7
GG
PP
X0E22
E0100
0-306-40615-8
HH
QQ
X0E21
E0111
0-306-40615-9
II
RR
X0E44
Borrower
Book
Borrow date
Due date
11111111
A0000
30/Mar/2016
27/Apr/2016
22222222
B0000
15/Mar/2016
26/Apr/2016
33333333
A0000
26/Mar/2016
23/Apr/2016
11111111
B0000
15/Mar/2016
26/Apr/2016
44444444
C1111
18/Mar/2016
29/Apr/2016
Comp2016 Data Management Demonstration Instructions
44444444
B0001
10/Apr/2016
8/May/2016
44444444
A0000
25/Mar/2016
22/Apr/2016
33333333
C1111
25/Mar/2016
22/Apr/2016
44444444
D0101
26/Mar/2016
23/Apr/2016
44444444
A1111
27/Mar/2016
24/Apr/2016
55555555
A1111
15/Mar/2016
12/Apr/2016
55555555
C1111
25/Mar/2016
22/Apr/2016
11111111
E0000
18/Mar/2016
15/Apr/2016
33333333
A1111
25/Mar/2016
22/Apr/2016
33333333
B0001
25/Mar/2016
22/Apr/2016
33333333
D0101
28/Mar/2016
25/Apr/2016
11111111
D0101
04/Mar/2016
01/Apr/2016
22222222
E0111
26/Mar/2016
23/Apr/2016
Student-number
Reserved book-number
12345678
A0000
66666666
E0000
Student-number
Renewed book-
number
22222222
B0000
11111111
B0000
44444444
C1111
4. Test the function for searching a book.
5. Test the function for borrowing/returning a book (Assuming today is April 21,
2016):
a) Student “22222222” wants to borrow book “B0001”. Should response like:
“Borrow succeed”. (The amount of B0001 should be updated by trigger)
b) Student “66666666 wants to borrow book “B0000”. Should response like:
“No book available at present.”
c) Student “44444444” wants to borrow book “E0100”. Should response like:
“You have already borrowed 5 books.”
d) Student “55555555” wants to borrow book “D0101”. Should response like:
“You have borrowed book overdue.”
e) Student “11111111” returns book “E0000”. (The amount of E0000 should be
updated by trigger)
f) Student “12345678” wants to borrow book “E0000”. Should response like:
“The book has already been reserved by another student.”
Comp2016 Data Management Demonstration Instructions
g) (Note: the following tests should been put in the end, after the
renew/reserve test) Student “66666666” wants to borrow book “E0000”.
Should response like: Borrow succeed.” Next, Student “77777777” wants to
borrow book “E0000”. Should response like: “No book available at present.”
6. Test the function for renewing a book (Assuming today is April 21, 2016):
a) Student “22222222” wants to renew book “B0000”. Should response like: “The
book has already been renewed”.
b) Student “11111111wants to renew book “D0101”. Should response like:
“You have borrowed book overdue.”
c) Student “12345678” wants to renew book “E0000”. Should response like: “The
book has already been reserved by another student”.
d) Student “44444444” wants to renew book “B0001”. Should response like:
“Please wait until the second half of the borrow period”.
a) Student “33333333” wants to renew book “C1111”. Should response like:
“renew succeed”. (Check the content of renew table)
7. Test the function for reserving a book:
b) Student “22222222” wants to reserve book “C1111. Should response like:
“There is book available, no need to reserve”.
c) Student “44444444” wants to reserve book “A0000”. Should response like:
“You have already borrowed this book”.
d) Student “12345678” wants to reserve book “B0000”. Should response like:
“You have already reserved a book”.
e) Student “77777777” wants to reserve book “B0000”. Should response like:
Reserve succeed”. (Check the content of reserve table)

Navigation menu