Database Test 1

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

What is an attribute? a. A column in a table b. A constraint assigned to a relationship c. Relations between two tables d. A row in a table

A column in a table.

! _____ is a set of elements from which an attribute can be assigned a value. a. table b. tuple c. domain d. relation

Domain

True or False: A NULL value stored in some attribute may indicate that a constraint was violated.

F

True or False: A category must hold the union of all its entities in its superclasses.

F

True or False: As with relational databases, SQL treats tables strictly as sets of tuples.

F

True or False: Classification and identification are inverse processes.

F

True or False: Deleting a tuple with the option CASCADE means that any tuple that references the deleted tuple will be altered, so that the reference to the deleted tuple is now NULL.

F

True or False: NULL values are ignored when using the GROUP BY clause.

F

True or False: Physical data independence is the capacity to change the conceptual schema without changing external schemas or applications.

F

True or False: Queries will always remove duplicate values.

F

True or False: Relationships between entities are shown by rectangles.

F

True or False: Ternary relationships represent the same information as three binary relationships would.

F

True or False: The default ordering of rows in a SELECT query is ascending order by primary key.

F

True or False: The following is a legal way to specify a view in SQL: CREATE VIEW WORKS_ON1 AS SELECT Fname, Lname, Pname, Hours WHERE Ssn=Essn AND Pno = Pnumber;

F

True or False: There is only one notation for ER diagrams.

F

True or False: There is only one way to specify the same query in SQL.

F

True or False: UNIQUE is a function that returns the number of unique items in the query results.

F

True or False: You ALWAYS have to specify the attributes in an insert statement.

F

True or False: You can ONLY use the CASE construct with an UPDATE query.

F

True or False: You can rename attributes by using the RENAMED keyword.

F

Storage and retrieval of images often require extensions to the capabilities of traditional database systems.

T

True or False: SELECT SUM(Salary) / COUNT(*) FROM EMPLOYEE; is equivalent to SELECT AVG(Salary) FROM EMPLOYEE;

T

True or False: "Parametric Users" are database users who have a small set of operations ("small" compared to database administrators' set of commands) that they perform repeatedly.

T

True or False: A foreign key is an attribute in one table that uniquely references some tuple in another table.

T

True or False: A person's age is best handled as a derived attribute.

T

True or False: AND, OR, and NOT are all valid logic connectives in SQL.

T

True or False: An object instance's relationship to its class is often called IS-A-MEMBER-OF.

T

True or False: Both TRIGGERs and ASSERTIONs have names associated with them. (i.e. Assertion called BDATE_CONSTRAINT)

T

True or False: Constraints can be named.

T

True or False: Generalization is the process of generating superclasses from a group of subclasses with common features.

T

True or False: INNER JOIN and OUTER JOIN are two types of join statements.

T

True or False: In an EER diagram, subclasses are denoted by this relationship between classes: SUPERCLASS | U | SUBCLASS

T

True or False: MANAGER might be an example of a subclass for EMPLOYEE.

T

True or False: Nested queries may use the keyword IN to nest the queries.

T

True or False: Referential integrity constraints can be specified in SQL.

T

True or False: SQL has commands for granting or revoking of privileges to users.

T

True or False: Tables, rows, and columns are the SQL equivalent of relations, tuples, and attributes respectively.

T

True or False: Ternary relationships involve three entity types.

T

True or False: The ER in ER model stands for entity-relationship.

T

True or False: The WHERE clause in the DELETE statement is not required if you want to delete all records in that table.

T

True or False: The default join operation in SQL is an inner join.

T

True or False: The degree of a relation is the number of attributes in its relation schema.

T

True or False: The following is a valid ASSERTION statement: CREATE ASSERTION SALARY_CONSTRAINT CHECK ( NOT EXISTS ( SELECT * FROM EMPLOYEE E, EMPLOYEE M, DEPARTMENT D WHERE E.Salary>M.Salary AND E.Dno=D.Dnumber AND D.Mgr_ssn=M.Ssn ) );

T

True or False: The following is a valid TRIGGER statement: CREATE TRIGGER SALARY_VIOLATION BEFORE INSERT OR UPDATE OF SALARY, SUPERVISOR_SSN ON EMPLOYEE FOR EACH ROW WHEN ( NEW.SALARY > ( SELECT SALARY FROM EMPLOYEE WHERE SSN = NEW.SUPERVISOR_SSN ) ) INFORM_SUPERVISOR(NEW.Supervisor_ssn, NEW.Ssn );

T

True or False: The following query will return names of employees who were born in the 1960s using the textbook's EMPLOYEE table. SELECT Fname, Minit, Lname FROM EMPLOYEE WHERE Bdate LIKE '196_-_ _-_ _';

T

True or False: UML diagrams show unidirectional and bidirectional associations differently.

T

True or False: Using the GROUP BY clause partitions the relation into nonoverlapping sets of tuples.

T

True or False: Weak entities normally have a partial key.

T

True or False: You can add/drop columns and constraints on tables in SQL through the ALTER command.

T

True or False: You can insert or update a field to NULL, assuming no constraints are violated.

T

True or False: You can reference more than one table in a SELECT query.

T

True or False: You can specify NULL or a DEFAULT value as the UPDATEd value.

T

True or False: You could use a view to set what certain users see in the database.

T

Which of the following is NOT a valid comparison operator in SQL? a. != b. > c. <= d. <>

a. !=

Which of the following is NOT an implicit property of databases? a. The file structures underlying the database are easily accessible to the end user. b. A database is a logically coherent collection of data with some inherent meaning. c. A database represents some aspect of the real world. d. A database is designed, built, and populated with data for a specific purpose.

a. The file structures underlying the database are easily accessible to the end user.

Information that defines a database structure and constraints. a. Attributes b. meta-data c. Keys d. NOSQL e. Data independence

b. meta-data

A retrieval query in SQL can consist of up to ___ clauses, but only the first ___ are mandatory. a. 5, 2 b. 5, 1 c. 6, 1 d. 6, 2

d. 6, 2

Which of the following is NOT a main phase in database design? a. Logical Design b. Conceptual Design c. Physical Design d. User Interface Design

d. User Interface Design

Conditions that must hold for the data stored in a database. a. transactions b. regulation c. isolation d. atomicity e. integrity constraints

e. integrity constraints

A form of rule activated by updates to a table, which results in performing some additional operations to other tables. a. proceudre b. standard c. security d. model e. trigger

e. trigger

A(n) ____ is a thing or object in the real world with an independent existence. a. attribute b. schema c. relationship d. entity

entity

What is NOT an option if a query causes integrity violation? a. set NULL b. reject c. cascade d. ignore

ignore

What is NOT one of the four abstraction concepts used in semantic data models (like the EER model?) a. pipelining b. aggregation and association c. classification and instantiation d. identification

pipelining

The _____ is the answer to the user's query. a. retrieval b. transaction c. modification d. result relation

result relation

What constraint is not mentioned in the chapter? a. tuple constraints b. semantic constraints c. referential integrity constraints d. domain constraints

tuple constraints

Which of the following is NOT a typical use of triggers? a. replace the CHECK keyword when looking at attributes b. maintain database consistency c. update derived data automatically d. monitor database updates

ALL of em

_______ is an abstraction concept for building composite objects from their component objects. a. Association b. Aggregation c. Generalization d. Identification

Aggregation

What is a candidate key? a. Foreign keys b. Only the primary key c. Any set of attributes that uniquely identify a tuple d. Attributes that do NOT uniquely identify a tuple

Any set of attributes that uniquely identify a tuple.

What does the circle with the U inside it represent in an EER diagram? a. set union operation b. overlapping set c. unitary operator d. disjoint set

Set Union Operation

________ is the process of classifying a class of objects into more specific subclasses. a. specialization b. relationship c. base class d. generalization

Specialization

________ is the process of defining a set of subclasses of and entity type. a. Superclass b. Synthesis c. Generalization d. Specialization

Specialization

What does SQL stand for? a. Structured Query Language b. System Query Linguistics c. Standard Query Language d. Synchronized Query Language

Structured Query Language

What is NOT a guideline in designing EER concepts? a. If a subclass has few specific attributes and no specific relationships, it can be merged into the superclass. b. Union types and categories should be avoided unless necessary. c. Many specializations and subclasses can be defined to make the conceptual model accurate. d. Use as many subclasses as possible to define the model.

Use as many subclasses as possible to define the model.

_____ are used to summarize info from multiple tuples into a single-tuple summary. a. Aggregate functions b. Multiway joins c. Descriptors d. Joined relations

a. Aggregate functions

_____ is used to specify additional types of constraints that are outside the scope of the built-in relational model constraints. a. CREATE ASSERTION b. CREATE CONSTRAINT c. CREATE VIEW d. CREATE TABLE

a. CREATE ASSERTION

Constraints are ______. a. when a value is invalid or unknown b. restrictions on the values in a database state c. the interpretations of a database d. a mapping of a relation schema to the union of attribute domains

Restrictions on the values in a database state.

Which of the following CHECK statements checks to see if d_num is between 0 and 21 exclusive? a. CREATE DOMAIN d_num AS INTEGER CHECK (d_num > 0 AND d_num < 21); b. CREATE DOMAIN d_num AS INTEGER CHECK (d_num > 0 AND <= 20); c. CREATE DOMAIN d_num AS INTEGER CHECK (d_num >= 0 AND d_num < 21); d. CHECK (d_num > "0" AND d_num <= "20") CREATE DOMAIN d_num AS INTEGER;

CREATE DOMAIN d_num AS INTEGER CHECK (d_num > 0 AND d_num < 21);

_______ involves assigning similar entities to object entity types systematically a. identification b. instantiation c. classification d. aggregation

Classification

What does the EER in EER model stand for? a. Employee-Employee Relational b. Enhanced Entity-Relationship c. Extreme Entity-Relationship d. Enhanced Entity Requirements

Enhanced Entity-Relationship

What is NOT a type of subclass? a. User-defined b. Condition-defined c. Predicate-defined d. Entity-defined

Entity-defined

What is NOT an operation mentioned in the book? a. Reorder b. Insert c. Delete d. Update

Reorder

Inheritance (subclasses to superclasses) is often called an ______________ relationship. a. ANSWERS TO b. HAS-A c. CONTAINS d. IS-A

IS-A

What is the relationship between a subclass and its superclass? a. HAS-A b. IS-A-PART-OF c. IS-AN-INSTANCE-OF d. IS-A

IS-A

Which type of specialization constraint specifies that an entity may not belong in any subclass (but belongs to the superclass)? a. Disjoint specialization b. Total specialization c. Partial specialization d. Nonexistent specialization

Partial Specialization

What is used to uniquely identify tuples in a table? a. Foreign key b. Trigger c. Relational state d. Primary key

Primary key

What constraints can a delete operation violate? a. Entity integrity b. State integrity c. Semantic integrity d. Referential integrity

Referential integrity

Which of the following is a part of both EER and ER models? a. relationships b. subclasses c. superclasses d. generalization

Relationships

Which is NOT true about the information stored in tables? a. Each row is called a tuple. b. The relation name is the name of the table. c. The degree is the number of rows in the table. d. Each column is called an attribute.

The degree is the number of rows in the table.

What is the difference between a specialization hierarchy and a specialization lattice? a. The hierarchy requires each subclass be connected to only one superclass, while the lattice allows connections to more than one superclass. b. The hierarchy requires each subclass be connected one or more superclasses, while the lattice connects it to just one superclass. c. The hierarchy allows disjoint sets, while the lattice does not. d. The hierarchy allows disjoint and overlapping sets, while the lattice does not.

The hierarchy requires each subclass be connected to only one superclass, while the lattice allows connection to more than one superclass.

Which of the following queries deletes all employees who work in department number 11? a. DELETE FROM EMPLOYEE WHERE Dno=11; b. DELETE FROM EMPLOYEE; c. DELETE WHERE Dno=11 FROM EMPLOYEE; d. DELETE FROM EMPLOYEE WHERE Dno='11';

a. DELETE FROM EMPLOYEE WHERE Dno=11;

Which of the following is NOT a type of attribute mentioned in the book? a. Descriptive b. Derived c. Single-valued d. Multivalued

a. Descriptive

Which of the following is NOT a naming convention mentioned for ER diagrams? a. ER diagrams should be read from bottom to top and from right to left. b. Verbs are used as relationship names. c. Singular names are used for entities, rather than plural ones. d. Nouns are used as entity names.

a. ER diagrams should be read from bottom to top and from right to left.

From a conceptual standpoint, in what order are the clauses in a query evaluated? Assume all clauses are there. a. FROM, WHERE, GROUP BY, HAVING, ORDER BY, SELECT b. SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY c. FROM, GROUP BY, HAVING, WHERE, ORDER BY, SELECT d. FROM, WHERE, ORDER BY, SELECT, GROUP BY, HAVING

a. FROM, WHERE, GROUP BY, HAVING, ORDER BY, SELECT

Which of the following is NOT a basic data type in SQL? a. Object b. Boolean c. Time d. Integer

a. Object

Which of the following symbols is associated with attributes in ER diagrams? a. Oval connected to the entity b. Rectangle c. Rectangle inside a rectangle d. Diamond connecting two entities

a. Oval connected to the entity

Which shape is used for entities in an ER diagram? a. Rectangle b. Line c. Oval d. Diamond

a. Rectangle

Which of the following is correct SELECT query syntax? a. SELECT <attribute list> FROM <table list> WHERE <condition>; b. FROM <table list> SELECT <attribute list> WHERE <condition>; c. FROM <table list> WHERE <condition> SELECT <attribute list>; d. SELECT <attribute list> WHERE <condition>;

a. SELECT <attribute list> FROM <table list> WHERE <condition>;

Which of the following is an example of a key attribute? a. Using SSNs in an Employee table b. Using grades in a Student table c. Using birth dates in a Dependent table d. Using first names in a Manager table

a. Using SSNs in an Employee table

_______ entities do not have key attributes of their own. a. Weak b. Strong c. Partial d. Regular

a. Weak

What is view materialization? a. actually creating a view table when the view is first queried/created and assuming the other queries will follow b. checking the data in the view table before querying/updating it c. modifying the view query into a query on the underlying base tables d. updating the material inside the view as soon as data is changed in the underlying base tables

a. actually creating a view table when the view is first queried/created and assuming the other queries will follow

A __________ is a data abstraction that is used to provide the conceptual representation of data stored in a database. a. data model b. physical design c. requirement d. transatcion e. file

a. data model

Which of the following is NOT a method used to update data in a view table? a. materialized update b. lazy update c. periodic update d. immediate update

a. materialized update

Which of the following are NOT used in conceptual data models? a. servers b. relationships c. attributes d. entities

a. servers

Which of the following describes a NATURAL JOIN? a. the join condition is automatically on equality of attributes with the same name in the two tables b. nested join statements c. join the 2 relations based on their primary keys d. a tuple is included in the result only if the foreign key is NULL

a. the join condition is automatically on equality of attributes with the same name in the two tables

What is the term for a "virtual" table that is derived from other tables? a. view b. base table c. query d. schema

a. view

What element is NOT a schema element? a. view b. application c. domain d. table

application

What is an attribute? a. An object in the real world with an independent existence b. A particular property that describes an entity c. A mapping of the internal database files d. A collection of similar entities

b. A particular property that describes an entity

Which of the following is NOT a valid logic value in SQL? a. TRUE b. All three are valid. c. FALSE d. Only TRUE and FALSE are valid logic values in SQL. e. UNKNOWN

b. All three are valid.

Which of the following is an example of a 1:1 relationship? a. An employee works on many projects b. An employee managing a department c. An employee supervising other employees d. An employee has dependents

b. An employee managing a department

Which of the following does the WITH clause allow you to do? a. Same as the WHERE clause b. Define a table that will only be used in this query c. Specify which GROUPs you want d. Rename and save a table

b. Define a table that will only be used in this query

In a UML class diagram, what shape is used to symbolize an entity? a. Dotted Line b. Diamond c. Circle d. Rectangle

d. Rectangle

Given the COMPANY database, what is wrong with the following query?: INSERT INTO EMPLOYEE(Fname, Lname, Dno, Ssn) VALUES ('Bob', 'Builder', 'Construction', '130141123'); a. Bob isn't a valid first name b. Dno is not a varchar c. The Ssn doesn't exist d. This query is good

b. Dno is not a varchar

Which of the following clauses allows you to test the GROUPed tuples' information? Assume the GROUP BY clause is in the query as well. a. WITH ... b. HAVING ... c. WHERE ... d. GROUP ON ...

b. HAVING ...

Which of the following queries is correct, assuming the COMPANY database? a. INSERT INTO EMPLOYEE(Fname, Lname, Dno, Ssn) VALUES ('Chris', 'Smith', '1', '123456789'); b. INSERT INTO EMPLOYEE(Fname, Lname, Dno, Ssn) VALUES ('Chris', 'Smith', 1, '123456789'); c. None of these queries work. d. INSERT INTO EMPLOYEE(Fname, Lname, Dno) VALUES ('Chris', 'Smith', 1);

b. INSERT INTO EMPLOYEE(Fname, Lname, Dno, Ssn) VALUES ('Chris', 'Smith', 1, '123456789');

Which of the following is NOT a valid reason for a NULL value? a. Unavailable data b. Key from another table that does not exist c. Not applicable to the entry d. Unknown data

b. Key from another table that does not exist

Which one is NOT a typical database utility? a. Performance monitoring b. Query creation c. Loading d. Backup creation

b. Query creation

Which of the following returns EMPLOYEEs who work in the Research DEPARTMENT? a. SELECT * FROM (EMPLOYEE JOIN DEPARTMENT ON Dname = 'Research') WHERE Dno = Dnumber; b. SELECT * FROM (EMPLOYEE JOIN DEPARTMENT ON Dno = Dnumber) WHERE Dname = 'Research'; c. SELECT * FROM EMPLOYEE WHERE Dname = 'Research'; d. SELECT EMPLOYEE JOIN DEPARTMENT ON Dno = Dnumber WHERE Dname = 'Research';

b. SELECT * FROM (EMPLOYEE JOIN DEPARTMENT ON Dno = Dnumber) WHERE Dname = 'Research';

How do you select everything from a table in SQL? a. SELECT ALL FROM ... b. SELECT * FROM ... c. SELECT EVERYTHING FROM ... d. SELECT & FROM ...

b. SELECT * FROM ...

Which of the following will count the number of EMPLOYEEs? a. All three options are valid. b. SELECT COUNT(ssn) FROM EMPLOYEE; c. SELECT COUNT FROM EMPLOYEE; d. SELECT COUNT(DISTINCT fname) FROM EMPLOYEE;

b. SELECT COUNT(ssn) FROM EMPLOYEE;

Which of the following returns a sum of the salaries in the EMPLOYEE table? a. SELECT COUNT(Salary) FROM EMPLOYEE; b. SELECT SUM(Salary) FROM EMPLOYEE; c. SELECT TOTAL(Salary) FROM EMPLOYEE; d. SELECT MAX(Salary) FROM EMPLOYEE;

b. SELECT SUM(Salary) FROM EMPLOYEE;

Which of the following was not a SQL function mentioned in the book? a. COUNT b. TOTAL c. MIN d. AVG

b. TOTAL

What are triggers used for in SQL? a. To automate the actions that the constraints, such as referential integrity, uphold. b. To specify automatic actions that the database system will perform when certain events and conditions happen. c. To enforce the integrity between relations in the database system. d. To constrain the data when a relational constraint is not enough.

b. To specify automatic actions that the database system will perform when certain events and conditions happen.

Which of the following sets project number 10's location to Boone and department number to 20? a. UPDATE PROJECT SET Plocation=Boone, Dnum='20' WHERE Pnumber=10; b. UPDATE PROJECT SET Plocation='Boone', Dnum=20 WHERE Pnumber=10; c. UPDATE PROJECT SET Dnum=20 WHERE Plocation='Boone'; d. UPDATE PROJECT SET Plocation='Boone' WHERE Pnumber=10;

b. UPDATE PROJECT SET Plocation='Boone', Dnum=20 WHERE Pnumber=10;

Whenever a condition in the WHERE clause of a nested query references some attribute of a relation declared in an outer query, the 2 queries are said to be ____. a. combined b. correlated c. dependent d. singular

b. correlated

Which model is mentioned in the text only because of its historical significance (also known as a legacy model)? a. relational data model b. hierarchical model c. object data model d. XML model

b. hierarchical model

The application server is on what tier of a three-tier client/server architecture? a. bottom b. middle c. Three-tier architectures do not have an application server level d. top

b. middle

Which of the following is NOT a valid relationship? a. A supplier supplies a part b. A manager manages an employee c. A student's birthday is 12/25/1998. d. An employee works on a project

c. A student's birthday is 12/25/1998.

Which of the following keywords is NOT associated with the ordering of query results? a. ORDER BY b. ASC c. ALPHABETICAL d. DESC

c. ALPHABETICAL

Which query deletes all projects from the COMPANY database? a. DELETE FROM PROJECT WHERE 1; b. DELETE FROM PROJECT; c. All of these queries delete all projects. d. DELETE FROM `project` WHERE pname LIKE '%';

c. All of these queries delete all projects.

Which of the following clauses allows you to do specified actions based on the value stored in an attribute? a. IF ... b. WITH ... c. CASE ... d. WHERE ...

c. CASE ...

Which of the following is NOT a valid CREATE statement? a. CREATE DOMAIN b. CREATE SCHEMA c. CREATE ATTRIBUTE d. CREATE TABLE

c. CREATE ATTRIBUTE

Which of the following is NOT a category of data models? a. High-level (or conceptual) b. Low-level (or physical) c. Cloud-based d. Representational

c. Cloud-based

Which of the following queries drops the SCHEMA named CLASSIFIED? a. DROP CLASSIFIED; b. DROP CLASSIFIED SCHEMA CASCADE; c. DROP SCHEMA CLASSIFIED CASCADE; d. DROP CLASSIFIED SCHEMA;

c. DROP SCHEMA CLASSIFIED CASCADE;

Which of the following is a valid way to compare an item to NULL? a. > b. AND c. IS d. =

c. IS

Which of the following queries gets the department number and employee count for each department? a. SELECT Dno, COUNT(*) GROUP BY Dno; b. SELECT COUNT(*) FROM EMPLOYEE GROUP BY Dno c. SELECT Dno, COUNT(*) FROM EMPLOYEE GROUP BY Dno; d. SELECT Dno FROM EMPLOYEE GROUP BY Dno;

c. SELECT Dno, COUNT(*) FROM EMPLOYEE GROUP BY Dno;

Which of the following queries gets the department number and the number of employees who work there if there are more than 5 employees making at least $30,000? a. SELECT Dno, COUNT(*) FROM EMPLOYEE WHERE Salary >= 30000 GROUP BY COUNT(Dno) > 5; b. SELECT Dno, COUNT(*) FROM EMPLOYEE WHERE Salary < 30000 and COUNT(*) > 5 GROUP BY Dno c. SELECT Dno, COUNT(*) FROM EMPLOYEE WHERE Salary >= 30000 GROUP BY Dno HAVING COUNT(*) > 5; d. SELECT Dno, COUNT(*) FROM EMPLOYEE WHERE COUNT(*) > 5 GROUP BY Dno HAVING Salary >= 30000;

c. SELECT Dno, COUNT(*) FROM EMPLOYEE WHERE Salary >= 30000 GROUP BY Dno HAVING COUNT(*) > 5;

Which of the following queries uses GROUP BY in an invalid way? a. SELECT Essn, Pno FROM PROJECT GROUP BY ascending Plocation; b. SELECT Ssn, Lname FROM EMPLOYEE GROUP BY count(*); c. SELECT Essn, Pno, count(*) FROM PROJECT GROUP BY Essn, Pno; d. SELECT Essn, Pno FROM PROJECT GROUP BY EMPLOYEE;

c. SELECT Essn, Pno, count(*) FROM PROJECT GROUP BY Essn, Pno;

Which of the following attributes would be underlined in the ER diagram for EMPLOYEE? a. Fname b. Bdate c. SSN d. Address

c. SSN

Which of the following is a valid way to specify the primary key of a table as SSN? a. PRIMARY KEY SSN Int b. SSN INTEGER KEY c. SSN INTEGER PRIMARY KEY d. SSN INTEGER UNIQUE

c. SSN INTEGER PRIMARY KEY

Which of the following gives EMPLOYEEs raises based on their department? a. UPDATE EMPLOYEE SET Salary = Salary + 2000; b. UPDATE EMPLOYEE SET Salary = CASE Salary + 1000 WHEN Dno = 5 Salary + 750 WHEN Dno = 4 ELSE Salary + 500; c. UPDATE EMPLOYEE SET Salary = CASE WHEN Dno = 5 THEN Salary + 1000 WHEN Dno = 4 THEN Salary + 750 ELSE Salary + 500; d. UPDATE EMPLOYEE SET Salary = CASE IF Dno = 5 THEN Salary + 1000 ELSE IF Dno = 4 THEN Salary + 750 ELSE Salary + 500;

c. UPDATE EMPLOYEE SET Salary = CASE WHEN Dno = 5 THEN Salary + 1000 WHEN Dno = 4 THEN Salary + 750 ELSE Salary + 500;

Which of the following queries gives every employee a 15% raise? a. UPDATE EMPLOYEE SET Salary=Salary+1.15; b. UPDATE EMPLOYEE SET Salary=Salary*0.15; c. UPDATE EMPLOYEE SET Salary=Salary*1.15; d. UPDATE EMPLOYEE SET Salary*1.15=Salary;

c. UPDATE EMPLOYEE SET Salary=Salary*1.15;

A ______ is a collection of concepts that can be used to describe the structure of a database. a. dynamic aspect b. big data c. data model d. database state e. entity

c. data model

Which of the following is NOT part of the three-tier architecture? a. external level b. internal level c. query algorithms d. conceptual level

c. query algorithms

______ is one strategy for transforming the view query into a query on the base tables. a. view materialization b. update modification c. query modification d. lazy update

c. query modification

A(n) __________ is an executing program or process that includes one or more database accesses, such as reading or updating database records. a. model b. query c. transaction d. view e. script

c. transaction

A perspective of the database provided for one type of user. a. model b. abstraction c. view d. transaction e. physical design

c. view

Which of the following is a reasonable explanation for NULL stored as the value of an attribute? a. A value exists but is missing. b. No value is applicable for this entity. c. It is not known if a value exists for this entity. d. All of the above are reasonable explanations.

d. All of the above are reasonable explanations.

Which of the following is an example of a table/relation alias from the COMPANY database? a. DEPARTMENT AS D b. EMPLOYEE AS E c. STUDENT AS S d. All of the choices are valid.

d. All of the choices are valid.

Which of the following functions can be used in nested queries? a. NOT EXISTS b. UNIQUE c. EXISTS d. All three can be used in nested queries.

d. All three can be used in nested queries.

What can schema evolution commands be used for in SQL? a. Alter a schema by changing a constraint b. Alter a schema by dropping an attribute c. Alter a schema by adding a table d. All three of these options can be done

d. All three of these options can be done

Which of the following CREATE statements successfully creates a table named EMPLOYEE in the schema COMPANY? Assume the ... at the end of the statements are the correct attributes. a. CREATE TABLE EMPLOYEE.COMPANY ... b. CREATE SCHEMA COMPANY ... c. CREATE SCHEMA EMPLOYEE ... d. CREATE TABLE COMPANY.EMPLOYEE ...

d. CREATE TABLE COMPANY.EMPLOYEE ...

What type of language is used to change things in the database? a. Storage Definition Language b. Data Definition Language c. View Definition Language d. Data Manipulation Language

d. Data Manipulation Language

How would you display all employee's salaries with a 20% raise using the textbook's EMPLOYEE table? a. SELECT Fname, Lname, TIMES(Salary, 1.2) FROM EMPLOYEE b. SELECT Fname, Lname, Math(Salary, 1.2) FROM EMPLOYEE c. SELECT Fname, Lname, 0.2*Salary FROM EMPLOYEE d. SELECT Fname, Lname, 1.2*Salary FROM EMPLOYEE

d. SELECT Fname, Lname, 1.2*Salary FROM EMPLOYEE

Which of the following shows the largest DEPARTMENT number? a. SELECT HIGH(Dnumber) FROM DEPARTMENT; b. SELECT LARGEST(Dnumber) FROM DEPARTMENT; c. SELECT TOP(Dnumber) FROM DEPARTMENT; d. SELECT MAX(Dnumber) FROM DEPARTMENT;

d. SELECT MAX(Dnumber) FROM DEPARTMENT;


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

CA HA 7 LOWER appendicular system & WQ CHAPTER 8

View Set

Equations of Parallel and Perpendicular Lines

View Set

Lifespan Development- Chapter 12

View Set

Chapter 34: Assessment and Management of Patients with Inflammatory Rheumatic Disorders

View Set

ATI diabetes mellitus management post test

View Set

Chapter 14: Global Financial Management

View Set

2B - Market Influences on Business

View Set