Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
CSCI235 Spring 2010 Assignments - Security

CSCI235 Spring 2010 Assignments - Security

Ratings: (0)|Views: 644 |Likes:
Published by technofreak9
PLSQL Codes for Database Security
PLSQL Codes for Database Security

More info:

Categories:Types, School Work
Published by: technofreak9 on May 25, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/01/2012

pdf

text

original

 
University Of Wollongong, Dubai Campus
CSCI235 – Databases
Assignment 2
Date of submission:
Thursday 5 pm-Week 13.
Note:
1)This assignment is a group work of no more than two students.2)Detection of plagiarism or copying of work will lead to severe penalty.
NormalizationObjectives:
The objective of this assignment is to normalize the given conceptual database schema.
[2.5 marks]
1-Consider the following collection of relations and dependencies. Assume that eachrelation is obtained through decomposition from a relation with attributesABCDEFGHI and that all the known dependencies over relation ABCDEFGHI are listedfor each question.a.state the strongest normal form that the relation is in (1NF, 2NF, 3NF andBCNF)b.If it is not in BCNF, decompose it into a collection of BCNF relations.R1(A,C,B,D,E), A
B, C
DAnswer:It is 1NFThe BCNF decomposition is: (A,B) (C,D) and (A,C,E)
2-
Suppose you are given a relation R with four attributes ABCD. For each of thefollowing sets of FDs, assuming those are the only dependencies that hold for R. Dothe following: [7.5 marks 2.5 marks each]a.Identify the candidate key(s) for Rb.Identify the best normal form that R satisfies (1NF, 2NF, 3NF, BCNF)c.If R is not in BCNF, decompose it into a set of BCNF relations that preservesthe dependencies.
I.
C
D, C
A, B
CCandidate key(B)2NF(A,C,D) and C
D, C
A BCNF(B,C) and B
C BCNF
 
II.
ABC
D, D
AKey(ABC), 3NF and it is not possible to make it BCNF
III.
AB
C, AB
D, C
A, D
BCandidate Key(AB, BC, AD, CD) 3NF but can not be BCNF
3-
Consider the attribute set R= ABCDEGH and the following FD set: [10 marks, 2.5each]F= { AB
C, AC
B, AD
E, B
D, BC
A, E
G}a)Name the strongest normal form that each relation satisfies. Decompose it into acollection of BCNF relations if it is not in BCNF.I.ABCDAB
C, AC
B, B
D, BC
A1NF(A,B,C) and AB
C, AC
B, BC
A (candidate keys(AB, AC, BC) BCNF(B,D) and B
D, (candidate keys(B)) BCNFII.DCEGHE
G1NF(D,C,H,E) BCNF key(D,C,H,E)(E,G) E
G, key(E) BCNFIII.ACEHNo dependency so, key(A,C,E,H)BCNFb)which of the following decompositions of R=ABCDEG with the same set of dependencies F, is a) dependency –preserving b) lossless-join?{AB, BC, ABDE, EG} {AB , BC, ABDE (AD
E, B
D), , EG (E
G )}This decomposition is not lossless becauseThis dependency AB
C tells us that value of C depends ob both A and B but in table BCwe only have B, so we do not have a complete foreign key to BC from AB or ABDEor dependency preserving because:the dependencies AB
C, AC
B, BC
A, are not part of any tables.
 
Transaction Management:
Objectives:
The objective of this assignment is to practice assigning isolation levels to controlconcurrency in database transactions. [10 marks, 2.5 each]
Consider the university enrollment database schema:Student(
 snum:
integer,
 sname:
string,
major:
string,
level:
string,
age:
integer)Class(
name:
string,
meets at:
time,
room:
string,
 fid:
integer)Enrolled(
 snum:
integer,
cname:
string)Faculty(
 fid 
: integer,
 fname:
string,
deptid:
integer)The meaning of these relations is straightforward; for example, Enrolled has one record per student-class pair such that the student is enrolled in the class.For each of the following transactions, state the SQL isolation level you would use andexplain why you chose it.1. Enroll a student identified by her 
 snum
into the class named ’Introduction toDatabase Systems’.Read committed (because it is lowest isolation level which is not read only)2. Change enrollment for a student identified by her 
 snum
from one class to another class.Read committed if no other insert into enrollment is happening or SERIALIZABLE. To prevent inserting the same snum and the same course into the table.3. Assign a new faculty member identified by his
 fid 
to the class with the least number of students.SERIALIZABLE4. For each class, show the number of students enrolled in the class.Read uncommitted because we are just looking for a sum in all classes.But in order to make the sums accurate, it has to be SERIALIZABLE

Activity (5)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
hitk liked this
gvraju123 liked this
Nery เนย liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->