Database Systems Midterm #2

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

Database management systems, such as MySQL, are based on spreadsheet software, such as Microsoft Excel. True False

False

Each table in a relational database must have a foreign key. True False

False

SQL requires the use of the ADD command to enter data into a table. True False

False

The external model is a representation of the database as "seen" by the DBMS. True False

False

M:N relationships are NOT appropriate in a relational database model. True False

True

A table can be deleted from the database by using the ____________ command. a. DROP TABLE b. DELETE TABLE c. MODIFY TABLE d. ERASE TABLE

a.

The Entity-Relationship (ER) model uses the associative (bridge) entity to represent a(n) _______ relationship between two or more entities. a. M:N b. 1:M c. N:1 d. M:1

a.

The ______ relationship should be rare in any relational database design. a. 1:1 b. 1:M c. M:1 d. M:N

a.

The SQL function that gives the arithmetic mean for a specific column is a. AVERAGE b. AVG c. MEAN d. NUMERIC

b.

__________ expresses the minimum and maximum number of entity occurrences associated with one occurrence of the related entity. a. Connectivity b. Relationship c. Dependence d. Cardinality

d.

In a 1:M relationship, a user must always create the table for the "many" side first. True False

False

Mathematical operators cannot be used to place restrictions on character-based attributes. True False

False

The order of the rows and columns is important to the DBMS. True False

False

To list the contents of a table, one must use the DISPLAY command. True False

False

A data model is usually graphical. True False

True

The ________ constraint can be placed on a column to ensure that every row in the table has a value for that column. a. UNIQUE b. NOT NULL c. VALUE d. EMPTY

b.

The ____________ command would be used to delete the table row where the P_CODE is 'BRT-345'. a. DROP FROM PRODUCT WHERE P_CODE = 'BRT-345'; b. DELETE FROM PRODUCT WHERE P_CODE = 'BRT-345'; c. REMOVE FROM PRODUCT WHERE P_CODE = 'BRT-345'; d. ERASE FROM PRODUCT WHERE P_CODE = 'BRT-345';

b.

To list all the contents of the PRODUCT table, a user would use _____________. a. LIST * FROM PRODUCT b. SELECT * FROM PRODUCT c. SELECT ALL FROM PRODUCT d. DISPLAY * FROM PRODUCT

b.

MySQL (MariaDB) is an example of the _________. a. hierarchical model b. file system data model c. relational data model d. XML data model

c.

The Crow's foot symbol with two vertical parallel lines indicates ____________ cardinality. a. (0,N) b. (1,N) c. (1,1) d. (N,N)

c.

___________ relationships can be implemented by creating a new entity in 1:M relationships with the original entities. a. 1:N b. M:1 c. M:N d. 1:1

c.

A _________________is the primary key of one table that has been placed into another table to create a common attribute. a. superkey b. composite primary key c. candidate key d. foreign key

d.

All changes in a table structure are made using the _____________ command, followed by a keyword that produces the specific changes a user wants to make. a. UPDATE TABLE b. CHANGE TABLE c. EDIT TABLE d. ALTER TABLE

d.

If an employee within an EMPLOYEE entity has a relationship with itself, that relationship is known as a __________ relationship. a. self b. self-referring c. looping d. recursive

d.

The _________ constraint assigns a value to an attribute when a new row is added to a table. a. CHECK b. UNIQUE c. NOT NULL d. DEFAULT

d.

The query to join the P_DESCRIPT and P_PRICE fields from the PRODUCT table and the V_NAME, V_CONTACT, V_AREACODE, V_PHONE fields from the VENDOR table, where the values of V_CODE match and the output is ordered by the price is ________________ . a. SELECT PRODUCT.P_DESCRIPT, PRODUCT.P_PRICE, VENDOR.V_NAME, VENDOR.V_CONTACT, VENDOR.V_AREACODE, VENDOR.V_PHONEFROM PRODUCT, VENDORJOIN PRODUCT.V_CODE = VENDOR.V_CODE; ORDER BY PRODUCT.P_PRICE; b. SELECT PRODUCT.P_DESCRIPT, PRODUCT.P_PRICE, VENDOR.V_NAME, VENDOR.V_CONTACT, VENDOR.V_AREACODE, VENDOR.V_PHONEFROM PRODUCT, VENDORIF PRODUCT.V_CODE = VENDOR.V_CODE; ORDER BY PRODUCT.P_PRICE; c. SELECT PRODUCT.P_DESCRIPT, PRODUCT.P_PRICE, VENDOR.V_NAME, VENDOR.V_CONTACT, VENDOR.V_AREACODE, VENDOR.V_PHONEFROM PRODUCT, VENDORWHEN PRODUCT.V_CODE = VENDOR.V_CODE;ORDER BY PRODUCT.P_PRICE; d.SELECT PRODUCT.P_DESCRIPT, PRODUCT.P_PRICE, VENDOR.V_NAME, VENDOR.V_CONTACT,VENDOR.V_AREACODE, VENDOR.V_PHONEFROM PRODUCT, VENDORWHERE PRODUCT.V_CODE = VENDOR.V_CODE; ORDER BY PRODUCT.P_PRICE;

d.

The query used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the PRODUCT table in ascending order by P_PRICE is __________. a. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT SORT BY P_PRICE; b. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT LIST BY P_PRICE; c. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT DISPLAY BY P_PRICE; d. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT ORDER BY P_PRICE;

d.

The query used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the PRODUCT table in ascending order by P_PRICE is _______________. a. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCTASCENDING BY P_PRICE; b. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCTASC BY P_PRICE; c. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCTLIST BY P_PRICE; d. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCTORDER BY P_PRICE;

d.

Which of the following is NOT a version of traditional SQL? a. Oracle MySQL b. Microsoft SQL Server c. IBM DB2 d .Google Big Table

d.

Which of the following queries will output the table contents when the value of the character field P_CODE is alphabetically less than 1558-QW1? a. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE FROM PRODUCTWHERE P_CODE < (1558-QW1); b. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE FROM PRODUCTWHERE P_CODE < %1558-QW1%; c. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE FROM PRODUCTWHERE P_CODE < "1558-QW1"; d. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE FROM PRODUCTWHERE P_CODE <'1558-QW1';

d.


Kaugnay na mga set ng pag-aaral

Musculoskeletal Practice Problems

View Set

Comp TIA A+ Cert Master 4.1 Virtualization and Cloud Computing Study

View Set

Unit 3 Part 1 - Dependency Theory

View Set

video equipment &a operations #2

View Set