Chpt 4 - CS 292
Is the way to keep an materialized view up-to-date called updating?
F
SQL Supports only one form of user-defined data types.
F
T/F Question: The SQL standard includes the privileges select, insert, delete, but not update
F
T/F Question: The inspect condition verifies that the time slot id in each tuple in the section relation is actually the identifier of a time slot in the time slot relation.
F
What is Integrity constraints?
It ensures that changes made to the database by authorized users do not result in a loss of data consistency.
A transaction consists of a sequence of query and/or update statements.
T
Short Question: What is the role of authorization in SQL?
gives the ability to input new data, update data, read data, and delete data.
What is virtual private database?
masks data in a larger database so that only a subset of the data appears to exist, without actually segregating data into different tables, schemas or databases.
In authorization graph, node representing database administrator, is known to be A. Root node B. Child node C. Leaf node D. Neighboring node
A
These are the three forms of outer join EXCEPT A. up outer join B. left outer join C. right outer join D. full outer join.
A
We define a view in SQL by using which command? A. create view B. select C. view as D. from
A
A user is able to authorize parts of the database that includes what?
Authorization to read data, insert new data, update data and delete data.
Which types of authorizations is called privilege ?
Authorization to read, insert, update and to delete data
What is commit work for ? A. After commit, transaction become permanent. B. After commit transaction delete C. Before commit transaction become permanent. D. Commit is false
A
Which one is incorrect ? A. An instructor name can be null B. No two instructors can have the same instructors ID C. The budget of a department must be greater than $0 D. A & B
A
Which process keeps the materialized view up-to-date? A. View maintenance B. Materialized views C. View D. None of the above
A
MCQ Question: The ______ clause can be used to define new types. A. new type B. create type C. begin type D. assign type
B
MCQ Question: Which clause contains only attribute names of the relation and does not have any expressions, aggregates, or distinct specifications? A. From B. Select C. on D. where
B
MCQ Question: Which one is a constraint that can be included in the create table command A. set default B. not null C. create view D. unique
B
SQL supports which of the following user-defined data type? A. Unstructured data type B. Structured data type C. Abstract data type D. None of the above
B
The process of keeping the materialized view up-to-date is called A. View Update B. materialized view maintenance C. View Check D. Materialized Perspective Maintenance
B
What are the two forms of user-defined data types that SQL supports? A. Distinct and Domain types B. Distinct and Structure Data types C. Domain and Query Data types D. Create and Drop types
B
Which join operation returns rows meeting criteria. A. Outer Join B. inner Join C. Cross Join D. Natural join
B
A transaction consists of sequence of query: A. Commit work B. rollback work C. Answer A & B D. None of the above
C
How can we do natural join in SQL? A. select B. join C. Natural Join D. none
C
How many forms of outer join is there? A. 1 B. 7 C. 3 D. 4
C
SQL supports two forms of user defined data types, one is called structured data types and the other is called A. unknown types B. complex types C. distinct types D. reading types
C
The "____ outer join" preserves the tuple only in the relation names before the operation. A. Left B. Right C. Full D. None of the above Reference: Pg 131
C
The grant statement is used to confer A. Deletion B. Insertion C. Authorization D. Creation
C
How does Referential Integrity work?
Ensures that a value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation.
A calendar date containing year, month,day and hour
F
Authorization in SQL means is playing music.
F
T/F Question: The not null constraint allows for the insertion of a null value for an attrubute
F
To distinguish normal joins from inner joins, normal joins are called outer joins in SQL.
F
What each of these types of authorization is call in query language
Privilege
A check clause is satisfied if it is not false, so clauses that evaluate to unknown are not violations.
T
Integrity constraints ensure that changes made to the database by authorized users do not result in a loss of data consistency.
T
No two instructors can have the same instructor ID integrity constraints.
T
T/F Question: Transactions are a series queries and updates that work together in order to complete a task
T
The "natural join" operation operates on two relations and produces a relation as the result
T
The from clause has only one database relation
T
The outer - join operation preserves topics that would be lost in a join by creating tuples in the result containing null values.
T
The outer join operation preserves the tuples that would be lost in a join by creating tuples in the result containing null values.
T
The right outer join is symmetric to the left outer join
T
The with clause allows us to to assign a name to a sub query for use as often as desired, but in one particular query only.
T
When a referential-integrity constraint is violated, the normal procedure is to reject the action that caused the violation.
T
the form of the create view command is: create view v as <query expression>;
T
Name some example of integrity constraints.
An instructors name cannot be null no two instructors can have the same instructor ID budget of a department must be greater than $0
Examples of integrity constraints are: A. An instructor name cannot be null. B. No two instructors can have the same instructor ID. C. Every department name in the course relation must have a matching department name in the department relation. D. All of the above
D
In general, an SQL view is said to be updatable if the following conditions are all satisfied by the query defining the view: A. The from clause has only one database relation. B. The select clause contains only attribute names of the relation and does not have any expressions, aggregates, or distinct specification. C. Any attribute not listed in the select clause can be set to null; that is, it does not have a not null constraint and is not part of a primary key. D. All The Above
D
In intermediate SQL the join conditions are: A. outer join B. left outer join C. right outer join D. all of the above
D
The allowed integrity constraints include A. not null B. unique C. check D. All of above
D
What are the following SQL statements that must happen to end the transaction?
Transactions can be committed, or rolled back; when a transaction is rolled back,the effects of all updates performed by the transaction are undone
Define an index.
a data structure that allows the database system to find those tuples in the relation that have a specified value for that attribute efficiently, without scanning through all the tuples of the relation.
Explain assertion and give example constraints which can be expressed using assertion?
a predicate expressing a condition that we wish the database always satisfied An instructor cannot teach in two different classrooms in a semester during the same time slot
What is a transaction consists of?
a sequence of query and/or update statements.
What is the common use of the check clause?
ensure that attribute values satisfy specified conditions.
What is natural join operation?
operates on two relations and produces a relation as the result. .
How many forms of outer join are there and explain each form
3 -left outer join preserves tuples only in the relation named before (to the left of) the left outer join operation. -right outer join preserves tuples only in the relation named after (to the right of) the right outer join operation -full outer join preserves tuples in both relation, which is both left and right.
The left outer join preserves tuples only in the relation named A. Before the left outer join operation B. After the right outer join operation C. Both of these D. None of the above
A
The right outer join preserves tuples only in... A. the relation named after (to the right of) the right outer join operation B. the relation named after (to the left of) the left outer join operation C. the relation named after (to the middle) the middle outer join operation D. None of the above
A
What is Rollback Work? A. Rollback does the undoes all the updates perform by the SQL transaction. B. Commit C. Alter D. Feedback
A
What is the process of keeping the materialized view up-to-date? A. Materialized view maintenance B. Create view C. View definition D. Update of a view
A
What operation operates on two relations and produces a relation as the result? A. natural join B. where C. joined D. join conditions
A
What symbol is used, that would stand for the union operation (meaning what symbols connects multiples entities). A. U symbol B. N symbol C. ∩ symbol D. #NAME?
A
what is a join clause?
A join clause can thus specify inner join instead of outer join to specify that a normal join is to be used
What is the difference between a specialization hierarchy and a specialization lattice?
A specialization hierarchy has the constraint that every sub class has only one parent, which results in a tree structure or strict hierarchy. Whereas, a specialization lattice a sub class can be in more than one class/sub class relationship.
There are three forms of outer join, circle the one that isn't an outer join. A. Left Outer Join B. Right Outer Join C. Empty Outer Join D. Full Outer Join
C
What is the The process of keeping the materialized view up-to-date called? A. maintenance material B. up-to date materialized view C. materialized view maintenance D. none of the above
C
What specific generalized super class can be used to the following: car and truck A. TRANSPORTATION B. PROJECT C. VEHICLE D. CARS
C
Which one is an allowed integrity constraints? A. add B. create table C. not null D. alter table
C
Which view defines a view in SQL? A. new view B. materialized view C. create view D. regular view
C
MCQ Question: What are the different outer join conditions in SQL? A. left-join, upper-join, lower-join B. left, right, up, down C. A and B D. left outer join, right outer join, full outer join, inner join
D
MCQ Question: What are the types of authorizations called? A. Rules B. Regulations C. Primary Authorization D. Privilege
D
MCQ Question: What is the view definition in SQL? A. To see the different types of information on the data tables B. To create a table C. The view definition is used to create view command D. A and C
D
The select clause contains only attribute names of the relation and does not have any; A. aggregates B. expressions C. distinct specifications D. all of the above
D
We may assign a user several forms of authorizations on parts of the database. Authorizations on data include: A. Authorization to read data. B. Authorization to insert new data. C. Authorization to update data. D. All the Above
D
What are some example of integrity constraints? A. An instructor name cannot be null. B. No two instructors can have the same instructor ID. C. Every department name in the course relation must have a matching department name in the department relation. D. All of the Above
D
What are/is null value from below> A. and B. or C. not D. A B and C
D
What consists of a sequence of query and/or update statements? A. Commit work B. Rollback work C. Work D. Transaction
D
What privileges are included in the SQL standards? A. grant, insert, update and select B. all privileges. C. update, on, grant, and select D. select, insert, update and delete.
D
Which SQL statement is used to extract data from a database? A. GET B. SELECT C. OPEN D. EXTRACT
D
Which is not one of the examples of integrity constraints? A. An instructor name cannot be null B. No two instructors can have the same instructor ID C. Every department name in the course relation must have a matching department in the department relation D. the budget of a department must be less than $0.00
D
what does check clause specifies ? A. it appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation. B. It expresses a condition that we wish the database always to satisfy. C. It specifies that a transaction begins implicitly when an SQL statement is executed. D. It specifies a predicate P that must be satisfied by every tuple in a relation.
D
The keyword work is mandatory in commit and rollback work statements.
F
The natural join operation operates on three relations and produces a relation as the result.
F
The passing of a general authorization from one user to another can be represented by an authorization graph.
F
A common use of the check clause is to ensure that attribute values satisfy specified conditions, in effect creating a powerful type system.
T
A database language enables the user to create database and table structures to perform basic data management chores.
T
An SQL query that implements an outer join will return rows that do not have matching values in common columns.
T
An assertion is a predicate expressing a condition that we wish the database always satisfy
T
An important concept associated with sub classes (sub types) is that of type inheritance.
T
Application that uses a view frequently may benefit if the view is materialized
T
Specialization is the process of defining a set of subclass of an entity type.
T
T/F Question: There are two types of User-defined types that SQL supports?
T
The full outer join is a combination of the left and right outer-join types.
T
The left outer join preserves tuples only in the relation named before (to the left of) the left outer join operation.
T
Short Question: What are Integrity constraints?
ensures that changes made to the database by authorized users do not result in a loss of data consistency.
Give an example of how to express natural joins through the use of the "join...on" clause.
select * from student join takes on student.ID=takes.ID;
What is a check clause and what is it used for?
specifies a predicate P that must be satisfied by every tuple in a relation. A common use of the check clause is to ensure that attribute values satisfy specified conditions to create a powerful type system.