CS 2203 Unit 2 Quizlet sample submission PDF

Title CS 2203 Unit 2 Quizlet sample submission
Author Kute Face
Course Databases 1
Institution University of the People
Pages 142
File Size 551.1 KB
File Type PDF
Total Downloads 69
Total Views 137

Summary

CS 2203 Unit 2 Quizlet sample answer submission...


Description

Both the primary key and a candidate key can uniquely identify the tuples in a relation. True

What does "a named column of a relation" refer to? Attribute

A relational database stores data in the form of relations. True

A unique constraint specifies that attribute values must be different. True

The Database Administrator is responsible for developing the logical data model. False

Which of the following is true about a relation? All the values in any column must be of the same type

Which of the following is not a property of a data model? Defines relationships between managed objects

How can a multivalued attribute be represented in an E-R model? Create a new dependent entity with a 1:N relationship

"A student can attend six courses, each with a different instructor. Each instructor has 30 students." What is the type of relationship between students and instructors? many-to-many

Given only the following part of an E-R diagram, what does the hash mark across the relationship line near the entity in the figure below indicate? A minimum cardinality of one

c. A maximum cardinality of one

Which of the following is not a component of a database model? Physical component

A student's name, birthday, and student number are all examples of: Attributes

The E-R model is used to build a conceptual model. True

In an Entity-Relationship model, which concept is generally used to represent a student? Entity

All instances of a given entity set have the same attributes in the E-R Model. True

One-to-One relationships are transformed into Check Constraints in the tables created at either end of that relationship. True or False? False

The Oracle Database can implement a many-to-many relationship. You simply create two foreign keys between the two tables. True or False? False

When translating an arc relationship to a physical design, you must turn the arc relationships into foreign keys. Assuming you are implementing an Exclusive Design, you must also create two Unique Key Constraints to ensure the Arc is implemented correctly. True or False? False

The transformation from an ER diagram to a physical design involves changing terminology. Secondary Unique Identifiers become:

A. Columns

B. Tables

C. Unique Constraints

D. Primary Key Constraints Unique Constraints

In a physical data model, an attribute becomes a _____________. A. Table

B. Foreign Key

C. Constraint

D. Column

Column

In an Oracle database, why would 1_TABLE not work as a table name?

A. The database does not understand all capital letters.

B. There is no problem here. You can create a table called 1_TABLE.

C. Object names must not start with a number. They must begin with a letter.

D. TABLE is a reserved word. Object names must not start with a number. They must begin with a letter.

The explanation below is a column integrity constraint. True or False? A column must contain only values consistent with the defined data format of the column. True

Foreign keys must be null. True or False? False

A table must have a primary key. True or False? False

The explanation below is a User Defined integrity rule and must, therefore, be manually coded; the Database cannot enforce this rule automatically. True or False? A primary key must be unique, and no part of the primary key can be null. False

The text below is an example of what constraint type? If the number of BOOKS lent to a BORROWER in the LIBRARY exceeds 5, then we must send him a letter requesting the return of the BOOKS; this will require extra programming to enforce.

A. Entity integrity

B. User-defined integrity

C. Column integrity

D. Referential integrity User-defined integrity

System Documentation is developed right at the end once the system has gone live and users have been using it for a little while. You are more likely to get it correct that way. True or False? False

In the Analysis phase, the tables are created and populated with test data. True or False? False

Once you have created a table, it is not possible to alter the definition of it. If you need to add a new column you must delete the table definition and create a new, correct table. True or False? False

The f_customers table contains the following data:

ID NAME ADDRESS CITY STATE ZIP 1 Cole Bee 123 Main Street Orlando FL 32838 2 Zoe Twee 1009 Oliver Avenue Boston MA 02116 3 Sandra Lee 22 Main Street Tampa FL 32444

If you run the following statement: DELETE FROM F_CUSTOMERS WHERE ID 50 AND salary BETWEEN 10000 AND 25000

C. WHERE department_id = 50 AND salary BETWEEN 25001 AND 10001

D. WHERE department_id = 50 AND salary BETWEEN 10000 AND 25000 WHERE department_id = 50 AND salary BETWEEN 10000 AND 25000

Which statement best describes how column headings are displayed by default in Oracle Application Express:

A. Column headings are displayed left-justified and in lowercase.

B. Column headings are displayed left-justified and in uppercase.

C. Column headings are displayed centered and in uppercase.

D. Column headings are displayed centered and in mixed case. Column headings are displayed centered and in uppercase.

You need to display employees with salaries that are at least 30000 or higher. Which comparison operator should you use?

A. >

B. "=>"

C. >=

D. != >=

Which of the following elements cannot be included in a WHERE clause? A. A column alias

B. A column name

C. A comparison condition

D. A constant A column alias

You want to determine the orders that have been placed by customers who reside in the city of Chicago. You write this partial SELECT statement: SELECT orderid, orderdate, total FROM orders;

What should you include in your SELECT statement to achieve the desired results?

A. AND city = Chicago;

B. AND city = 'Chicago';

C. WHERE city = 'Chicago';

D. WHERE city = Chicago; WHERE city = 'Chicago';

What will be the result of the SELECT statement and what will display? SELECT last_name, salary, salary + 300 FROM employees;

A. Display the last name, salary, and the results of adding 300 to each salary for all the employees

B. Display the last name and salary of all employees who have a salary greater than 300.

C. Modify the salary column by adding 300 and only display the last name and the new salary.

D. Display the last name, salary, and the results of adding 300 to the salary of the first employee row Display the last name, salary, and the results of adding 300 to each salary for all the employees

The PLAYERS table contains these columns:

PLAYER_ID NUMBER(9) LAST_NAME VARCHAR2(20) FIRST_NAME VARCHAR2 (20) TEAM_ID NUMBER (4) MANAGER_ID NUMBER (9) POSITION_ID NUMBER (4)

Which SELECT statement should you use if you want to display unique combinations of the TEAM_ID and MANAGER_ID columns?

SELECT * FROM players;

A. SELECT team_id, manager_id FROM players;

B. SELECT DISTINCT team_id, manager_id FROM players;

C. SELECT team_id, DISTINCT manager_id FROM players;

D. SELECT team_id, manager_id DISTINCT FROM players; SELECT DISTINCT team_id, manager_id FROM players;

Which of the following commands will display the last name concatenated with the job ID from the employees table, separated by a comma and space, and label the resulting column "Employee and Title"?

A. SELECT " last name" ||', '|| "job_id" + "Employee and Title" FROM employees;

B. SELECT last_name||', '|| job_id "Employee and Title" FROM employees;

C. SELECT " last name" ||', '|| "job_id" + "Employee and Title" FROM emp;

D. SELECT last_name||","|| job_id "Employee and Title" FROM employees; SELECT last_name||', '|| job_id "Employee and Title" FROM employees;

If you write queries using the BETWEEN operator, it does not matter in what order you enter the values, i.e. BETWEEN low value AND high value will give the same result as BETWEEN high value and low value. True or False? False

The EMPLOYEES table includes these columns: EMPLOYEE_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(15) NOT NULL FIRST_NAME VARCHAR2(10) NOT NULL HIRE_DATE DATE NOT NULL

You want to produce a report that provides the last names, first names, and hire dates of those employees who were hired between March 1, 2000, and August 30, 2000. Which statements can you issue to accomplish this task?

A. SELECT last_name, first_name, hire_date FROM employees WHERE hire_date BETWEEN '01-MAR-2000' AND '30-AUG-2000';

B. SELECT last_name, first_name, hire_date FROM employees WHERE hire_date BETWEEN '30-AUG-2000' AND '01-MAR-2000';

C. SELECT last_name, first_name, hire_date FROM employees GROUP BY hire_date >= '01-MAR-2000' and hire_date = '01-MAR-2000' and hire_date = 6900 ORDER BY last_name, first_name;

B. SELECT last_name, first_name FROM players WHERE position_id > 6900 ORDER BY last_name, first_name;

C. SELECT last_name, first_name FROM players WHERE position_id = 6900 ORDER BY last_name DESC, first_name; SELECT last_name, first_name FROM players WHERE position_id >= 6900 ORDER BY last_name, first_name;

Which of the following is a valid reason for considering a Subtype Implementation?

A. The resulting table will reside in a single database and be used by just ONE user.

B. The common access paths for the supertypes are different.

C. Business functionality, business rules, access paths, and frequency of access are all very different between the subtypes.

D. Most of the relationships are at the supertype level. Business functionality, business rules, access paths, and frequency of access are all very different between the subtypes.

The transformation from an ER diagram to a physical design involves changing terminology. Secondary Unique Identifiers become

A. Columns B. Tables C. Unique Constraints D. Primary Key Constraints Unique Constraints

Attributes become tables in a database. True or False? False

In an Oracle database, why would 1_TABLE not work as a table name?

A. The database does not understand all capital letters. B. There is no problem here. You can create a table called 1_TABLE. C. Object names must not start with a number. They must begin with a letter. D. TABLE is a reserved word. Object names must not start with a number. They must begin with a letter.

The text below is an example of what constraint type?

If the number of BOOKS lent to a BORROWER in the LIBRARY exceeds 5, then we must send him a letter requesting the return of the BOOKS; this will require extra programming to enforce.

A. Entity integrity B. User-defined integrity C. Column integrity D. Referential integrity User-defined integrity

A foreign key cannot refer to a primary key in the same table. True or False? False

Entity integrity refers to:

A. Tables always containing text data B. Tables always containing numeric data C. Columns having Primary Keys, Foreign Keys, Unique Keys, and Check constraints defined in the database. D. Tables having Primary Keys, Foreign Keys, Unique Keys, and Check constraints defined in the database. Tables having Primary Keys, Foreign Keys, Unique Keys, and Check constraints defined in the database.

A table must have at least one candidate key, as well as its primary key. True or False? False

It is possible to implement non-transferability via a simple Foreign Key Relationship. True or False? False

To resolve a many to many relationship in a physical model you create a/an ___________________?

A. Unique key constraints

B. Intersection entity C. Intersection table D. Two tables with Foreign key constraints between them Intersection table

During which phases of the System Development Life Cycle would you test the system before rolling it out to the users?

A. Build and Transition B. Strategy and Analysis C. Design and Production D. Transition and Production Transition and Production

What command can be used to create a new row in a table in the database?

A. CREATE B. NEW C. ADD D. INSERT INSERT

What command will return data from the database to you? A. FETCH B. GET C. SELECT D. RETURN SELECT

In a SELECT clause, what is the result of 2+3*2?

A. 6 B. 8 C. 10 D. 13 8

In which clause of a SELECT statement would you specify the name of the table or tables being queried?

A. The FROM clause B. The SELECT clause C. The WHERE clause D. Any of the above options; you can list tables wherever you want in a SELECT statement. The FROM clause

Evaluate this SELECT statement: SELECT (salary * raise_percent) raise FROM employees;

If the RAISE_PERCENT column only contains null values, what will the statement return?

A. Only zeroes B. Only null values C. A null value or a zero depending on the value of the SALARY column D. A null value or a numeric value depending on the value of the SALARY column Only null values

You query the database with this SQL statement: SELECT * FROM transaction

WHERE product_id = 4569; Which SQL SELECT statement capabilities are achieved when this statement is executed?

A. Selection only B. Projection only C. Selection and projection only D. Projection, selection and joining Selection and projection only

When you use the SELECT clause to list one or two columns only from a table and no WHERE clause, which SQL capability is used?

A. Joining only B. Selection only C. Projection only D. Projection and Selection Projection only

What would you use in the SELECT clause to return all the columns in the table?

A. An asterisk (*) B. A minus sign (-) C. A plus sign (+) D. The ALL keyword An asterisk

The EMPLOYEES table contains these columns:

LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) EMAIL VARCHAR2(50)

You are writing a SELECT statement to retrieve the names of employees that have an email address. SELECT last_name||', '||first_name "Employee Name" FROM employees; Which WHERE clause should you use to complete this statement?

A. WHERE email = NULL; B. WHERE email != NULL; C. WHERE email IS NULL; D. WHERE email IS NOT NULL; WHERE email IS NOT NULL;

If you write queries using the BETWEEN operator, it does not matter in what order you enter the values, i.e. BETWEEN low value AND high value will give the same result as BETWEEN high value and low value. True or False? False

Which clause would you include in a SELECT statement to restrict the data returned to only the employees in department 10?

A. WHERE B. FROM C. SELECT D. IS WHERE

When using the LIKE condition, which symbol represents any sequence of characters of any length-zero, one, or more characters?

A. _ B.% C. # D. &

%

You need to combine the FIRST_NAME and LAST_NAME columns in the EMPLOYEES table and display the columns as a combined character string. Which operator should you use?

A. + B. | C. || D. AND ||

Which comparison operator searches for a specified character pattern?

A. IN B. LIKE C. BETWEEN...AND... D. IS NULL LIKE

Which of the following elements cannot be include d in a WHERE clause?

A. A column alias B. A column name C. A comparison condition D. A constant A column alias

When using the LIKE condition to search for _ symbols, which character can you use as the default ESCAPE option?

A. %

B. ^ C. & D. \ \

Evaluate this SELECT statement: SELECT * FROM employees WHERE department_id IN(10, 20, 30) AND salary > 20000; Which values would cause the logical condition to return TRUE?

A. DEPARTMENT_ID = 10 and SALARY = 20000 B. DEPARTMENT_ID = 20 and SALARY = 20000 C. DEPARTMENT_ID = null and SALARY = 20001 D. DEPARTMENT_ID = 10 and SALARY = 20001 DEPARTMENT_ID = 10 and SALARY = 20001

Which of the following commands will display the last name concatenated with the job ID from the employees table, separated by a comma and space, and label the resulting column "Employee and Title"?

A. SELECT " last name" ||', '|| "job_id" + "Employee and Title" FROM employees; B. SELECT last_name||', '|| job_id "Employee and Title" FROM employees; C. SELECT " last name" ||', '|| "job_id" + "Employee and Title" FROM emp; D. SELECT last_name||","|| job_id "Employee and Title" FROM employees; SELECT last_name||', '|| job_id "Employee and Title" FROM employees;

Evaluate this SELECT statement: SELECT last_name, first_name, salary FROM employees; How will the heading for the FIRST_NAME column appear in the display by default in Oracle Application Express?

A. The heading will display with the first character capitalized and centered. B. The heading will display with the first character capitalized and left justified. C. The heading will display as uppercase and centered. D. The heading will display as uppercase and left justified. The heading will display as uppercase and centered.

Which SELECT statement will display both unique and non-unique combinations of the MANAGER_ID and DEPARTMENT_ID values from the EMPLOYEES table?

A. SELECT manager_id, department_id DISTINCT FROM employees; B. SELECT manager_id, department_id FROM employees; C. SELECT DISTINCT manager_id, department_id FROM employees; D. SELECT manager_id, DISTINCT department_id FROM employees; SELECT manager_id, department_id FROM employees;

Which of the following best describes the meaning of the LIKE operator?

A. Display rows based on a range of values. B. To test for values in a list. C. Match a character pattern. D. To find Null values. Match a character pattern.

Which statement about the ORDER BY clause is true?

A. You can use a column alias in the ORDER BY clause. B. The default sort order of the ORDER BY clause is descending. C. The ORDER BY clause can only contain columns that are included in the SELECT list. D. The ORDER BY clause should immediately precede the FROM clause in a SELECT statement You can use a column alias in the ORDER BY clause.

You need to change the default sort order of the ORDER BY clause so that the data is displayed in reverse alphabetical order. Which keyword should you include in the ORDER BY clause?

A. DESC B. ASC C. SORT D. CHANGE DESC

Which statement about the default sort order is true?

A. The lowest numeric values are displayed last. B. The earliest date values are displayed first. C. Null values are displayed first. D. Character values are displayed in reverse alphabetical order. The earliest date values are displayed first.

Which statement about the logical operators is true?

A. The order of operator precedence is AND, OR, and NOT. B. The order of operator precedence is AND, NOT, and OR. C. The order of operator precedence is NOT, OR, and AND. D. The order of operator precedence is NOT, AND, and OR. The order of operator precedence is NOT, AND, and OR.

Which SE...


Similar Free PDFs