• Tidak ada hasil yang ditemukan

CIS 401 - DATABASE MANAGEMENT AND DESIGN OCT-NOV 1996.

N/A
N/A
Protected

Academic year: 2024

Membagikan "CIS 401 - DATABASE MANAGEMENT AND DESIGN OCT-NOV 1996."

Copied!
5
0
0

Teks penuh

(1)

UNIVERSITI

SAINS

MALAYSIA

First Semester Examination Academic Session 1996197 October/November 1996

CIS4OI - Database Management and Design Duration :

[3 hours]

INSTRUCTION TO CANDIDATE.

.

Please ensure

that

thi.s

examination

paper contains

EIGHT

questions

in FIVE

printed pages befbre you start the examination.

.

Answer

ALL questions. If

you choose to answer the questions

in

English, at least one question must tre answeted in Bahasa Malay.sia.

ENGLISH

VERSION OF

THE

QUESTION PAPER

6l.

(2)

lclS40ll

-2-

(a)

For each

of

the

tollowing, write

SQL statements to create views where needed and to grant the indicated plivileges for the university database:

STUDENT(STUDID, STUNAME,

MAJOR, CREDITS)

FACULTY(FACID,

FSCNAME, DEPT,

RANK)

CLASS(COURSE#,

FACID,

SCHED,

RQOM)

ENROLL(COURSE#, STUID,

GRADE)

(i)

Give permission to read the tables STUDENT and CLASS to user

Ul.

The user may also read ENROLL, but without the

GRADE

attribute.

(ii) Givc

pcrmis.sion to read ancl

modity

the tables

FACULTY

and

CLASS

to uscr U2. This user may authorize user

U3

to read and

modify

CLASS, but

NOt

FACULTY.

(iii) Give

permission

to

read and

modify

the tables

STUDENT, CLASS,

and

ENROLL

to user U4. This user may authorize users U5 to read these tables and to gmnr this right to orher

users.

(50/1m)

(b)

Descdhe, by u.sing an example, a simple and polyalphabetic encryption method.

(s0/rm)

2. (a)

Explain what a dornain constraint is and list the most popular domain constraints'

(40/lm)

(b) Detine the lollowing

database

with

the use

of domain

constraints and

entity

integrity constrain Ls:

customer(cu.stom9[-name, street, customer-city), hranch(branch-name, assets, hranch-city),

deposit(blanch-name, account-number, customer-name, amount) borrow(branch-name, loan-number, customer-name, amount)

(30/lm)

(c) Write a^s.scrtions stating that:

(i)

halance amount i.s not less than zero;

(ii)

loan amount is not grcater thnn

lffX);

(iii)

a customer namc exi.sting

in

the deposit

relation exists in

the relation. too.

customer

(30/1fiD

62

...3t-

(3)

[cIS40l]

-3-

3.

Consider the

tollowing

two tran.sactions:

T1:

read(A);

read(B);

B

:=

A+B;

write(B);

T2:

read(B);

read(A);

A:=A+B;

wdte(A);

(a) Add

lock and unlock instructions to transactions

Tl

and

T2

so that thcy observe

the two-phase locking Protocol.

(30/100)

(b) Write

a schedulc

lor

thcse transactions,

*hich

procluces a deadlock.

(30/1fiD

(c) Write

a serializablc time-stamp

protocol for

these transactions, indicate time- stamp values lor each reacvwrite

operation.

(40/lfiD

4. (a)

Assume a sysrem having a

log with

immediate updates has the

following log

entries, ending

with

a sy.stem crash:

<R,

hegin>

<R. X. l,

5>

<R, Y, -1,

O>

<R, c<lmmit>

<S, begin>

<s, z, 8,

12>

<Checkpoint record>

<s. x, 5, lo>

<T,

start>

<T, Y, 0,

15>

<S. commit>

system crash

---

(i)

Which transactions,

if

any, need to be redone'?

(ii)

Which transaction.s,

il'any,

need to be undone'l

(iii)

Which transactions,

il'any,

arc not aft'ected by the crash?

(r0/lffD (10/rfiD (r0lrm)

...4t-

(4)

4-

(b)

Now assume the sy.stem uscs an incremental log with det'ened

(i)

Rewrite the log entrie.s

for

the transactions

in

Exercise method.

lcrs4oll

updates:

I for

this logging

(40/rm) (10/lm) (r0/lfiD

(10/1m)

5. (a) Model a relcvant part ol'a university administration. In particular, apply

the abstraction conccpts

of

aggregation

-

e.g., students

enrolling in

cout'.ses being

taught by particular prol'essors - and generalization with the following- specializition hieralchy:

.students and

university

.staff are a

specialization of

persor"rs ancl prolessors and secretaries are a specialization

of university

staff;

indicato thc.clationship.s

"is-n" and"pert-of'

(5UI(XD

(ii) Which

transactions,

il'any,

need to be redone aller the failure?

(iii)

Which transactions,

if

any, need to be undone atier the tailure?

(iv)

Which transactions,

if

any, arc not affected by the cra-sh?

(b) List

and explain main l-eaturcs of an obiect-oriented model.

6.

(a)

Describe the object

typo

del'inition deflnition .section.

(50/1ffD

liame, indicating

the purpose

ol'each

type

(30/lm)

(b) Design an

ob.iect-oriented

tourist

database

storing data

about

cities,

hotels,

.monumenls. and restaurants

in

the

tollowing

way:

a hotel is clraracterized by nntn.e, runk (stars), set of

free

roo,n. num.bers, set of gue,str which is a set pairs <person-nalne, room

numbet>,

and operations

oi

re,serving a room. tbr a particular guest and checkinS-out;

a

city

is characterized by notn,e, ,set o.f .rtreets, Set o.f hotels, and operations

of

creating u new hotel and.findirtg, rooms ol'needed raulk;

a

llrellglllgtr!

is characterized by name, adtlre.s'r, adtnissitttt.fee. andstati,ttics about visitors:

a rcstaurant is charactetiz,ed by

citl',

1'ono (star's), and mertu'r;

a

tourist city is

regarded as a special

kind of city

and

is

characterized' in

addition, by a set ef

m.onu.ment.s and

an operation'of crea.ting a

new m0nu.ment.

Operation implementations may be omitted.

(70/1fi))

...51-

64

(5)

7.

(a)

(b)

lcIS40ll

-5-

Give a

dellnition

and descdbe ditTerent kinds of persistence.

(3U1ff))

Declare and implement operations and bodies

of

an obiect type

"complex" with

the

tbllowing

operatiort:

.

initializer Complcx creating a complex number using two float numbers;

.

get thc real palt of a complex number;

.

get the imaginary

pfft

ol: a complex number;

.

add a complex numher to a given complex number;

.

subtract complex numher from a given complex number;

.

comparc two complex numberc for equality.

(70lrm)

8. (a)

Consider the rclation that is l'ragmented hodzontally by plant-number:

EMPLOYEE (NAME,

ADDRESS,

SALARY, PLANT-NUMBER)

Assume each lragmsnt has two replicas, one stored at the New

Yor*

site and one stored

locally at the plant site.

Describe

a good

processing strategy

for

the

tbllowing

queries entcred at the San Jose site:

(i)

Find all cmployee.s at the Boca plant.

(ii) Find the

highest-paid employee at each

of

the Montreal.

(iii)

Find the lowest-paid employcc in the company.

(b)

Desclihe thc purposc and tcchnique of the vertical datahase system

(20l1(X))

lbllowing

sites Toronto,

(20l1ff))

(20llm)

ti'agmentation

in

a distributed

(40/1m)

- oooOooo -

65

Referensi

Dokumen terkait

This thesis is about designing a high performance and structured database system for BiNus Mobile Service System and documenting the whole process in order to obtain a bachelor

Every time we input a new record into the users table, we've got to duplicate all that company and user name data?. Not only will our database grow much larger than we'd ever want

Object-relational database systems (that is, database systems based on the object-relational model) pro- vide a convenient migration path for users of relational databases who wish

For instance, we want the title of each book to be included in the database, so we include a Title attribute for the Books entity class!. • Attributes are used to help

Database systems: a practical approach to design, implementation, and management (5th Edition ed.).. Pearson Higher

Conclusion In this paper, we discussed the problem of content integrity checking for ubiquities database accessing and recommended a new fragile watermarking scheme to handle this

So that training is needed to create digital content for Instagram using Canva and Adobe Illustrator to increase the skills of The solution needed for this problem is provision of

For example, Participants 13 and 14 indicated; “Yes, that kind of facilities need to be provided to create a more productive and quality work.” P13 “Yes, it is needed so that the