WorksheetsDBI202_PART2
Total questions: 120
Worksheet time: 3600secs
QN=17 (6831) What is a primary key?
a. A primary key is the field(s) in a table that uniquely defines that table in a database
b. A primary key is the field(s) in a table that is used to establishes a relationship between two tables
c. A primary key is the field(s) in a table that uniquely defines the row in the table
d. A primary key is the field(s) in a table that is used to establishes a relationship between two databases
QN=19 (6822) Which statement is used to add a column named D into the relation R?
a. ALTER TABLE R ADD D [DataType];
b. ALTER TABLE R ADD ATTRIBUTE D [DataType];
c. ALTER TABLE R ADD PROPERTY D [DataType];
QN=20 (6821) Which one of the following is NOT a DML command?
a. DELETE
b. GRANT
c. INSERT
d. UPDATE
QN=22 (6811) The relational operator that adds all possible pairs of rows from two tables is known as the .... operator.
a. union
b. product
c. join
d. selection
QN=23 (7956) Let R(ABCDEFGH) satisfies the following functional dependencies:
A -> B,
CH -> A,
B -> E,
BD -> C,
EG -> H,
DE -> F.
Which of the following FDs is also guaranteed to be satisfied by R?
a. CGH -> BF
b. ACG -> DH
c. ADG -> CH
d. BCD -> FH
QN=25 (7969) Consider a relation with schema R(A, B, C, D) and FD's BC -> D, D -> A, A -> B. Which of the following is the key of R?
a. BD
b. BC
c. D
d. AB
QN=26 (7963) Given the relation schema R(A,B,C) and functional dependencies
F = {AB-> C, B->A, C->B}.
Which attribute(s) is/are prime?
a. only A
b. only B
c. A and B
d. B and C
QN=27 (7971) Given the relation R(ABCDE) with the following FD's:
D -> C,
CE ->A,
D ->A, and
AE ->D
Which of the following attribute set is a key?
a. ABCDE
b. CDE
c. ABE
d. BD
QN=29 (7967) A set of attributes forms a ____ for a relation if we do not allow 2-tuples in a relation instance to have the same values in all that attributes
a. Key
b. Foreign Key
c. Index Key
d. Trigger Key
QN=32 (7981) Suppose we have a relation R(ABCD) with FD's:
BC -> A ;
AD -> C ;
CD -> B ;
BD -> C
a. R is in BCNF
b. R is not in BCNF
c. All of the others
d. None of the others
QN=38 (7977) The relation R(ABCD) has following FDs:
{ AB -> C ; ABD -> C ; ABC -> D ; AC -> D}
Choose a correct statement about R?
a. R is in 3NF
b. R is not in 3NF
c. R is in BCNF
QN=40 (7992) Normalization is a process of analyzing the given relation schema based on their Functional Dependencies (FDs) and primary keys to achieve the following:
a. Minimizing redundancy
b. Minimizing insertion anomalies
c. All of the others
d. Minimizing deletion and update anomalies
QN=43 (8003) Look at the following statements:
(a) For any relation schema, there is a dependency-preserving decomposition into 3NF
(b) For any relation schema, there is not dependency-preserving decomposition into 3NF
(c) For any relation schema, there is dependency-preserving decomposition into BCNF
(d) For some relation schema, there is not dependency-preserving decomposition into BCNF
a. (a) and (d) are true
b. (a) and (b) are true
c. (a) and (c) are true
d. (b) and (d) are true
QN=44 (8007) Look at the following statements:
(a)All relations in 3NF are also in 2NF
(b)All relations in 2NF are also in 1NF
(c)All relations in 1NF are also in BCNF
(d)All relations in 1NF are also in 3NF
a. (b) and (d) are true
b. (a) and (c) are true
c. (a) and (d) are true
d. (a) and (b) are true
QN=45 (8006) What is "normalization"?
a. Normalizing data means eliminating redundant information from a table and organizing the data so that future changes to the table are easier
b. Normalizing data means minimizing columns from a table and organizing the data so that future changes to the table will be made more quickly
c. Normalizing data means removing columns from a table and organizing the data so that future changes to the table will be made more quickly
d. Normalizing data means adding more columns to a table and organizing the data so that future changes to the table will be made more quickly
QN=46 (7997) Which of the following are guidelines for designing the relational schema ?
a. Reduce the redundant values in tuples
b. Reduce the NULL values in tuples
c. Always make relations 3NF
d. All of the others
Regardless of whatever any other transaction is doing, a transaction must be able to continue with the exact same data set it started with.
The above describes which property of a transaction?
a. Atomic
b. Isolation
c. Consistency
d. Durability
Pay attention into the following query:
SELECT * FROM R
WHERE A LIKE '%a%';
So, in the above case, the wildcard % represents what?
a. % (percent sign) represents zero, one, or more character
b. % (percent sign) represents exactly 1 character
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?
a. SELECT * FROM Persons WHERE FirstName='a'
b. SELECT * FROM Persons WHERE FirstName LIKE '%a'
c. SELECT * FROM Persons WHERE FirstName='%a%'
d. SELECT * FROM Persons WHERE FirstName LIKE 'a%'
What does the keyword ESCAPE mean?
a. The keyword ESCAPE is used to match any string that contains the characters "%" or "_"
b. There is no keyword named ESCAPE
c. The keyword ESCAPE is used to match any string that contains the characters "?" or "*"
d. The keyword ESCAPE is used to match any string that contains the characters "@" or "$"
The SQL BETWEEN operator:
a. Specifies a range to test.
b. Specifies which tables we are selecting from.
c. Specifies that a column is a primary key.
d. None of the others
Referential integrity Constraints control relationships between ....
a. attributes in a table
b. operations of an object
c. database instances
d. tables in a database
Database integrity ensures that:
a. data entered into the database is accurate, valid, and consistent
b. data entered into the database is accurate, and consistent
c. data entered into the database is valid, and consistent
d. data entered into the database is accurate, and valid
Which of the following statements is the most correct?
a. Poorly designed indexes and a lack of indexes are primary sources of database application bottlenecks.
b. Designing efficient indexes is paramount to achieve good database and application performance
c. The selection of the right indexes for a database and its workload is a complex balancing act between query speed and update cost
d. All of the others
What is a view?
a. A view is a database diagram
b. A view is a special stored procedure executed when certain event occurs
c. A view is a virtual table which results of executing a pre-compiled query. A view is not a part of the physical database schema, while the regular tables are.
d. None of the others
What structure can you implement for the database to speed up table reads?
a. indexes
b. triggers
c. store-procedures
d. synonyms
Often, a DBMS allows us to build a single index on ____ attribute(s)
(choose the most correct answer)
a. only one
b. two
c. three
d. multiple
Suppose an updatable view ParamountMovies is associated with Movies relation. Choose a correct answer.
a. Drop Movies relation also delete the view ParamountMovies
b. Drop ParamountMovies also delete Movies
c. An update on ParamountMovies is translated into Movies
d. None of the others
Why we should use stored procedures?
a. They allow faster execution
b. They can reduce network traffic
c. They allow modular programming
d. They can be used as a security mechanism
e. All of the others
In UML, a _____ between classes is called an association
a.binary relationship
b.multi-way relationship
c.none of the others
When an entity is called "weak"?
(a) When it is used to represent weak objects, such as patients, elders
(b) When all of its attributes can not identify itself
(c) When It always needs support from other entity
(d) When It is not really necessary in the ERD
a.(a) and (b) are correct
b.(b) and (c) are correct
c.(c) and (d) are correct
d.(d) and (a) are correct
Consider the following statement:
"When drawing ERD, if an entity has no non-key attribute and it is the 'one' in many-one relationship, then we should set it to the attribute of other entities"
That above statement describes which principle?
A.Avoid Redundancy Principle
B.Picking the right kind of element principle
C.Limit the use of weak entity sets principle
D.Faithfulness principle
When drawing an ERD:
(a)Entity sets and their attributes should reflect reality
(b)Redundancy is not important, so we can ignore it
(c) Avoid introducing more elements into the design than is absolutely necessary
(d) Choosing the right relationships
A.(a) and (b) and (c) are correct
B.(a) and (c) and (d) are correct
C.(a) and (b) and (d) are correct
D.(b) and (c) and (d) are correct
A weak entity
A.does not depend on other entities
B.does not have enough key attribute(s)
C.is an entity that has not any key-attribute
D.None of the others
Here are three relations, R(A,B), S(C,D), and T(E,F). Their current values are:
R
A B
-------------------
0 1
1 0
1 1
S
C D
-------------------
0 1
1 0
1 1
T
E F
-------------------
0 1
1 0
1 1
Compute the result of the query:
SELECT A, F, SUM(C), SUM(D)
FROM R, S, T
WHERE B = C AND D = E
GROUP BY A, F
HAVING COUNT(*) > 1
Identify, in the list below, the row that appears in the result.
A.(1,1,2,1)
B.(1,1,2,2)
C.(1,1,1,1)
D.None of the others
Choose the correct statement
A.Except for COUNT, aggregate functions ignore null values
B.Except for SUM, aggregate functions ignore null values
C.Except for AVG, aggregate functions ignore null values
D.Except for MIN, aggregate functions ignore null values
E.Except for MAX, aggregate functions ignore null values
What is the difference between Where and Having Clause?
A.WHERE is for Rows and HAVING is for Groups
B.WHERE is for Groups and HAVING is for Rows
C.WHERE and HAVING are the same
D.We can use aggregation functions in WHERE clause
Suppose relation R(a,b,c) has the following tuples:
A B C
-----------------------------------
1 1 3
1 2 3
2 1 4
2 3 5
2 4 1
3 2 4
3 3 6
Which tuple is contained in the result of the following query:
SELECT a, COUNT(DISTINCT B) FROM R
GROUP BY a
HAVING SUM(B) >3;
A.(2,10)
B.(3,7)
C.(2,3)
D.(3,12)
What does the following SQL statement do:
SELECT Customer, COUNT(Order)
FROM Sales
GROUP BY Customer
HAVING COUNT(Order) > 5
A.Selects the total number of orders from the Sales table, if this number is greater than 5
B.Selects all Customers from the Sales table
C.Selects all customers from table Sales that have made more than 5 orders.
D.None of the other three
The table R(X,Y) currently has the following tuples (note there are duplicates).The relation S(A,B,C) has the following tuples:
(See picture)
Which is the result when we execute the following query:
SELECT FROM R
UNION
SELECT FROM S
[file:8524.jpg]
a. There is an error a
b. The output has 15 rows
c. The output has 16 rows
d. The output has 17 rows
QN=18 (8537) What is a "join"?
a. 'join' used to connect two or more tables logically with or without common field(s) a
b. 'join' used to connect two or more tables logically with common field(s)
c. 'join' used to connect two or more tables logically without common field(s)
d. 'join' used to connect two or more tables logically with aliases
When join R and S, we want to display all the records in R we must use:
a. LEFT OUTER JOIN
b. RIGHT OUTER JOIN
c. INNER JOIN
d. None of the others
Given relations R(A,B) and S(B,C,D). The result of natural join of the relations R and S has
a. Only attribute B
b. Only two attributes R.B and S.B
c. Attributes A, B, C, D
d. None of the others
Relation R(x,y) currently consists of only one tuple (NULL, NULL). Which of the following queries will produce a nonempty output? That is, at least one tuple will be produced, although the tuple(s) may have NULL's.
a. SELECT * FROM R WHERE x IS NULL
b. SELECT * FROM R WHERE x = NULL
c. SELECT * FROM R WHERE x = y
d. SELECT * FROM R WHERE x <> 10
(TRUE AND NULL) returns: ???
a. NULL
b. TRUE
c. FALSE
d. None of the others
Choose the in-correct statement:
a. In SQL Server, every DML operation is a transaction regardless of whether it has a BEGIN TRANSACTION or not
b. COMMITTING a transaction makes permanent the changes resulting from all SQL statements in the transaction
c. ROLLING back a transaction rejects any of the changes resulting from the SQL statements in the transaction
d. When the sequence of tasks is complete, the SAVE POINT closes the transaction
QN=43 (8610) In order to modify or delete an existing constraint, it is necessary that:
a. the constraint has a name
b. the constraint has an ID
c. the constraint has some attributes
QN=37 (8611) Look at the following tables and then choose the correct statment:
ARTISTS
Airtist_id Airtist_Name
-----------------------------------
1 Bono
2 Cher
ALBUM
artist_id Album_name
------------------------------------
3 Eat the rich
a. The above picture is an example of a database that has not enforced referential integrity
b. The above picture is an example of a database that has not enforced entity integrity
c. The above picture is an example of a database that has not enforced domain integrity
d. All of the others
QN=33 (8576) The IN SQL keyword
a. Is used with the DISTINCT SQL keyword only
b. Is used with the INSERT SQL keyword only
c. Determines if a value
any of the values in a list or a sub-query
d. Defines the tables we are selecting or deleting data from
Choose a right answer.
[A]
A SOL environment is the framework under which data may exist and SQL operations on data may be executed
[B]
All of the others
[C]
Within a SQL environment are two special kinds of processes: SQL clients and SQL servers.
[D]
A SQL environment is a DBMS running at some installation.
Choose the right statement below to declare zero or one occurrence of an Element in DTD.
[A]
<"ELEMENT element-name (child-name?)>
[B]
<IELEMENT element-name (child-name+)>
[C]
<'ELEMENT element-name (child-name*)>
[D]
<IELEMENT element-name (child-name)>
Given the relation Employee(SSN. FNAME. LNAME. SALARY). Select the right query below to find the employee(s) who has the lowest salary in the company
[A]
SELECT LNAME. FNAME. SALARY FROM Employee WHERE SALARY IN (SELECT MIN(SALARY) FROM Employee)
[B]
SELECT LNAME. FNAME. SALARY FROM Employee WHERE SALARY >= ALL (SELECT SALARY FROM Employee)
C]
SELECT LNAME. FNAME. SALARY FROM Employee WHERE SALARY < MAX (SELECT SALARY FROM Employee)
[D]
None of the others
Given a relation R(A.B.C.D). Which of the followings is trivial?
[A]
A->BCD
[B]
A->->BCD
[C]
A->AB
[D]
A->->AB
Select the well-formed XML
[A]
All of the others
[B]
<? xml version = "1.0" ?>
<MovieData>
<Movie tiHe="StarWar*><Year>1997</Yearx/MovJe>
</MovieData>
[C]
<? xml version - "1 0' ?>
<MovieData>
<Movie Me-'StarWaf*><Year>1997</Year></Movie>
</Movies>
[D]
<? xml version = 1 0 7>
<MovieData>
<Movie trtle-"StarWar"><Year>1997</Movie></Year>
</MovieData>
Which of the followings is true?
[A]
The Entity Relationship (ER) model represents the structure of data graphically
[B]
The ER model is a low level database design
[C]
The ER model represents the operation on data
[D]
All of the others
In the three-tier architecture, the database tier's function is to
[A]
All of the others.
[B]
Execute the business logic of the organization operating the database.
[C]
Manage the interactions with the user.
[D]
Execute queries that are requested from the application tier.
Choose a right answer
[A]
When a privilege is granted, it cannot be revoked
[B]
Privileges cannot be granted on a view
[C]
An authorization ID may be granted privileges from others or may grve its privileges to others
[D]
All of the others
Exception handler in PSM is defined as follows:
DECLARE <where to go next> HANDLER FOR condition list> <statement>
The <where to go next> clause can be:
[A]
UNDO
[B]
EXIT
[C]
All of the others
[D]
CONTINUE
In SQL language, the command/statement that let you add an attribute to a relation is_
[A]
Alter
[B]
None of the others
[C]
Insert
[D]
Update
Consider the Dalalog rule H(xy) <- Sfx. y) AND x > 2 AND y < 6. Relation S(x y) has 3 tuples (2.3). (3.5). and (4.6). What is about H?
[A]
H has a tuple (2.3)
[B]
H has 3 tuples (2.3) and (3.5) and (4.6)
[C]
H has 2 tuples (2.3) and (3.5)
[D]
H has a tuple (3.5)
Select the valid query to declare the foreign key presC# of the relation Studiolname. address. presC#) that references the cert of the relation MovieExeclname. address. cert#. netWorth):
[A]
All of the others.
[B]
CREATE TABLE Studio (name CHAR(30) PRIMARY KEY. address VARCHAR(256). presC# INT FOREIGN KEY):
[C]
CREATE TABLE Studio (name CHAR(30) PRIMARY KEY. address VARCHAR(256). presC# INT UNIQUE KEY REFERENCES MovieExec):
[D]
CREATE TABLE Studio (name CHAR(30) PRIMARY KEY. address VARCHAR(256). presC# INT REFERENCES Movie Exec (cert#));
Choose the right statement
[A]
XML Schema allows us to declare simple types, such as integer or float and even complex types
[B]
All of the others
[C]
XML schema provides us the ability to declare keys and foreign keys.
[D]
XML Schema is an alternative way to provide a schema for XML documents.
The relational operator that yields all possible pairs of rows from two tables is known as a _
[A]
Union
[B]
Selection
[C]
Product
[D]
Join
Consider a relation with schema R(A, B, CD) and FD's BC-> D, D-> A, A-> B. Which of the following is the key of R?
[A]
BD
[B]
D
[C]
AB
[D]
BC
In PSM. the difference between 3 stored procedure and a function is that
[A]
A function has the return statement.
[B]
We can declare local variables in a function.
[C]
All of the others
[D]
Loops are not allowed in a function
Selecl Ihe right syntax for HAVING clause in SOL
[A]
SELECT <list of attributes>
FROM <list of tables>
WHERE <conditions on tuples>
HAVING <conditions on groups>
GROUP BY <list of attributes>
[B]
SELECT <list of attributes>
FROM <list of tables>
WHERE <conditions on tuples>
GROUP BY <list of attributes>
HAVING <conditions on groups>
[C]
SELECT < list of attributes>
FROM < list of tables>
HAVING <conditions on groups>
WHERE <conditions on tuples>
GROUP BY <list of attributes>
[D]
All of the others
Select the right answer.
[A]
All of the others
[B]
Tags in XML are text surrounded by triangular brackets (for example, <_>).
[C]
An XML tag can be a single tag with no matching closing tag (for example. <foo />
[D]
Tags in XML comes in matching pairs, with an opening tag like <foo> and a matched closing tag like</foo>
[D]
Tags in XML comes in matching pairs, with an opening tag like <foo> and a matched closing tag like</foo>
[A]
Only two attributes R B and SB
[B]
None of the others
[C]
Only attribute B
[D]
Attributes A B. C. D
Given relation U(A, B, C) that has 2 tuples (1,2,3) and (4,5,6), and relation V(B(C, D) that has 2 tuples (2,3,10) and (2,3,11). Choose the right answer below;
[A]
None of the others.
[B]
The outer join of U and V is the relation R(A, B, C, D) that has 2 tuples (1.2, 3.10) and (1,2, 3,11).
[C]
The outer join of U and V is the relation R(A. B. C. D) that has 3 tuples (1.2.3.10) .(1.2.3.11) and (4.5.6. NULL).
[D]
The outer join of U and V is the relation R(A. B. C. D) that has only 1 tuple (NULL. 4.5.6).
The result of (UNKNOWN OR TRUE) is
[A]
UNKNOWN
[B]
FALSE
[C]
TRUE
[D]
NULL
In Java Database Connectivity (JDBC). before we can execute SQL statements), we need to _
[A]
Create a cursor.
[B]
Create an environment
[C]
Create a description.
[D]
Establish a connection to the database and create statement(s)
Choose a right answer
[A]
The object-relational model is the extension of the relation model with new features such as structured types, methods, identifiers for tuples, and references
[B]
Object-relation model allows a non-atomic type that can be a relation schema which is called nested relation
[C]
In object-relational model, the type of an attribute can be a reference to a tuple with a given schema or a set of references to tuples with a given schema
[D]
All of the others
Select the right answer
[A]
Virtual views do not exist physically
[B]
Virtual views are defined by an expression like a query
[C]
Virtual views can be queried and can even be modified
[D]
All of other
Select the right statement to declare MovieStar to be a relation whose tuples are of type StarType. Note; StarType is a user-defined type that has its definition as follows;
CREATE TYPE StarType AS (
nameCHAR(30).
address CHAR(IOO) };
[A]
CREATE TABLE MovieStar (name StarType).
PI
CREATE TABLE MovieStar (name StarType PRIMARY KEY);
[C]
CREATE TABLE MovieStar OF StarType Q;
[D]
None of the others
Which of the following statements is true?
[A]
I3NF implies BCNF
[B]
Multi-valued Dependency (MVD) implies Fourth Normal form (4NF)
[C]
4NF implies BCNF and BCNF implies 3NF
[D]
None of the others
Choose the right statement
[A]
Sub-queries return a single constant this constant can be compared with another value in a WHERE clause;
[B]
Sub-queries return relations, that can be used in WHERE clause
[C]
Sub-queries can appear in FROM clauses, followed by a tuple variable
[D]
All of the others
Given the relation Movies(title, year, length, genre. studioName). Select the right query to create a View with the titles and studio names of all movies that were produced in 1980
[A]
CREATE VIEW OldMovies SELECT title. studioName FROM Movies WHERE year-1980
[B]
CREATE VIEW OldMovies SELECT title, year FROM Movies WHERE year=1980
[C]
CREATE VIEW OldMovies AS SELECT title. studioName FROM Movies WHERE year=1980
[C]
CREATE VIEW OldMovies AS SELECT title. studioName FROM Movies WHERE year=1980
Given the relation Employee(SSN. FNAME. LNAME. SALARY. DepartmentNo). Select the right query below to count the number of employees in each department
[A]
SELECT COUNTf) FROM Employee
[B]
SELECT DepartmentNo. COUNT(*) FROM Employee GROUP BY DepartmentNo
[C]
SELECT DepartmentNo. COUNT(*) FROM Employee
[D]
None of the others
Consider a relation with schema R(A, B. C. D) and FD's A-> B. A-> C. C -> D. Which ofthe following is the {A}+ ?
[A]
{A}
[B]
{A B C D}
[C] {A. B. C}
[D] {A.B}
To create a constraint (for example, referential integrity constraint) on a relation, the owner ofthe schema must have
[A]
UNDER privilege
[B]
REFERENCES privilege
[C]
UPDATE privilege
[D]
EXECUTE privilege
Choose a wrong answer.
[A]
Relational algebra can express recursion.
[B]
Basic relational algebra can be expressed in Datalog rule(s).
IC]
Single Datalog rule can be expressed in relational algebra.
[D]
Datalog does not support bag operations.
In DTD. the main difference between PCDATA and CDATA is
[A]
PCDATA is text that will be parsed by a parser and tags inside the text will be treated as markup and entities will be expanded CDATA is text that will NOT be parsed by a parser and tags inside the text wil
NOT be treated as markup and entities will not be expanded.
[B]
All of the others.
[C]
CDATA is used to assert something about the allowable content of elements where as PCDATA is used as a common type for attribute
[D]
There's no difference between PCDATA and CDATA.
_______authorizes access to database, coordinate, monitor its use, acquiring software, and hardware resources.
[A]
All of the others
[B]
Database administrator
[C]
Database designer
[D]
Database end-user
Choose right answer(s).
[A]
NULL value is unknown, inapplicable, or withheld
[B]
Comparisons with NULL values will return UNKNOWN
[C]
Arithmetic operators on NULL values will return a NULL value
[D]
All of orther
Choose the right statement
[A]
The action associated with the trigger executes no matter what the condition is hold or not
[B]
Triggering events do not support INSERT and DELETE
[C]
All of the others.
[D]
When the trigger is awakened, it tests a condition. If the condition is satisfied, the action associated with the trigger is executed
Four characteristics of transactions are
[A]
None of the others
[B]
Read uncommitted, Read committed, Repeatable read, Serializable
[C]
Atomicity. Isolation. Concurrency. Durability
[D]
Atomicity. Isolation. Consistency. Durability
Choose the right statement to grant the INSERT and SELECT privileges on table Movies to users torn' and jerry'
[A]
GRANT SELECT. INSERT on Movies
[B]
GRANT SELECT. INSERT on Movies TO torn, jerry CASCADE
[C]
GRANT SELECT. INSERT on Movies TO torn, jerry WITH GRANT OPTION
[D]
GRANT SELECT. INSERT on Movies TO ALL
When declaring foreign key constraint for relation A thai references relation B. the referenced attribute(s) of the relation B must be declare as_______
[A]
UNIQUE or PRIMARY KEY
[B]
FOREIGN KEY
[C]
INDEX KEY
[D]
All of the others
Choose an incorrect statement
[A]
None of the others
[B]
Database is created and maintained by a DMBS
IC]
Database is a collection of information that exists over a long opened of time
[D]
Database is a collection of data that is managed by a DBMS
Select the right statement
[A]
All of the others
[B]
Every constraint has a name. If we don't define constraint's name explicitly, then DBMS automatically generates a name for it
[C]
We can create constraint on a tuple as a whole.
[D]
We can create constraint on a single attribute
Given relations Movies(title, year, length, genre. studioName. producer#). MovieExec(name. address. cert#). and Studio(name. address. presC#). Suppose we have the materialized view that finds the name -
ofthe producer of a given movie as follows:
CREATE MATERIALIZED VIEW MovieProd AS
SELECT title, year, name
FROM Movies. MovieExec
WHERE producer# - cert#
Which of the following modification will affect the MovieProd materialized view?
[A]
Insert a new tuple into Studio
[B]
Delete a tuple from Studio
[C]
Insert a new tuple into Movies or delete a tuple from Movies
[D]
None of the others
In relational data model, an attribute is a column
[A]
True
[B]
False
A data model is a notation for describing data or information. And the description generally consist of:
[A]
2 parts
[B]
3 parts
[C]
4 parts
[D]
5 parts
DBMS stands for what?
[A]
Database Managing Systems
[B]
Database Management System
[C]
Database Manage System
[D]
Database Managable System
Look at this line:
MOVIES (Id, Name, Description)
What the above represent?
[A]
A relation
[B]
A schema
[C]
A schema instance
[D]
A relation instance
Look at the following data for table R:
A B C
1 1 2
1 1 2
1 1 3
Choose all correct answers
[A]
R is not a relation
[B]
R is a relation
[C]
R has no key
[C]
R has no key
[A]
True
[B]
False
When the Relational Data Model first proposed?
[A]
1940
[B]
1950
[C]
1960
[D]
1970
What is the oldest data model?
[A]
Network Data Model
[B]
Flat File Data Model
[C]
Relational Data Model
[D]
Hierachical Data Model
How many data models mentioned in our database course?
[A]
3
[B]
4
[C]
5
[D]
6
XML files are semi-structured data
[A]
True
[B]
False
A relation is a list of tuples
[A]
True
[B]
False
A relation is a set of tuples
[A]
True
[B]
False
A weak entity:
[A]
must have total participation in an identifying relationship
[B]
does not have a key attribute(s)
[C]
both (a) and (b)
[D]
none of the above
Give the relation R(XYZT) with the following FD's:
XY -> Z ; XYT -> Z ; XYZ -> T ; XZ -> T
Determine the primary key for R and then choose the correct statement
[A]
R is in BCNF
[B]
R is not in BCNF
Given the relation schema R(XYZT) and functional dependencies
F = {X->Z, T->Y}.
Which functional dependency causes a violation of second normal form (2NF) ?
[A]
X->Z
[B]
T->Y
[C]
both X->Z and T->Y
[D]
none of the above
5. The ER model is meant to
a) replace relational design
b) enable detailed descriptions of data query processing
c) enable low level descriptions of data
d) be close to a users perception of the data
To apply a selection to bag:
A. We apply the selection condition to each tuple independently.
B. None of others.
C. We apply the selection condition to each attribute independently.
D. All of the other.
(FALSE AND NULL) return:
A. NULL
B. TRUE
C. FALSE
D. None of the others
Give the relation Employee(SSN,FNAME,LNAME,SALARY).Select the right query below to find the employee(s) who has the lowest salary in the company
A. SELECT LNAME,FNAME,SALARY FROM Employee WHERE SALARY IN ( SELECT MIN(SALARY) FROM Employee)
B. SELECT LNAME,FNAME,SALARY FROM Employee WHERE SALARY >=ALL( SELECT MIN(SALARY) FROM Employee)
C. SELECT LNAME,FNAME,SALARY FROM Employee WHERE SALARY < MAX ( SELECT MIN(SALARY) FROM Employee)
D. None of the others
Suppose relations R(A<B) and S(B,C,D) are as follows:
R= A B
1 2
3 4
5 6
S= B C D
4 5 1
6 7 2
8 9 3
Compute the full outer join on B, where R is the left operand and S is the right operand. Find the correct statement in the list below.
A. The full outer has 6 tuples.
B. The full outer has 3 tuples.
C. The full outer has 4 tuples.
D. The full outer has 5 tuples.
How many properties we must use to measure the quality of a transaction?
A.6
B.4
C.3
D.5
Consider the distrubutive law, that holds for set relation:
(R U S)- T =(R-T)U(S-T)
The above distributive still hold for bag relations?
a. TRUE
B. FALSE
no question
A. (2,3) appears twice in the result.
B. (2,3) appears three times in the result.
C. (3,3) appears once in the result.
D. (2,2) appears once in the result.
What SQL keyword can be use to return data from two non-related tables as a combined set of rows?
A. DISTINCT ALL
B. DISTINCT
C. UNION ALL
D. COMBINED
In databse design precesses, data requirements are expressed through......
(a) Schema Design
(b)ERD
(c)UML
(d) Table Design
A. (c) and (d)
B. (b) and (c)
C. (a) and (b)
D. (d) and (a)
Every row and value must agree with all constratints right after the transaction is complete. The above describes which propety of a transaction?
A.Isolation
B.Consistency
C.Atomic.
D. Durability
Given the diagram below,using the nulls method we can create a single relation whose schema is.....
A.Movies(title,year,length,genre)
B.Movies(title,year,length,genre,cartoons)
C.Movies(title,year,length,genre,weapon)
D.Movies(title,year,length,genre,murder)
In relational data model, an attribute is a column
A. True
B. False
