Preview

CSC424 Exam 1

Satisfactory Essays
Open Document
Open Document
856 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
CSC424 Exam 1
CSC 424 Introduction to Database March 27, 2012
Prof Emile C. Chi 1st Exam

NAME______

1) (30 points) Let R (A, B, C, D, E) be a relations with attributes A, B, C, D, E. Let F be the set of functional dependencies: A -> B,C C,D -> E B -> D E -> A
a) Compute the closure F+ of F. Give a reason for each dependency in F+

Closure for F+:
A+= (A,B,C,D,E)
BC+ = (A,B,C,D,E)
CD+ = (A,B,C,D,E)
E+ = (A,B,C,D,E)

b) Draw an E-R diagram for R.
c) Is R in BCNF? Give a reason for your answer.
R is in BCNF because every attribute in R is a candidate key

2) (30 points) Consider the following relational database for a bank: These are the relations in the database.
Branch (branch_name, branch_city, assets)
Customer (customer_id, customer_name, customer_street, customer_city)
Loan (loan_number, branch_name, amount)
Borrower(customer_id, loan_number)
Account (account_number, branch_name, balance)
Depositor (customer_id, account_number)

a) Write the SQL required to create this database. The primary keys of each relation are underlined.

CREATE TABLE `Account` ( `account_number` int, `branch_name` varchar(255), `balance` double, PRIMARY KEY (`account_number`)
);

CREATE TABLE `Borrower` ( `customer_id` int, `loan_number` int, PRIMARY KEY (`customer_id`,`loan_number`)
);

CREATE TABLE `Branch` ( `branch_name` varchar(255), `branch_city` varchar(255), `assets` varchar(255), PRIMARY KEY (`branch_name`)
);

CREATE TABLE `Customer` ( `customer_id` int, `customer_name` varchar(255), `customer_street` varchar(255), `customer_city` varchar(255), PRIMARY KEY (`customer_id`)
);

CREATE TABLE `Depositor` ( `customer_id` int, `account_number` int, PRIMARY KEY (`customer_id`,`account_number`)
);

CREATE TABLE `Loan` ( `loan_number` int, `branch_name` varchar(255), `amount` double, PRIMARY KEY (`loan_number`)
);

b) Write the SQL required to answer these queries to the database:

Find the id’s and

You May Also Find These Documents Helpful

  • Satisfactory Essays

    MUS 354 exam 2 c

    • 1247 Words
    • 9 Pages

    In April of 1979, a U.S. court finds the Beatle 's former manager _________ guilty of tax evasion and he is sentenced to serve two months of a two-year sentence in prison.…

    • 1247 Words
    • 9 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Agec 424 Final Exam

    • 2763 Words
    • 12 Pages

    You must show logically correct work, including calculator inputs and outputs for all problems to receive credit. Show signs on calculator inputs. Differentiate calculator outputs from inputs.…

    • 2763 Words
    • 12 Pages
    Satisfactory Essays
  • Good Essays

    Sample Exam 324 3

    • 2435 Words
    • 20 Pages

    The following data for ABC Ltd pertain to the production of 3,000 skate gaurds during April.…

    • 2435 Words
    • 20 Pages
    Good Essays
  • Satisfactory Essays

    BSOP 429 Midterm Exam 1

    • 375 Words
    • 2 Pages

    8. (TCO 5) The amount of time covered by the basic MRP record is called the _____.…

    • 375 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The Orders table is related to the Customers, Shippers, Orders Status, Orders Tax Status, Order Details, Invoices, Inventory Transactions, and Employees tables.…

    • 314 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    ACC 423 Final Exam

    • 2088 Words
    • 9 Pages

    Woolford Inc. declared a cash dividend of $1.37 par share on its 2.49 million outstanding shares. The dividend was declared on August 1, payable on September 9 to all stockholders of record on August 15. Prepare the journal entries necessary on those three dates. ( If no entry is required , enter no entry as the description and 0 as the amount)…

    • 2088 Words
    • 9 Pages
    Satisfactory Essays
  • Good Essays

    Astr 100 Exam 2

    • 822 Words
    • 4 Pages

    * nearly all the moons in the solar system, including Earth’s moon, orbit around their planets counterclockwise…

    • 822 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    • Define relational database architecture. Consider Microsoft® Access*', Microsoft SQL Server®', Oracle®, IBM DB2®, and so on.…

    • 352 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    COM 100 Exam 1

    • 1961 Words
    • 9 Pages

    You will have 60 minutes to complete the exam from the time it is distributed. You will have ample time to read each test item carefully and respond to each test item thoughtfully. Test items are not intended to be tricky, but rather to assess the depth of your understanding.…

    • 1961 Words
    • 9 Pages
    Powerful Essays
  • Powerful Essays

    Btec

    • 1256 Words
    • 6 Pages

    Deadlines: If you do not meet the deadlines for handing in your assignments you may not have your work marked. This could result in you failing the course unless there are exceptional circumstances which must be explained to your tutor and agreed by the Curriculum Manager. Your work should be returned to you marked within 10 working days…

    • 1256 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    A Advertising

    • 1917 Words
    • 11 Pages

    9) Aurora Foods Inc. markets Log Cabin, Mrs. Butterworth's, and Aunt Jemima brands of pancake syrup. Aurora is most likely to use a _____ approach to developing creative strategy for each brand.…

    • 1917 Words
    • 11 Pages
    Satisfactory Essays
  • Good Essays

    If you feel confident, please change the answers to what you think is right, otherwise,…

    • 775 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Mus 354 Exam 1

    • 1674 Words
    • 7 Pages

    o detail – they spent time to make it work out (whenever they want it to be)…

    • 1674 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Case Study

    • 422 Words
    • 2 Pages

    Study your answer to Question 1. Verify that the relations you say represent the MyBroadway database are in third normal form. If they are not, change them so that they are?…

    • 422 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    MUS 354 exam 2

    • 1289 Words
    • 9 Pages

    __________ opens the George Harrison album, and has medium tempo and almost dance-like groove, featuring Pop-oriented lyrics and Eric Clapton's guitar on the intro.…

    • 1289 Words
    • 9 Pages
    Satisfactory Essays