Suppose that we pick the following four tuples from a legal relation S (S has 100 tuples in total). S has the following schema:
(A: integer, B: integer, C: integer)
The four tuples are: (1,2,3), (4,2,3), (5,3,3) and (5,3,4).
Which of the following functional (→)can you infer does not hold over relation S?
a. A → B
b. BC → A
c. A → C
d. AC → B
Suppose that we pick the following four tuples from a legal relation S (S has 100...
Suppose: Relation S(B,C,D) has the following tuples: 68 79 Which of the following tuples is NOT in the result of the following query: SELECT Sum( BC) ASSUM, Max(D) AS MAX FROM S GROUP BY B; O (2,8,6) O (4,52,9) O (4,24,8) None of the above
Suppose relation R(A, B, C) has the following tuples: and relation S(A, B, C) has the following tuples: Compute the intersection of the relations R and S. which of the following tuples is in the result? (2, 5, 4) (1, 2, 6) (2, 2, 6) (2, 5, 3)
Again, suppose we have a relation on attributes A, B, C, D, E, and F, and these functional dependencies hold: S = { B → DE, BF → C, CF → B, DF → AE }. (a) Does it follow from S that B → A? (b) Does it follow from S that CF → E? (c) Does it follow from S that DF → B? (d) Does it follow from S that BD → C? (e) Does it follow...
Question 1 (5 marks) Consider two relations called Item and Orderltem. Imagine that relation Item has 160,000 tuples and Orderltem has 200,000 tuples. Both relations store 100 tuples per a page. Consider the following SQL statement SELECT * FROM Item INNER JOIN OrderItem ON Item.ItemID-OrderItem. ItemID; We wish to evaluate an equijoin between Orderltem and Item, with an equality condition Item.ltemID Orderltem.ItemID. There are 802 buffer pages available in memory for this operation. Both relations are stored as (unsorted) heap...
Suppose we have the following relation (R) that keeps track of car sales: R(car date_sold, salesperson#, comission_rate, discount) In addition to the functional dependency implied by the primary key (car#), assume the following functional dependencies: date_sold discount salesperson commission_rate Explain why this relation is not in Boyce-Codd Normal Form (BCNF). a. b. Show how you would normalize this relation to achieve Boyce-Codd Normal Form by drawing a new relational schema. Highlight all primary keys by underlining them and use arrows...
Language: SQL - Normalization and Functional
Dependencies
Part 4 Normalization and Functional Dependencies Consider the following relation R(A, B, C, D)and functional dependencies F that hold over this relation. F=D → C, A B,A-C Question 4.1 (3 Points) Determine all candidate keys of R Question 4.2 (4 Points) Compute the attribute cover of X-(C, B) according to F Question 43 (5 Points) Compute the canonical cover of F.Show each step of the generation according to the algorithm shown in class....
1)
2) Give formal descriptions (5-tuples) for the DFAs shown in
figure below:
3) Give the state diagrams of DFAs recognizing the following
languages over ? = {0, 1}:
a) LÆ
b) L?
c) {e, 1001}
d) {e, 101, 1001}
e) {w : w has prefix 10}
f) {w : w does not contain the substring
011}
4) Give the state diagrams of DFAs recognizing the following
languages over ? = {0, 1}:
a) {w: |w| ? 5}
b) {w...
QUESTION 10 The equality relationon any set S is: A total ordering and a function with an inverse. An equivalence relation and also function with an inverse. A function with an inverse, and an equivalence relation with as single equivalence class equal to S An equivalence relation and also a total ordering QUESTION 11 A binary operation on a set S, takes any two elements a,b E S and produces another element c e S. Examples of binary operations include...
Suppose there is a small agrarian economy that has four plots of
land. Plot 1 is right next to the river, then plot 2, etc with plot
4 being far away from the river. Suppose the growth rate of corn
does not depend on moisture, so each plot of land can grow 100 tons
of corn. However avocados love wet soil, so plot 1 can grow the
most (400 avocados) and plot 4 can grow the least (100 avocados)
and...
Suppose we have the following demand and supply functions (taken from Ass HOME Demand P 100- 2Q Suppl PhQ FOREIGN Demand P 2002Q Supply P Q 3: Two-country model with import and export tariffs: use the functions above. Suppose the exporter imposes an export tax of $2 per unit and the importer imposes an import tax of $2 per unit b) d) (3 points) Calculate the new equilibrium world price and domestic prices. (7 points) Does the importer gain from...