Assignment: Database Management Systems
Question One
Compare RAID level 1 and RAID level 5 on the basis of following parameters.
a. Fault Tolerance
b. Performance in terms of read and write operations
c. Suitable application types
Question Two
A file has 40,000 Student records of fixed-length. Consider a disk with block size B=512 bytes. A block pointer is 8 bytes long and a record pointer is 7 bytes long. Each record has the following fields:
Attributes
|
Size (in bytes)
|
StudentID
|
9
|
Name
|
30
|
Sex
|
1
|
CourseMajor
|
10
|
Phone
|
9
|
Address
|
30
|
DoB
|
8
|
Status
|
3
|
a. Calculate the record size R in bytes.
b. Calculate the blocking factor bft and the number of files blocks b assuming an unspanned organization.
c. Suppose the file is ordered by the key field StudentID and we want to construct a primary index on it. Calculate the index blocking factor bft_i.
Question Three
Consider following relational database schema and translate the queries ‘a' and ‘b' into relational algebra expressions
Teacher(ID, Name, Designation, Phone, Address)
Course(CourseCode, CourseName, CreditHour)
Taught(TeacherID, CourseCode, Semester)
a. SELECT Name, Address FROM Teacher, Taught
WHERE Teacher.ID=Taught.TeacherID and CourseCode='IT344'
b. SELECT CourseName FROM Course, Taught
WHERE Course.CourseCode=Taught.CourseCode and TeacherID=200
Question Four
Draw a query tree for the following relational algebra query.
πsid, sname((σage="25"(σbid=bid(B x σsid=sid)S x R))))
where:
S represents Students (sid, sname, age, email)
B represents Books (bid, bname, auther, edition)
R represents Reserves (sid, bid, start day, end day)
Format your assignment according to the following formatting requirements:
1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.
2. The response also include a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.
3. Also Include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.