Write functional dependencies for the following relational schema:
account (account_number, customer_name, branch_name, branch_city, assets)
account_number -> customer_name
branch_name -> branch_city
account_number -> assets
Write functional dependencies for the following relational schema: account (account_number, customer_name, branch_name, branch_city, assets)
2. Considering the following schema of a bank database, Branch (branch_name, branch_city, assets) customer (customer_name, customer_street, customer_city) loan (loan number, branch_name, amount) borrower (customer_name, loan_number) account (account_number, branch_name, balance) depositor (customer_name, account_number) (a) Identify the candidate keys and the primary key of each relation. [15 points] (b) Draw a schema diagram for the database. Make sure to underline the primary keys. [15 points] (c) Considering the schema above, write relational expressions for the following sentences [15 points] Find all customers...
1. Given the following BANKING database, formulate a Relational Algebra expression for each of the following questions. SELECT should be performed before any JOIN operation. Notation: use the symbol S for SELECT, P for PROJECT, J for INNER JOIN, * for NATURAL JOIN, LJ for LEFT JOIN, RJ for RIGHT JOIN, R for RENAME, and F for FUNCTION. Please type your answer; hand-writing is not accepted. branch(branch_name, branch_city, assets) customer (customer_name, customer_street, customer_city) loan (loan_number, branch_name, amount) borrower (customer_name, loan_number)...
DATABASE NORMALIZATION Answer the following questions for this relational schema and functional dependencies: R (A, B, C, D, E, F, G, H, I) A -> C ; C -> D ; A,C -> D B -> E,F ; A,B -> G ; G -> H,I ; A,G -> I List all candidate keys of R. (2 marks) Does the functional dependency A,C -> I hold? (1 mark) Does the functional dependency B -> F hold? (1 mark) Normalize R into...
Write the complete proof.
Consider the relational schemas given below and the respective sets of functional dependencies valid in the schemas For each one of the relational schemas, determine the highest normal form, which is valid for a schema. Justify your answer If a schema is not in BCNF, then decompose it into a minimum number of schemas so that each one of them is in BCNF. Justify your answers. Justification must include the derivations of minimal keys from the...
Consider a relational schema R(A, B, C, D) with a set of functional dependencies F = { D --> AB, C --> B, CD --> A, AD --> B, B --> A } a. Compute { B, C }+ b. Show that { C, D } is a candidate key of R. c. Is { R1(A, B, C), R2(C, D ) } a lossless-join decomposition? Why? d. Compute a minimal cover Fmin of F.
Discuss the normal forms for a relational database schema. What does functional dependency mean? Given is the relational schema R( A, B, C, D, E ) as well as the functional dependencies • AC → BDE • B → D • A → E. Convert the schema into its 3rd normal form.
Q3: Given a relational schema ? = {?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?} and a set of functional dependencies ? = {? → ? ? ? ?, ? → ? ? ?, ? → ?, ? ? → ?} and a key(R) = AI 1. Is R in BCNF? If yes, justify your answer. 2. If no, explain why and decompose R for two levels only. 3. Check whether the decomposition in step 2 dependency...
Q2: Explain with example the difference between super keys and functional dependencies in relational databases. Show how to find a key (super/candidate) for the following functional dependencies: ? = {?,?,?,?,?,?,?,?,?,?,?,?,?} ? = {?→????,?→???,?→?,??→?,??→?}
Q3: Given a relational schema R = {A,B,C,D,E,F,G,H,1,J,K} and a set of functional dependencies F {A B C D E, E F G H I J,AI →K} and a key(R) = AI = 1. Is R in BCNF? If yes, justify your answer [5 points] 2. If no, explain why and decompose R for two levels only [10 points] 3. Check whether the decomposition in step 2 dependency preserved or not [5 points]
MySQL: Consider the following abstract relational schema: (A, B, C, D, E, F) Now assume the following functional dependencies: A -> B, C, D, E, F C -> B Note: This implies that A is a key. Is this database in 1NF, 2NF, 3NF, or BCNF? Why?