ROC SQL Test

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

T/F A foreign key usually refers to a primary key or unique key of another table.

True Explanation : In most database management systems, a foreign key must reference a column with at least a UNIQUE constraint, which all Primary Keys implicitly have. In some systems, only primary keys are allowed.

Which normalized form introduces the concept of dealing with how information relates to composite keys? A. First B. Second C. Third D. Fourth

B

Which of the following SQL datatypes is best used to represent a whole number? A. DECIMAL B. INTEGER C. TIMESTAMP D. NUMBER

B

SQL is used to create A. Relational Databases B. Functions C. API servers D. All of the above

A

What is Maven? A. A build automation and dependency management tool for Java B. A testing framework C. A logging library which allows for multiple logging thresholds D. A library of tools for adding functionality to a Java application

A

What is a phantom read? A. Reading new rows that are added during a transaction B. Reading new tables that are added during a transaction C. Reading updated rows that are changed during a transaction D. Reading updated tables that are changed during a transaction

A

Which Isolation level is the slowest? A. Serializable B. Repeatable Reads C. Read Committed D. Read Uncommitted

A

Which SQL contraint will create a value in the row if no value is provided? A. DEFAULT B. CHECK C. NOT NULL D. PRIMARY KEY

A

Which SQL sublanguage is used to define tables, schema, and databases? A. DDL B. DML C. DCL D. TCL

A

Which command filters out records from the given query based on applying a condition to each and every record? A. WHERE. B. SELECT. C. HAVING. D. GROUP BY.

A

Which normalized form introduces the concept of enforcing primary keys and removing composite columns? A. First B. Second C. Third D. Fourth

A

Which of the following is an advantage to using Maven? A. Automatically track dependencies, build and deploy your project B. Track source code version history of your project in a central location C. Use Maven annotations to test your project code D. Improve the quality of your code

A

Which of the following is not a convention of SQL programming? A. Commas after every skipped line B. Lowercase for tables and column names C. Individual lines for each statement after a keyword D. Keywords written in all uppercase

A

Which of the following SQL datatypes is best used to represent one or more characters? A. NUMERIC B. VARCHAR C. IMAGE D. CHAR

B

Which of the following joins will return all records from the first table despite any condition specified? A. inner join B. left join C. right join D. self join

B

Which of the following is not a valid multiplicity relationship? A. One to one B. Many to many C. Many to one D. One to null

D

Mapping a many-to-many relationship in a database requires: A. Only one table. B. An intermediary junction table. C. A composite primary key. D. An array type column.

B

To make a join statement, you need to use which sublanguage? A. DDL B. DQL C. DCL D. TCL

B

What does the pom.xml do? A. configures logging levels B. declares metadata about the project, including project coordinates, dependencies, and plugins C. declares which classes in your project to test D. configures version control for your Java project

B

Which SQL keyword is used for defining new tables or databases? A. DEFINE B. CREATE C. SELECT D. NEW

B

Which SQL sublanguage is used to create and interact with rows in a table? A. DDL B. DML C. DCL D. TCL

B

Which aggregate function is used to combine values into a number representing the combination of all of the values? A. MAX B. SUM C. COUNT D. MIN

B

Which command dictates the amount of columns we get in a given query? A. WHERE B. SELECT C. HAVING D. GROUP BY

B

Which is NOT a constraint in SQL? A. Unique B. Null C. Primary Key D. Foreign Key

B

Which is NOT true about set operations in SQL? A. UNION ALL will allow duplicate data to be shown in query results. B. When performing set operations you are required to have 2 or more columns in each query in order to successfully execute. C. A requirement for set operations is that each query has the same datatypes in the same order, HOWEVER, they do NOT need to be named the same.. D. One could simulate a set operation with a join clause.

B

Which isolation level causes phantom reads? A. Serializable B. Repeatable Reads C. Read Committed D. Read Uncommitted

B

Which keyword is used to designate the column to make a join with? A. IN B. ON C. AT D. AND

B

The CHECK constraint is used to: A. Filter selected rows with a logical expression B. Require any values placed in a row to satisfy a logical expression C. Require any values in a column to satisfy a logical expression D. Require new data to be manually checked after being commited

C

What are transactions? A. Only when you add information from a table B. When you make changes to tables C. When you make DML statements to information in a table D. When you create or delete tables

C

What do we call a field that references a field in another table? A. Primary key B. Candidate Key C. Foreign Key D. Connection Key

C

What does POM stand for? A. Progress Objective Modeling B. Project Objectives and Methods C. Project Object Model D. Progress Oriented Mentality

C

What does SQL stand for? A. Standalone Query Language B. Standalone Query Lambdas C. Structured Query Language D. Structured Query Lambdas

C

What is a non-repeatable read? A. When a row is read twice in a transaction and the values are the same B. When a column is read twice in a transaction and the values are the same C. When a row is read twice in a transaction and the values are different D. When a column is read twice in a transaction and the values are different

C

Which Isolation level causes non-repeatable reads? A. Serializable B. Repeatable Reads C. Read Committed D. Read Uncommitted

C

Which SQL sublanguage is used to change database permissions? A. DDL B. DML C. DCL D. TCL

C

Which aggregate function is used to combine values into a number representing the number of total values? A. MAX B. SUM C. COUNT D. MIN

C

Which normalized form introduces the concept of removing columns whose values are derived from other columns in the table? A. First B. Second C. Third D. Fourth

C

Which of the following SQL datatypes is best used to represent a file? A. TIMESTAMP B. JSON C. BLOB D. XML

C

Which of the following joins will return all records from the second table despite any condition specified? A. inner join B. left join C. right join D. self join

C

Which of the following joins will return all records from the both tables despite any resulting null values? A. self join B. cross join C. natural join D. full join

D

What is SQL? A. A database for storing and maintaining state for data. B. A tool used solely for statistical analysis. C. A mentality for creating databases to be as least redundant as possible. D. A language for interacting with a database.

D

What is a dirty read? A. Reading data that doesn't have a primary key B. Reading data that is nor normalized C. Reading data that you don't have permission to read D. Reading data that is uncommitted

D

What is a foreign key? A. The identifier for the database B. A column or group of columns that uniquely identify a row C. A key used to access a secured database table D. A column that references a column of another table to establish a relationship between rows

D

What is the difference between WHERE and HAVING? A. HAVING performs a conditional check on each column to ensure datatypes are proper before a query executes, whereas WHERE applies immediately. B. Both can be used interchangeably, it is just a means to apply multiple filter conditions. C. Simply put, HAVING will ensure a specific order for the data after the WHERE clause applies, whereas WHERE by itself does not order at all. D. WHERE applies a condition to all records individually, whereas HAVING applies to groupings of records.

D

Which Isolation level causes dirty reads? A. Serializable B. Repeatable Reads C. Read Committed D. Read Uncommitted

D

Which SQL sublanguage is used to manage the state of a transaction? A. DDL B. DML C. DCL D. TCL

D

Which of the following SQL datatypes is best used to represent a decimal number? A. INTEGER B. SMALLINT C. TIMESTAMP D. NUMERIC

D

T/F Scalar functions are used to search through a database and give a result based on conditions.

FALSE

T/F Transactions include all DML statements before and after COMMIT statements.

FALSE

T/F You can create a one to many relationship without a primary key to foreign key relationship

FALSE

T/F Each database may contain only one table.

False

T/F SQL is a programming language.

False

T/F All joins are implicitly inner joins unless specified otherwise.

TRUE

T/F Scalar functions are used to perform an operation on values returned from a query.

TRUE

T/F Different dialects of SQL have different, unique data types.

True


Kaugnay na mga set ng pag-aaral

Chapter 13 FINAL family questions

View Set

Astronomy Ch. 7 Practice Quiz, Astronomy Chapter 7, ISP 205 MA Exam 2, astronomy test 2, Astronomy 101 Study Guide

View Set

Marketing Research & Analysis test 3

View Set

Food Chain - Herbivore, Carnivore, or Omnivore?

View Set

Adult Health Chapter 28 Lower Respiratory Problems

View Set