DBI202

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

A database is an organized collection of _____ related data. Choose one Answer:. a. Physically b. Loosely c. Logically d. Badly

A

A domain definition consists of the following components except: Choose one Answer:. a. Integrity constraints b. Size c. Data type d. Domain name

A

A student can attend five classes, each with a different professor. Each professor has 30 Students. The relationship of students to professors is a _________ relationship. Choose one Answer:. A. Many - to - many B . One - to - many C. Many - to - one D. One - to - one

A

An attribute of the relation r to which the ? Is applied is called __________ Choose one Answer:. a. Grouping attribute b. Aggregation attribute c. Composite attribute d. None of the others

A

Choose a right statement Choose one Answer:. a. If x is a key, then x is a super key b. A relation has only one key c. If x is a super key, then x is a key d. Primary key is a minimal key

A

There is a way of describing xml data, how? a. Xml uses a dtd to describe the data b. All of the others c. Xml uses a description node to describe data d. Xml uses xsl to describe data

A

We should avoid redundancy when designing database because _____ a. We may encounter deletion anomalies b. All of the others c. We may encounter update anomalies d. It wastes spaces

A

We can turn the result of a query into a data cube by appending ______ To a group-by clause a. With sum b. With cube c. All of the others d. With aggregate

B

When performing union, intersection, or difference operations on Relations r and s, they must be type compatible. That is, ______ a. R and s must have the same number of attributes b. R and s must have the same number of attributes and the domain of corresponding attributes of r and s must be compatible c. The domain of corresponding attributes of r and s must be compatible d. The names of attributes of r and s must be the same

B

Consider a relation with schema r(a, b, c, d, e) and the set of fds: bc-> d, d -> a, a -> b. Find one key of r. a. Bc b. Ab c. None of the others d. Bd

C

Consider the datalog rule h(x,y) <- s(x, y) and x >= y and y < 3. Relation s(x, y) has 3 tuples (2, 3), (5, 3), and (3, 3). What is about h? a. H has 2 tuples (3, 3) and (5, 3) b. H has a tuple (3, 3) c. None of the others d. H has a tuple (5, 3)

C

Given a relation r(a,b,c,d) with functional dependencies a->bc, c->d, D->a. Find one key of r Choose one Answer:. a. {a,b,c} b. {a,b} c. {a} d. {a,b,c,d}

C

Choose the right Answer:: a. Duplicate-elimination operator is used to convert a bag to a set b. Duplicate-elimination operator is used to add duplicate tuple to a Relation c. None of the others d. Duplicate-elimination operator is used to convert a set to a bag

A

Choose the wrong statement a. We should start the high level database design (for example, er diagram in conceptual design) after getting user requirements. b. All of the others c. The high level database design (for example, er diagram in Conceptual design) depends on dbms selection d. The high level database design (for example, er diagram in Conceptual design) is independent of dbms selection.

A

Choose the wrong statement a. None of the others b. The database tier executes queries that are requested from the Application tier c. There can be many processes in the database tier and the processes. Can be distributed over many machines or all be together on one d. Since creating connections to database takes significant time, we Normally keep a large number of connections open and allow application Processes to share the connection

A

Choose the wrong statement: a. The subclasses of a class in uml can be disjoint partial b. The subclasses of a class in uml can be disjoint overlapping c. The subclasses of a class in uml can be disjoint complete d. The subclasses of a class in uml can be overlapping partial

A

Functional dependency is a constraint on __________ Choose one Answer:. a. Two sets of attributes of a relation b. Two sets of attributes from two different relations c. Two different relations in database d. A set of attributes of a relation

A

Given relation r(a,b) that has 2 tuples (1, 2) and (3, 4); relation s(b, C, d) has 3 tuples (2, 5, 6), (4, 7, 8) and (9, 10, 11). The natural Join of r and s has ______ a. 2 tuples (1, 2, 5, 6) and (3, 4, 7, 8) b. 1 tuple (1, 2, 10, 11) c. 2 tuples (1, 2, 2, 5) and (3, 4, 4, 7) d. 2 tuples (1, 2, 3, 4) and (5, 6, 7, 8)

A

Given relation u(a, b, c) that has 2 tuples (a, 1, x) and (a, 1, y), and Relation v(a, b) that has 1 tuple (a, 1). Choose the right Answer: below: a. The left outer join of u and v is the relation r(a, b, c) that has 2 tuples (a, 1, x) and (a, 1, y). b. The left outer join of u and v is the relation r(a, b, c) that has 3 Tuples (a, 1, x) , (a, 1, y) and (b, 2, null). c. None of the others d. The left outer join of u and v is the relation r(a, b, c) that has Only 1 tuple (null, a, 1).

A

Given table moviestar defined as follows: create table moviestar( name Char(30) primary key, address varchar(256), gender char(1) check (gender In ('m','f')), birthdate date not null ) which of the following query is Not valid? a. Insert into moviestar values ('tom cruz', '123 little rd, la city','m', null); b. Insert into moviestar(name, gender, birthday) values ('tom cruz','M', '1973-09-12 00:00:00'); c. Insert into moviestar values ('tom cruz', null, 'm', '1973-09-12 00:00:00'); d. Insert into moviestar(name, address, gender, birthday) values ('tomCruz', null, 'm', '1973-09-12 00:00:00');

A

In a typical olap application, there is a central relation or collection Of data, called ______ a. The fact table b. All of the others c. The dimension table d. The star table

A

In the three-tier architecture, the function of the application tier is To _______ a. Execute the business logic of the organization operating the database b. All of the others c. Perform queries and modifications at the request of the application Servers d. Manage the interactions with the user

A

Question 33 Consider a relation with schema r(a, b, c) and the set of fds: a -> b, a -> c, b -> a, b -> c, c -> a, c -> b, ab -> c, bc -> a, ac -> b, a -> Bc, b -> ac, c -> ab. Find a minimal basis for relation r. a. A -> b, b -> c, c -> a b. All of the others c. Ac -> b, bc -> a d. Ac -> b, bc -> a, a -> bc

A

Select the right statement a. Updating views are allowed if query involves a single base relation and contains a candidate key of base relation b. Updating views are allowed if query involves aggregation or grouping operations c. Updating views are allowed if query involves multiple base relations. d. All of the others

A

Select the right statement a. All of the others b. A view is a virtual table c. Not all views are updatable d. With updatable views, the modification is translated into an equivalent modification on a base table

A

Select the right statement a. Assertion is a boolean-valued sql expression that must be true at All times b. Assertion is not part of the database schema c. Once created, an assertion cannot be dropped unless you delete theDatabase d. Assertion condition cannot be involved in many relations.

A

Suppose a relation r(a,b) has 4 tuples (1,2), (2,3), (1,1), (2,4). A Result of ?a,sum(b)?sum(r) is __________ Choose one Answer:. a. A relation has 2 tuples (1,3), (2,7) b. A relation has 4 tuples (1,2), (2,3), (1,1), (2,4) c. A relation has 3 tuples (2,3), (4,7) d. None of the others

A

Suppose r(a,b,c) is bag, s=sa>b(r). Choose a right Answer: Choose one Answer:. a. S has the same schema as r, and s has less or equal tuples than r has b. A number of tuples in s is always equal to a number of tuples in r c. A schema of s is different from a schema of r d. None of the others

A

Suppose the relation tblemployee(employeeid, employeename, salary, Department). Consider the following code in sql server 2005: Declare @employeeid int, @employeename nvarchar(50), @salary decimal(10,0); Declare mycursor cursor for select employeeid, employeename, salary from Tblemployee where department=1; Open mycursor; Fetch next from mycursor into @employeeid,@employeename,@salary; If @@fetch_status <> 0 Print '<<none>>'; While @@fetch_status = 0 Begin Print @employeeid+' '+@employeename+' <mailto:'+@employeename+'> '+@Salary <mailto:'+@salary>; Fetch next from mycursor into @employeeid,@employeename,@salary; End Close mycursor; Deallocate mycursor; What happens if we execute this code? a. It's executed successfully, and prints out three values for each existing employee in tblemployee table b. It's executed successfully, but nothing is displayed in output c. It's executed successfully, and the output is the simple text '<>' d. It can not be executed successfully.

A

The number of entity types that participate in a relationship is called The : Choose one Answer:. a. Degree b. Number c. Counter d. Cardinality

A

When we say one class has many students, and a student is a member of One class, we mean that the multiplicity of this relationship from class Entity set to student entity set is _________ Choose one Answer:. a. One - many b. Many - many c. One - one d. Many - one

A

Which of the following constructs can be used in psm? Choose at least one Answer:. a. Loop ... End loop; b. While .... Do ... c. Do ... While .... d. For ... Do ..

A

Which of the following is considered anomaly? a. All of the others b. Information may be changed in one tuple, but may not be changed in other tuple(s) c. If a set of values becomes empty, we may lose other information as a side effect d. Information may be repeated unnecessarily in several tuples

A

Which of the following is not a valid privilege in sql? a. Procedure b. Trigger c. Execute d. References

A

Which sql statement is used to return only different values? a. Select distinct b. Select different c. Select unique d. Select different all

A

Which of the following datalog rules is safe? Choose at least one Answer:. a. R(x,y,z) ? U(x,y) and t(y,z) b. R(x,y,z) ? S(x) and u(x,y) and t(y,z) c. R(x,y,z) ? S(x) and t(x,y) and y < z d. R(x,y,z) ? U(x,y) and t(x,y) and y < z

A,B

A join in which the joining condition is defined explicitly is called a ( n ): Choose one Answer:. a. Cartesian product b. Theta join c. Natural join d. All of the other choices

B

Choose a well-formed xml document a. <?Xml version="1.0"?> <to>tove</to><from>jani</from><heading>reminder</heading><body>don't Forget me this weekend!</body> b. <?Xml version="1.0"?> <envelope><to>tove</to><from>jani</from><heading>reminder</heading><body>don't Forget me this weekend</body></envelope> c. <?Xml version="1.0"?> <to>tove</to><from>jani</from><heading>reminder</heading><body>don't Forget me this weekend!</body></end> d. None of the others

B

Choose a wrong statement Choose one Answer:. a. E/r model represents the structure of data graphically b. E/r model represents both the structure of data and the operations on data c. E/r model uses three principle element types: entity sets, Attributes, and relationships d. None of the others

B

Choose the right statement a. Basic relational algebra cannot be expressed in datalog rule(s) b. All of the others c. Relational algebra can express recursion d. Any single safe datalog rule can be expressed in relational algebra

B

List all the movies that have length less than 100 and were produced by A studio name other than 'fox'. Select the right Answer:. a. Selection not(length=100) and not(studioname='fox')(movies) b. None of the others c. Selection length<100 and studioname <>'fox'(movies) d. Selection not(length=100 or studioname='fox')(movies)

B

Suppose relation r(a,b,c,d) with fd's a?b, b?d, cd?a. This relation is Decomposed into 3 relations s1={a,d}, s2={a,c}, s3={b,c,d}. Is this decomposition lossless join? a. Yes b. No

B

Suppose the theta join r3 :=r1?r2, where c is a condition that refers to Attributes of r1 and r2. Which of the followings is correct? a. Each tuple t1 of r1 connect with one tuple t2 of r2 b. Each tuple t1 of r1 connect with some those tuple t2 of r2 that satisfy c c. Each tuple t1 of r1 connect with all those tuple t2 of r2 that satifsy c d. None of the others

B

Which of the following is considered disadvantage of triggers? a. Triggers run every time the database fields are Inserted/updated/deleted, so it adds overhead to system. b. Triggers execute invisible to client application. It is called by the database server automatically, not by the client application or user. c. All of the others d. Unlike stored procedure, parameters cannot be used with triggers.

B

Which of the following is the correct definition of a procedure: a. Create procedure () returns ; b. All of the others c. Create procedure () ; d. Create procedure () returns return ;

B

Which of the followings is incorrect? a. In odl, an attribute is represented in the class declaration b. In odl, attributes are only integers and strings c. None of the others d. In odl, a simplest kind of property is attribute

B

Which statement is true? a. Xml documents must have a root tag b. All of the others c. Xml tags are case sensitive d. Xml elements must be properly nested

B

A join operation: a. Causes two disparate tables to be combined into a single table b. Is used to combine indexing operations c. Causes two tables with common attribute(s) to be combined into a single table d. Brings together data from two different fields

C

A type of an attribute that can be used as pointer to a user-defined Type (udt) is called ______ a. Pointer types b. None of the others c. Reference types d. Linking types

C

An attribute (or attributes) that uniquely identifies each row in a Relation is called a/an: Choose one Answer:. a. Index key b. Duplicate key c. Primary key d. Foreign key

C

An entity type whose existence depends on another entity type is called a/an _________ Entity. Choose one Answer:. A. Strong b. Codependent C. Weak D. Variant

C

Choose one Answer:. a. This operation is valid and the result has one tuple b. This operation is valid and the result has two tuples c. This operation is valid and the result has three tuples d. This operation is invalid because the attribute names of two

C

Choose the false statement about the decomposition into bcnf? Choose one Answer:. a. The decomposition eliminates all anomalies b. The relations of the decomposition are all in bcnf c. The decomposition has the dependency preservation property d. The decomposition has a lossless join

C

Choose the right statement a. Transaction is a collection of one or more operations on the Database that must be executed atomically. That is, either all Operations are performed or none of them is done. b. In sql, each statement is a transaction by itself. c. All of the others d. Sql allows us to group several statements into a single transaction.

C

Select the right statement a. Instead-of trigger is used to update the database tables associated With the view instead of updating the view directly. b. When a trigger is defined on a view, we can use instead of in place Of before or after. c. All of the others d. When an event awakens the instead-of trigger, the action of the Trigger is done instead of the event itself

C

Select the right statement a. Referential integrity constraint is also called foreign key constraint b. A foreign key constraint can be added or deleted using the 'alter Table' command c. All of the others d. A foreign key in one table points to a primary key in another table

C

Select the wrong statement a. None of the others b. An index can be created in a table to find data more quickly and Efficiently c. A table can have only one index d. The key for index can be any attribute or set of attributes, and Need not be the key of the relation

C

Suppose a relation r(a,b,c) as a bag, and a relation s=pa,b(d(r)) as a Bag, too. R has 4 tuples (1,2,2), (1,3,2), (1,2,2), and (1,2,3). S has __________ tuples. Choose one Answer:. a. 4 b. 2 c. 3 d. 1

C

Suppose a schema of relation supplierproduct is supplierproduct(no, Supplierid, producttype) where no is a identifier, supplierid is an Identifer of each supplier, and productype is a type of product which This supplier provides. What will be returned when the following sql Statement is executed? Select supplierid from supplierproduct Group by supplierid having count (*) in (select count (distinct producttype) from supplierproduct); a. A listing of supplierids, which provide all product types b. A listing of supplierids, which provide some product types c. A listing of supplierids, which provide a specified number of Product types d. No result, the query is invalid

C

Suppose relation r1 has n1 attributes and t1 tuples, relation r2 has n2 Attributes and t2 tuples, then the cartesian product r3 = r1 x r2 has ________ a. N1*n2 attributes, and t1*t2 tuples b. N1*n2 attributes, and t1+t2 tuples c. N1+n2 attributes, and t1*t2 tuples d. N1+n2 attributes, and t1+t2 tuples

C

Suppose the relation employee(ssn, fullname, salary, supervisorssn). Consider the following condition: Not exists (select * from employee where supervisorssn not in (select Ssn from employee)). Which of the following activities may violate this condition? a. Insert new employee b. Delete existing emplyee c. All of the others d. Update existing employee

C

The degree of a relationship is ______ a. The number of binary relationships b. The number of attributes in a relation c. The number of entities involved with the relationship d. The number of tuples in a relation

C

The multiplicity of a binary relationship could be _____ a. Many-to-many b. One-to-many c. All of the others d. One-to-one

C

When a check constraint associate to many tuples on one or more Relations, we must create a. Attribute-based check constraint b. Tuple-based check constraint c. Assertion d. All of the others e. Domain-based check constraint

C

Which is not a correct name for an xml element? a. &ltnote> b. &lt1dollar> c. All of the others d. &lthav1>

C

Which of the following expression is equivalent to the intersection of r And s: a. R - s b. R - (s - r) c. R - (r - s) d. S - (r - s)

C

Which of the following statement is not true: a. Problems such as redundancy that occur when we try to cram too much Into a single relation are called anomalies b. If x is a key, then x is a super key c. A relation can have only one key d. A set of one or more attributes {a1, a2, ..., an} is a key for a relation r if these attributes functionally determine all other attributes of the relation r and these attributes must be minimal

C

Which statement is true? a. All xml documents must have a dtd b. All of the others c. All xml elements must be properly closed d. All xml elements must be lower case

C

With sql, how do you select all the records from a table named "persons" Where the "lastname" is alphabetically between (and including) "nguyen" And "tran"? a. Select * from persons where lastname>'nguyen' and lastname<'tran' b. Select lastname>'nguyen' and lastname<'tran' from persons c. Select * from persons where lastname between 'nguyen' and 'tran' d. None of the others.

C

___________ is a language to access and manipulate data from a database. Even non-programmers can use it to Retrieve and update data. Choose one Answer:. a. Php b. Odbc c. Structured query language d. Asp

C

a property or characteristic of an entity type that is of interest to the organization is called a/an: a. Relationship b. Cross-function c. Attribute d. Coexisting entity

C

A person's name, birthday, and social security number are all examples of : Choose one Answer:. a. Entities b. Relationships c. Descriptors d. Attributes

D

A relationship between the instances of a single entity type is called ________ relationship. Choose one Answer:. A. Binary b. Primary C. Ternary D. Unary

D

Choose a right Answer: Choose one Answer:. a. The value of one or more attributes can uniquely identify an entity b. Entity set have associated attributes c. Relationships can have attributes d. All of the others

D

Choose a wrong Answer: Choose one Answer:. a. Binary relationship is called association in uml b. Uml class is an entity set in e/r model c. One uml class has one key d. Uml offers multi-way relationships

D

Choose the wrong statement a. A user defined type (udt) can be the type of a table b. None of the others c. A user defined type can be the type of an attribute belonging to Some table d. A user defined type (udt) cannot be the type of a table

D

Choose the wrong statement a. The existence of an index on an attribute may speed up the execution Of certain queries b. The most useful index on a relation is an index on its key. c. None of the others d. An index makes update operations on a relation faster

D

Consider a relation with schema r(a, b, c, d) and the set of fds: bc -> D, d -> a, a -> b. Compute {ac}+ a. {a, c, d} b. {a, b, c} c. {a, c} d. {a, b, c, d}

D

Function parameters may be of mode __________ Choose one Answer:. a. Inout b. All of the others c. Out d. In

D

Given a relation r(a,b,c,d) with dependencies a-->c, c->d. Which of the Followings doesn't hold in r? Choose one Answer:. a. C->->d b. A->->d c. A->d d. A->c

D

In the sql language, the __________ statement is used to create table definitions. Choose one Answer:. a. Select b. Create session c. Create index d. Create table

D

One attribute is called prime if __________ Choose one Answer:. a. It is a member of candidate key b. It is a member of super key c. It is a member of primary key d. It is a member of key

D

Question 1 The principle strategy to convert subclasses to relations is _________ Choose one Answer:. a. Follow the e/r viewpoint b. Treat entities as objects belonging to a single class c. Use null values d. All of the others

D

Suppose a relation project(projectid, projectname, location, department, Projectlo1(projectid, projectname, department) is an updatable view Associated to project where location=1. Evaluate the following statement: Insert into projectlo1 (projectid, projectname, department) values (200,'erp1.0',1); a. The query is executed, there is new tuple (200,'erp1.0',1) on Projectlo1, and new tuple (200,'erp1.0',1,1) on project b. The query is executed, there is no new tuple on projectlo1, and new Tuple (200,'erp1.0',null,1) on project c. The query is executed, there is new tuple (200,'erp1.0',1) on Projectlo1, and new tuple (200,'erp1.0',null,1) on project d. The query is executed but nothing happened on project neither on Projectlo1

D

Suppose a relation r(a,b) and s(b,c) as a bags. R has 2 tuples (1,2), (1,4) and s has 3 tuples (2,3), (4,5) and (4,5). The theta-join r ? _r.b<s.b s has __________ tuples Choose one Answer:. a. 3 b. 4 c. 5 d. 2

D

The database language that is used to query and modify the database is Called _______ a. All of the others b. Data control language c. Data definition language d. Data manipulation language

D

To convert a bag to a set, we use _________ operator Choose one Answer:. a. P b. ? c. D d. S

D

Which of the following is not a valid loop construct in psm? a. Repeat until end repeat; b. Loop end loop; c. While do end while; d. None of the others

D

Which of the following is not true about stored procedure? a. Stored procedures can enhance security control (users can be granted Permission to execute a stored procedure independently of underlyingTable permissions) b. Stored procedures can replace stored functions to improve performance c. Stored procedures can reduce/avoid network traffic d. None of the others

D

Which of the following is software used to create, maintain, and provide controlled access to databases? Choose one Answer:. a. Attribute b. Network operating system c. User view d. Database management system

D

Which of the following isolation levels forbids the reading of dirty data? a. Set transaction isolation level read uncommited; b. Set transaction isolation level serializable; c. Set transaction isolation level read committed; d. Set transaction isolation level repeatable read;

D

With sql, how can you insert "trinh" as the "lastname" in the "persons" Table? a. None of the others b. Insert into persons ('trinh') into lastname c. Insert ('trinh') into persons (lastname) d. Insert into persons (lastname) values ('trinh')

D


Ensembles d'études connexes

Money and Banking: Module 4 - Chapter 4

View Set

Serology Composition and Testing Quiz

View Set

A5_M4 Agreed-Upon Procedures and Prospective Financial Statements

View Set

Cuando se usa la letra c en español

View Set

Questions missed on practice exam

View Set

2. Support your business goals with Google Ads

View Set

Radiology review questions chapters 11, 12, 26, 27, 18, 19, 29, 30, 24, 25, 28

View Set