quiz2_EO_with_key

quiz2_EO_with_key - CS4400 Spring 2008 QUIZ 2 Refer to the...

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

View Full Document Right Arrow Icon
CS4400 – Spring 2008 QUIZ 2 Refer to the following relational schema and the current state of the relations for appropriate questions in this quiz. Primary keys are underlined. Customer (CID , Cname, City) Account (AID , Balance, Type, Limit) CustomerAccount (CID, AID ) TransactionHistory (AID, Date , Amount, Trans_Type ) AID is account ID CID is a foreign key in CustomerAccount referencing the Customer relation AID is a foreign key in CustomerAccount referencing the Account relation AID is a foreign key in TransactionHistory referencing the Account relation Primary keys are underlined Limit is an overdraft limit for the account (you can overdraw account upto that limit) Customer Account CID Cname City AID Balance Type Limit 101 John Smith Marietta 102 Jane Doe Marietta 103 Bob Jones Atlanta 104 Jim Brown Atlanta 105 Sue Brown Atlanta 106 Ash Patel Alpharetta CustomerAccount TransactionHistory CID AID AID Date Amount Trans_Type 101 1 101 3 102 4 103 2 103 5 104 6 105 6 Spring 08- Quiz 2 Page 1 1 1000 Saving 20000 2 5000 Saving 10000 3 100 Saving 0 4 50 Checking 5000 5 2000 Checking 0 6 2000 Checking 25000
Background image of page 1

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

View Full DocumentRight Arrow Icon
FIGURE 1. A Set of Relations in a bank Spring 08- Quiz 2 Page 2 1 2007-06-02 18000 Withdraw 2 2007-06-04 5000 Deposit 4 2007-06-11 100 Deposit 3 2007-06-12 10000 Deposit 3 2007-06-12 6000 Withdraw 5 2007-06-12 50 Withdraw 5 2007-06-15 100 Deposit
Background image of page 2
NAME (LAST, FIRST)______________________________________ GT_ID____________________________________________ CS4400 – Spring 2008 QUIZ 2 1. A relation schema may have (a) no key at all (b) multiple primary keys (c) multiple candidate keys (d) multiple superkeys (e) both (c) and (d) 2. True or false?- According to the schema in Figure 1, only one transaction of a given type occurs on a specific date for any given account. ( a) True (b) False 3. Trans_type in the relation TransactionHistory is a) An attribute that takes atomic values b) A component of a primary key c) A foreign key d ) Both (a) and (b) 4. Which of the following statements are true for the relations in Figure 1? (a) a tuple in the CustomerAccount relation cannot have a null value for AID
Background image of page 3

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

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

This note was uploaded on 05/29/2009 for the course CS 4400 taught by Professor Marks during the Spring '07 term at Georgia Tech.

Page1 / 7

quiz2_EO_with_key - CS4400 Spring 2008 QUIZ 2 Refer to the...

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