{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

INFO210_HW5_Solution

INFO210_HW5_Solution - INFO 210 Database Management Systems...

Info icon This preview shows pages 1–5. 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 indicating 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 ____________________
Image of page 1

Info icon This 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
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. Solution: There are lots of different options here, some of which are listed below. Importantly, if you give two solutions that differ only in the order in which columns are listed – these do not qualify as different solutions. create table R ( A number, B number primary key , C number ); create table R ( A number, B number , C number primary key ); create table R ( A number not null, B number primary key , C number unique ); create table R ( A number, B number primary key , C number unique not null ); A B C 1 11 106 1 22 105 3 33 104 3 44 103 5 55 102 5 66 101
Image of page 3

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

View Full Document Right Arrow Icon
Part 2 (20 points): Entity-­‐relationship modeling (a) Consider create table statements below. Draw and ER diagram from which these create table statements could have been derived. Be sure to mark any key and participation constraints.
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern