Total DBI

Ace your homework & exams now with Quizwiz!

b

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

d

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

a

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

b

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

a

In PSM, the difference between a stored procedure and a function is that: a. A function has the return statement. b. We can declare local variables in a function. c. Loops are not allowed in a function. d. All of the others.

c

QN=10 (6809) A database administrator (DBA) is a person that is also known by the title: a. Database Analyst b. Database Tuner c. Database Coordinator or Database Programmer d. Database Modeller

b

QN=10 (6830) Which one of the following is NOT a DML command? a. DELETE b. ALTER TABLE c. INSERT d. UPDATE

b

QN=10 (7972) Let R(ABCD) be a relation with functional dependencies {A -> B, C -> B, B -> D} What is the key for R (choose one) a. AB b. AC c. AD d. BD

a

QN=13 (7978) The relation R(ABCD) has following FDs: { A -> B ; B -> A ; A -> D ; D -> B } a. R is in 3NF b. R is not in 3NF c. R is not in 2NF d. None of the others

a

QN=14 (7970) What is a key attribute in a relation? a. A key attribute is an attribute that belongs to one of the keys of the relation b. A key attribute is an attribute that belongs to one of the super keys of the relation

a

QN=15 (7999) What is the difference between the 2NF and the 3NF? a. 2NF deals with partial functional dependency, while 3NF deals with transitive functional dependency b. 2NF deals with transitive functional dependency, while 3NF deals with partial functional dependency

e

QN=16 (7991) 3NFconcept is related to (choose 1 answer only): a. Atomic definition b. Full dependency definition c. Transitive dependency definition d. Super Key definition e. All of the others

a

QN=16 (7993) What is "de-normalization"? a. De-normalization means allowing redundancy in a table b. De-normalization means allowing duplicate columns appeared in a table c. De-normalization means allowing a table to have more than 3 columns d. De-normalization means allowing a table to have more than 1024 columns

d

QN=18 (8022) The key for a weak entity set E is ......... a. Zero or more attributes of E b. The set of attributes of supporting relationships for E c. The set of attributes of supporting entity sets d. Zero or more attributes of E and key attributes from supporting entity sets

b

QN=24 (8238) Consider the law, that holds for set relations: T intersect(R union S) = (T intersect R) union (T intersect S) The above law still hold for bag relations? a. True b. False

a

QN=19 (8019) A class in UML is similar to........... a. An entity set in E/R model b. An attribute in E/R model c. A Relationship in E/R model d. None of the others

b

QN=2 (6801) Choose the most correct statement. a. Database is created and maintained by a DMBS b. All of the others c. Database is a collection of data that is managed by a DBMS d. Database is a collection of information that exists over a long period of time

a

QN=2 (6808) What is a database? a. A database is a collection of information that is organized so that it can easily be accessed, managed, and updated b. A database is a collection of data files c. A database is a collection of records d. A database is a collection of tuples

d

QN=20 (8005) Which of the following statements is true? a. BCNF condition guarantees the non existence of the anomalies. b. In BCNF condition, the left side of every non trivial FD must be a super key. c. Any two-attribute relation is in BCNF. d. All of the others.

a

QN=20 (8013) A(n) _____ provides a means to analyze business requirements so as to standardize organizational vocabulary, enforce business rules, and ensure adequate data quality a. Entity Relationship Diagram b. Relation Schema Design c. All of the others d. None of the others

a

QN=21 (7995) How to eliminate anomalies when we design a database? a. We should decompose relation to eliminate anomalies b. We should join relations to eliminate anomalies c. We should union relations to eliminate anomalies d. None of the others

a

QN=21 (8032) An association class in UML is similar to ______ in the ER model a. attributes on a relationship b. Attributes c. Entities d. entity sets

a

QN=22 (7994) What is the goal of decomposition when designing a database? a. The goal of decomposition is to replace a relation by several relations that do not exhibit anomalies b. The goal of decomposition is to increase the speed of the database c. The goal of decomposition is to increase the security of the database d. None of the others

a

QN=25 (8010) Look at the following statements: (a)We should pick the right kind of elements (b) When an entity has no non-primary key attribute, we should convert that entity to an attribute (c) Use weak entities when-ever possible (d) Always make redundancies a. (a) and (b) are correct b. (a) and (c) are correct c. (a) and (d) are correct d. (b) and (c) are correct

a

QN=25 (8236) Choose the correct statement: a. Aggregate functions perform a calculation on a set of values and return a single value b. Aggregate functions perform a calculation on a single value and return a single value c. Aggregate functions perform a calculation on a set of values and return a relation d. Aggregate functions perform a calculation on a set of values and return a row

b

QN=26 (8017) The ER Diagram uses three principle element types: a. Entity sets, Attributes and Constraints b. Entity sets, Attributes, and Relationships c. Attributes, Constraints, and Relationships d. Entity sets, Constraints, and Relationships

a

QN=26 (8507) Suppose the relation S(B,C,D) has tuples: B C D ------------------------------------ a 4 6 c 6 8 c 5 5 e 9 9 F 10 10 c 7 9 Compute the result of the following query: SELECT SUM(D) FROM S WHERE D < 8 AND D > 5 Choose the row that appears in the computed result. a. 6 b. 7 c. 8 d. 9

c

QN=27 (8030) The binary relationship between classes in UML is called ... a. Aggregation b. Composition c. Association d. Relation

c

QN=27 (8500) Suppose the relation S(B,C,D) has tuples: B C D ----------------------------------- a 4 6 c 6 8 c 5 5 e 9 9 f 10 10 c 7 9 Compute the result of the following query: SELECT D, SUM(C) FROM S GROUP BY D Choose rows that are appear in the computed result a. (9,12) b. (9,14) c. (9,16) d. (9,18)

a

QN=28 (8231) Consider the Datalog rule H(x,y) <- S(x, 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 (3, 5) b. H has a tuple (2, 3) c. H has 2 tuples (2, 3) and (3, 5) d. H has 3 tuples (2, 3) and (3, 5) and (4, 6)

b

QN=29 (8224) Consider the law, that holds for set relations: (S intersect T) - R = S intersect (T - R). The above law still hold for bag relations? a. True b. False

a

QN=29 (8513) The table Arc(x,y) currently has the following tuples (note that there are duplicates): (1,2), (1,2), (2,3), (3,4), (3,4), (4,1), (4,1), (4,1), (4,2). Compute the result of the query: SELECT a1.x, a2.y, COUNT(*) FROM Arc a1, Arc a2 WHERE a1.y = a2.x GROUP BY a1.x, a2.y; Which of the following tuples is in the result? a. (3,1,2) b. (1,3,4) c. (2,4,6) d. (3,2,6)

b

QN=3 (6802) Which of following is never used as a data model? a. Hierarchical data model b. None of the others c. Graph-based data model d. Tree-based data model e. Relational data model

a

QN=30 (8232) Suppose that tuple t appears, respectively, x, y, and z times in the relations X, Y, and Z. Let t appear w times in the relation: X union (Y intersect Z). Which of the following inequalities is true ? a. w <= x+y b. w <= y+z c. w >= z d. w <= max(x,y)

a

QN=30 (8517) How we can understand about this statement: "All aggregate functions are deterministic"? a. This means aggregate functions return the same value any time they are called by using a specific set of input values b. This means aggregate functions return the different values each time they are called by using a specific set of input values c. This means aggregate functions return the same value any time they are called by using any set of input values d. None of the others

a

QN=31 (7979) The relation R(ABCD) has following FDs: {ACD -> B ; AC -> D ; D -> C ; AC -> B} Choose the correct statement about R: a. R is in 3NF b. R is in 2NF only, not higher c. R is in 1NF only, not higher d. None of the others

b

QN=31 (8238) Consider the law, that holds for set relations: T intersect(R union S) = (T intersect R) union (T intersect S) The above law still hold for bag relations? a. True b. False

c

QN=31 (8523) When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S, which conditions on R and S must be satisfied? a. R and S must have schemas with identical sets of attributes and the types (domains) for each attributes must be the same in R and S b. Before we compute the set-theoretic union, intersection, or difference of sets of tuples, the columns of R and S must be ordered so that the order of attributes is the same for both relations c. All of the others

b

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

a

QN=32 (8507) Suppose the relation S(B,C,D) has tuples: B C D ------------------------------------ a 4 6 c 6 8 c 5 5 e 9 9 F 10 10 c 7 9 Compute the result of the following query: SELECT SUM(D) FROM S WHERE D < 8 AND D > 5 Choose the row that appears in the computed result. a. 6 b. 7 c. 8 d. 9

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

d

QN=34 (8501) Suppose the relation S(B,C,D) has tuples: B C D ------------------------------------ a 4 6 c 6 8 c 5 5 e 9 9 F 10 10 c 7 9 Which one of the followings will appear in the result of the following query: SELECT B, SUM(C) FROM S GROUP BY B a. (c,11) b. (c,13) c. (c,12) d. (c,18)

a

QN=34 (8539) For what values of x, y, and z, including NULL, does the Boolean expression x <= 4 OR NOT(y >= 2 AND z = 10) have the truth value FALSE? Identify one of those values from the list below a. x = 5, y = 3, z = 10 b. x = 3, y = 1, z = 10. c. x = NULL, y = 2, z = 10. d. x = NULL, y = 3, z = 10.

b

QN=35 (8503) 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 COUNT(*) FROM Employee b. SELECT DepartmentNo, COUNT(*) FROM Employee GROUP BY DepartmentNo c. SELECT DepartmentNo, COUNT(*) FROM Employee d. None of the others

d

QN=36 (8505) Suppose the relation S(B,C,D) has tuples: B C D ------------------------------------ a 4 6 c 6 8 c 5 5 e 9 9 f 10 10 c 7 9 What row that appears in the result of the following query: SELECT SUM(C), SUM(D) FROM S WHERE D < 9 AND D > 5 a. (10,11) b. (10,12) c. (10,13) d. (10,14)

a

QN=36 (8542) What does NULL mean? a. The value NULL means UNKNOWN b. The value NULL means '' (empty string) c. The value NULL means ' ' (space character) d. The value NULL means ZERO

c

QN=37 (8523) When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S, which conditions on R and S must be satisfied? a. R and S must have schemas with identical sets of attributes and the types (domains) for each attributes must be the same in R and S b. Before we compute the set-theoretic union, intersection, or difference of sets of tuples, the columns of R and S must be ordered so that the order of attributes is the same for both relations c. All of the others

d

QN=37 (8550) What is the value of the query: SELECT 'Nancy' + NULL + 'Smith' when evaluated on Microsoft SQL Server? a. 'Nancy Smith' b. 'Nancy' c. 'NancySmith' d. NULL

b

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

a,b

QN=38 (8532) Here are two relations, R(A,B), S(C,D). Their current values are: R A B ------------------- 1 4 2 5 8 6 4 7 S C D ------------------- 0 1 1 0 2 1 5 8 Compute the result of the query: SELECT A, B, C, D FROM R RIGHT OUTER JOIN S ON R.A = S.C Identify, in the list below, 2 rows that appears in the result. a. (null, null, 0, 1) b. (null, null, 5, 8) c. (8, 6, null, null) d. (4, 7, null, null)

d

QN=39 (8005) Which of the following statements is true? a. BCNF condition guarantees the non existence of the anomalies. b. In BCNF condition, the left side of every non trivial FD must be a super key. c. Any two-attribute relation is in BCNF. d. All of the others.

a

QN=39 (8558) Three properties of a lock in DBMS are: a)Granularity: the size of the lock b) Granularity: the type of the lock c) Mode: the type of the lock d) Duration: the time in seconds that the DBMS waits for a lock to be released a. (a) and (c) and (d) are true b. (a) and (b) and (d) are true c. (b) and (c) and (d) are true d. (a) and (b) and (c) are true

a

QN=4 (6795) In _____ Data Model, the data and relations between them are organized in tables a. Relational b. Network c. Flat-file d. Object-oriented e. Tree-based

c

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

a

QN=40 (8534) A tuple which fails to participate in a join is called: a. dangling tuple b. child tuple c. parent tuple d. neighbor tuple

c

QN=42 (8575) What is the difference between the WHERE and HAVING SQL clauses? a. The WHERE and the HAVING clauses are identical b. The HAVING SQL clause condition(s) is applied to all rows in the result set before the WHERE clause is applied (if present). The WHERE clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group c. The WHERE SQL clause condition(s) is applied to all rows in the result set before the HAVING clause is applied (if present). The HAVING clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group d. None of the others

a

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

a

QN=43 (8554) For what values of x, y, and z, including NULL, does the Boolean expression x <= 100 AND NOT(y >= 15 OR z = 35) have the truth value UNKNOWN? Identify one of those values from the list below. a. x = NULL, y = 0, z = 4. b. x = -2, y = -2, z = -2. c. x = 3, y = 0, z = 7. d. x = 2, y = -1, z = 6.

d

QN=43 (8599) Choose the correct statement. a. You can remove a trigger by dropping it or by dropping the trigger table. b. The syntax to remove a trigger is: DROP TRIGGER <trigger_name> c. Use ALTER TRIGGER to change the definition of a trigger d. All of the others.

a

QN=44 (8551) Choose one correct statement: a. No two null values are equal b. Two null values are equal c. Comparisons between two null values, or between a NULL and any other value, return FALSE

b

QN=44 (8585) Suppose R and S are 2 relations. R is the parent of S. And the relationship between R and S is set to "ON DELETE CASCADE". This means that: a. We can delete a row from R if that row has children in S (and in this case, the database server will raise up an error) b. We can delete a row from R although that row has children in S (and in this case, all the children will be deleted too)

a

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

a

QN=45 (8592) To create a DEFAULT constraint on the "City" column of the table PERSON which is already created, use the following SQL: a. ALTER TABLE Person ALTER COLUMN City SET DEFAULT 'SANDNES' b. ALTER TABLE Person EDIT COLUMN City SET DEFAULT 'SANDNES' c. ALTER TABLE Person UPDATE COLUMN City SET DEFAULT 'SANDNES' d. ALTER TABLE Person MODIFY COLUMN City SET DEFAULT 'SANDNES'

d

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

c

QN=47 (8609) A(an) _____ asserts that a value appearing in one relation must also appear in the primary-key component(s) of another relation a. Unique key constraint b. Primary key constraint c. Foreign key constraint d. Candidate key constraint

b

QN=48 (8573) Suppose we have a relation instance R(A,B,C) as following: R A B C ---------------------------------- 1 2 3 4 5 6 7 8 9 Which is the result of the query: SELECT SUM(B) FROM R WHERE C > 10 a. 0 b. NULL c. 3 d. 10

a

QN=5 (6833) Why the intersection operator is not called a primitive relational algebra operator? a. Because the intersection operator can be expressed through the union operator and the difference operator b. Because the intersection operator can be expressed through the selection operator and the projection operator c. Because the intersection operator can be expressed through the product operator and the projection operator d. Because the intersection operator can be expressed through the selection operator and the product operator

a

QN=57 (9192) ______ is a set of markup declarations that define a document type for SGML-family markup languages (SGML, XML, HTML) a. Document Type Definition b. Document Definition Language c. Document Manipulation Language d. Document Control Language

d

QN=50 (8620) Select the most correct answer a. An index is a data structure used to speed access to tuples of a relation, given values of one or more attributes b. The key for index can be any attribute or set of attributes, and need not be the key of the relation c. We can think of the index as a binary search tree of (key, locations) pairs in which a key a is associated with a set of locations of the tuples d. All of the others.

b

QN=52 (8616) The most useful index on a relation is an index on its key. This is because: a. The index on non key attribute(s) runs slower b. The search operation based on the primary key is commonly used. c. The index on non key attribute(s) makes update operations to the relation more complex and time-consuming d. All of the others

a

QN=55 (9168) The benefits of stored procedures are: (a)They improve the security by letting the admin to LIMIT the access rights of users (b) They can save a lot of storage space (c) They can be reused many times (d) They can store a part of the database in order to retrieve the data more quickly a. (a) and (c) are true b. (a) and (b) are true c. (a) and (d) are true d. (b) and (d) are true

a

QN=55 (9182) The aim for the Object-relational database is to bridge the gap between conceptual data modelling techniques such as Entity-relationship diagram (ERD) and object-relational mapping (ORM), which often use classes and inheritance, and relational databases, which do not directly support them a. True b. False

c

QN=56 (9186) 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 ( name CHAR(30), address CHAR(100) ); a. CREATE TABLE MovieStar (name StarType ); b. CREATE TABLE MovieStar (name StarType PRIMARY KEY ); c. CREATE TABLE MovieStar OF StarType (); d. None of the others

d

QN=56 (9189) Choose the correct statement: a. A User-Defined Type (UDT) in SQL can be the type of a table b. A UDT can be the type of an attribute belonging to some table c. The form of UDT definition is: CREATE TYPE T AS (<primitive type | attribute declarations>) d. All of the others

b

QN=58 (9198) A ____ document defines the XML document structure with a list of legal elements and attributes a. XML b. DTD c. XSLT d. SGML

a

QN=59 (9196) Select the well-formed XML. a. <? xml version = "1.0" ?> <MovieData> <Movie title="StarWar"><Year>1997</Year></Movie> </MovieData> b. <? xml version = "1.0" ?> <MovieData> <Movie title="StarWar"><Year>1997</Year></Movie> </Movies> c. <? xml version = "1.0" ?> <MovieData> <Movie title="StarWar"><Year>1997</Movie></Year> </MovieData> d. All of the others.

c

QN=6 (6814) In SQL , the command/statement that let you add an attribute to a relation schema is ....... a. Insert b. Update c. Alter d. None of the others

a

QN=60 (9207) A ____ is the framework under which data may exist and SQL operations on data may be executed a. SQL Environment b. SQL Statement c. SQL Parser d. SQL Optimizer

c

QN=60 (9211) A _____ specifies which characters are "less than" which other characters a. Domains b. Character set c. Collation d. Stored procedure

b

QN=7 (6803) A ____ is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and being designed, built and populated with data for a specific purpose a. Database Instance b. Database c. Schema d. Schema Instance

a

QN=7 (6826) To update a relation's schema, which one of the following statements can be used? a. ALTER TABLE b. SELECT c. INSERT d. UPDATE

a

QN=8 (6832) Schema-altering commands are known as _________ commands. a. Data Definition Language b. Data Manipulation Language c. Data Controlling Language d. None of the others

d

QN=9 (7961) Given a relation R(A,B,C,D). Which of the followings is trivial? a. A->AB b. A->->AB c. A->BCD d. A->->BCD

d

Referential integrity Constraints control relationships between .... a. attributes in a table b. operations of an object c. database instances d. tables in a database

c

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

b

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

d

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

c

QN=33 (7975) Let R(A,B,C,D) with the following FDs: {AB->C, AC->B, AD->C} Choose a correct statement about R: a. R is in BCNF b. R is in 3NF c. R is in 2NF d. None of the others

a

QN=33 (8522) The table Arc(x,y) currently has the following tuples (note there are duplicates): (See picture) Compute the result of the query: SELECT x, COUNT(y) FROM Arc GROUP BY x; Which of the following tuples is in the result? [file:8522.jpg] a. (4,4) b. (4,5) c. (4,6) d. (4,7) e. (4,8)

b,d

QN=33 (8528) Suppose relation R(A,B) has the tuples: A B ------------------- 10 x 30 y 50 z 70 t and the relation S(B,C,D) has tuples: B C D ------------------------------------ x 40 60 z 60 80 z 50 50 z 70 90 Compute the right outer join of R and S, where the condition is: R.B = S.B. Then identify 2 tuples of R that do not appear in the computed result. a. (10,x) b. (30,y) c. (50,z) d. (70,t)

a

QN=57 (9187) A ____ table is a table that is embedded within another table a. Nested b. Primitive c. Parent d. Child


Related study sets

Wounds-Chapter 11: Inflammation and Healing

View Set

Ethics, Clients' Rights, and Legal and Forensic Issues - Ch. 5

View Set

English 7 - Plagiarism - Knowledge Check

View Set

IELTS: Transportation [Paraphrase]

View Set