Question
1. Suppose: table A has columns X and Y. table B has columns Y and Z What is true of the query: SELECT A.X, B.Z
1. Suppose:
table A has columns X and Y.
table B has columns Y and Z
What is true of the query: SELECT A.X, B.Z FROM A, B WHERE A.Y = B.Y ?
a) The result is empty if there is no overlap in the values of column Y of table A and column Y of table B
b) The result has 4 columns
c) The size of the result is the smaller of the sizes (number of rows) of the tables
d) The size of the result is the product of the sizes (number of rows) of the tables
2. A movie may have many actors, and an actor can act in many movies.
A movie may have many animators working on it, and an animator may work on many different movies.
Suppose we try to represent this in our database using a single "Credits" table, with columns movie_id, actor_id and animator_id.
The key of the table is the combination of all 3 attributes.
The attributes are each foreign keys to tables for Movies, Actors and Animators, respectively. What is wrong with this?
a) The table would be too big
b) An actor may play more than one role in the same movie
c) Not all movies have actors
d) Either the actor_id or animator_id field would be null
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started