Professional Documents
Culture Documents
Views Quiz (Variation 2) - Stanford Online
Views Quiz (Variation 2) - Stanford Online
Views Quiz (Variation 2) - Stanford Online
Stanford
Home Course Info University
Course Materials Videos Quizzes Interactive Exercises Exams
Surveys Forum
SQL A view "RichExecNums" containing the license number and net worth of
all executives with a net worth of at least $10,000,000.
A view "Birthdays" containing a list of birthdates (no duplicates)
RELATIONAL
belonging to at least one movie star.
DESIGN THEORY
A view "SameBirthday" containing pairs of movie star names where the
movie stars have the same birthdate.
QUERYING XML
A view "StudioPresInfo" containing the studio name, executive name, and
license number for all executives who are studio presidents.
UNIFIED
MODELING
LANGUAGE
2 of 3
INDEXES
Question 2
TRANSACTIONS Consider the following schema:
Automatic View
Book.year is omitted from the view
Modifications
The condition Book.year > 2000
Materialized
NULL values are not permitted in Book.title
Views
The condition Author.name Like 'A%'
Views Quiz
SQL Movie-
Rating View
Modification
class2go.stanford.edu/db/Winter2013/problemsets/ViewsQuizVariation2 1/2
20/03/13 Views Quiz (Variation 2) | Stanford Online
Exercises (core 3 of 3
Question 3
set)
Suppose a table T(A,B,C) has the following tuples: (1,1,3), (1,2,3), (2,1,4),
SQL Movie-
Rating View (2,3,5), (2,4,1), (3,2,4), and (3,3,6). Consider the following view definition:
Modification
Exercises Create View V as
(challenge- Select A+B as D, C
level) From T
SQL Movie-
Rating View
Modification Consider the following query over view V:
Exercises
(extra practice)
Select D, sum(C)
AUTHORIZATION From V
Group By D
Having Count(*) <> 1
RECURSION
EXAMS
MATERIALS
Save Answers Submit Answers
SOFTWARE
GUIDES
EXTRA
PROBLEMS
Help/FAQs
Contact
My profile
Stanford University Home Maps & Directions Search Stanford Terms of Use
Copyright Complaints Technical Support
© Stanford University, Stanford, California 94305
class2go.stanford.edu/db/Winter2013/problemsets/ViewsQuizVariation2 2/2