DBI202 SET 4

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

a

(FALSE AND NULL) return: A. NULL B. TRUE C. FALSE D. None of the others

d

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

b

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

b

A relation is a list of tuples [A] True [B] False

a

A relation is a set of tuples [A] True [B] False

c

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

a

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.

d

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

c

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

b

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.

a

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.

a

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

d

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

c

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

d

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

b

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.

d

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.

a

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)>

c

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

d

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

b

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}

d

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)

b

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

b

DBMS stands for what? [A] Database Managing Systems [B] Database Management System [C] Database Manage System [D] Database Managable System

b

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

d

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

a

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

b

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

b

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

c

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).

c

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

d

Given relations R(A.B) and S(B.C.D). The result of natural join of the relations R and S has [A] Only two attributes R B and SB [B] None of the others [C] Only attribute B [D] Attributes A B. C. D

c

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)

a

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

b

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

c

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 [D] None of the others

c

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

d

How many data models mentioned in our database course? [A] 3 [B] 4 [C] 5 [D] 6

b

How many properties we must use to measure the quality of a transaction? A.6 B.4 C.3 D.5

a

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.

d

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)

c

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.

a

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

b

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)

a

In relational data model, a tuple is a record or a row [A] True [B] False

b

In relational data model, an attribute is a column [A] True [B] False

d

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.

b

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

b

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

c

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

b

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

d

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

a

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>

a

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

c

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). [B] CREATE TABLE MovieStar (name StarType PRIMARY KEY); [C] CREATE TABLE MovieStar OF StarType Q; [D] None of the others

d

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#));

b

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>

c

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.

c

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

c

The result of (UNKNOWN OR TRUE) is [A] UNKNOWN [B] FALSE [C] TRUE [D] NULL

a

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.

c

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

a

What is the oldest data model? [A] Network Data Model [B] Flat File Data Model [C] Relational Data Model [D] Hierachical Data Model

a

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

d

When the Relational Data Model first proposed? [A] 1940 [B] 1950 [C] 1960 [D] 1970

c

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

a

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 IC] The ER model represents the operation on data [D] All of the others

a

XML files are semi-structured data [A] True [B] False

b

_______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

b

o 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


संबंधित स्टडी सेट्स

PHARM_WEEK 2_Antihyperlipidemics and Nitrates

View Set

ISSA Specialist in Sports Nutrition Quiz 17

View Set

Dental ethics and law: Chapter 8 and 9

View Set