INFO210_HW5_Solution

INFO210_HW5_Solution - INFO 210 Database Management Systems...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
INFO 210, Database Management Systems Winter’ 2013’ Homework 5: Review Due’ Thursday,’ March’ 12 th ,’2013 ’ at’ 3:30pm’ SOLUTION This’homework’is’optional,’and’contains’review’material’for’the’quarter.’To’receive’credit’ for’this’assignment,’you’must’submit’it’in ’ hard’copy’at’the’start’of’class’on’Tuesday,’March’ 12 th .’No’extra’credit’points’will’be’given’if’this’assignment’is’submitted’late.’If’you’decide’ to’submit’this’assignment’for’credit’ –’ you’will’be’able’to’add’up’to’5%’to’your’over -all’ course’grade.’The’exact’percentage’will’be’determined’based’on’your’ actual’score’for’this’ homework.’ Submission instructions This’homework’is’to’be’submitted’in’hard’copy’at’the’start’of’class’on’Tuesday,’March’12 th .’ This’assignment’is’to’be’completed’individually.’’Please’consult’the’course’syllabus’for’a’ description’ of’ our’ plagiarism’ policy.’ ’ You’ must’ sign’ and’ attach’ the’ following ’ statement’ when’submitting’your’assignment. I certify that: This’assignment’is’entirely’my’own’work; I’have’not’quoted’the’words’of’any’other’person’from’a’printed’source’or’a’website’ without’indic ating’what’has’been’quoted’and’providing’an’appropriate’citation; I’have’not’submitted’this’assignment’to’satisfy’the’requirements’of’any’other’ course.’ Signature__________________________’ Date’ ’ ’ ’ ’ ’ ’ ____________________’ ’
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Part 1 (15 points): The relational model (a) Consider the create table statements below. What are the candidate keys of this relation? create table R ( A number primary key, B number , C number, D number, unique (B, C), unique (B, D) ); Solution : There are 3 candidate keys. Key1 = {A}, Key2 = {B, C}, Key 3 = {B, D} (b) Consider now an instance of the relation R in (a). Is this a valid instance? Briefly justify your answer. Solution : Yes, this is a valid instance. The first candidate key requires that all values in column A be unique, and this is the case. The second candidate key requires that all combinations of values in columns B and C be unique, and this also holds. This is because, while all values in column C are the same (C=5 in all tuples), the values in B are all different from each other. A similar argument as for {B, C} can be made about the third candidate key, {B, D}. A B C D 1 11 5 5 2 22 5 5 3 33 5 5 4 44 5 5 5 55 5 5 6 66 5 5
Background image of page 2
(c) Consider an instance of relation S below. Give two different create table statements for which this would be a valid instance.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 17

INFO210_HW5_Solution - INFO 210 Database Management Systems...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online