Database Management HW 4

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

How do you create a sequence that can generate integers numbers 1, 5, 9, 13, ...? A) create sequence mySEQ start with 1 increment by 4; B) create sequence mySQL as 1, 5, 9, 13, ...; C) create sequence mySEQ start with 4 increment by 1; D) create sequence mySEQ start 1 and increment 4;

A

(check all that apply) When do you use recursive relationships? A) the relationship between employees and their supervisors B) the relationship between employees and their dependents C) the relationship between employees and their departments D) the relationship between employees and their team members E) the relationship between employees and their job assignments

AD

In the ER diagram for a Point of Sale system, there are entities such as Cashier, Product, Checkout, Transaction, CheckoutStand, Return, Inventory, etc. Here inventory records each storage location and its capacity. Assume we need to track certain products are bundled and must be sold together. Which of the following is the correct design? A) Create Bundle entity to link with Product B) Create a recursive relationship for Product C) Create Bundle as a weak entity of Product D) Create Bunble as a subtype of Product

B

You have run an SQL statement that asked the DBMS to display data in a table named USER_TABLES. The results include columns of data labeled "TableName," "NumberOfColumns" and "PrimaryKey." You are looking at ________ . A) user data. B) metadata C) A report D) indexes

B

How do you convert a recursive m:m relationship into relational tables? A) duplicate the primary key twice inside the same table B) duplicate the primary key once inside the same table C) create a junction table and duplicate the primary key twice in the junction table D) create a junction table and duplicate the primary key once in the junction table

C

Referential integrity rules allow which of the following? A) FK column has different data type from the corresponding PK column B) FK column has different data size from the corresponding PK column C) FK column has different name from the corresponding PK column D) FK column has data not in the corresponding PK column

C

What SQL command can be used to delete columns from a table? A) MODIFY TABLE TableName DROP COLUMN ColumnName B) MODIFY TABLE TableName DROP ColumnName C) ALTER TABLE TableName DROP COLUMN ColumnName D) ALTER TABLE TableName DROP ColumnName

C

What SQL command will allow you to change the table STUDENT to add the constraint named GradeCheck that states that the values of the Grade column must be greater than 0? A) ALTER TABLE STUDENT ALTER CONSTRAINT GradeCheck (Grade > 0); B) ALTER TABLE STUDENT ADD CONSTRAINT GradeCheck (Grade > 0); C) ALTER TABLE STUDENT ADD CONSTRAINT GradeCheck CHECK (Grade > 0); D) None of the above is correct.

C

In the ER model for a library checkout system, the involved entities include Book, BookCopy, Patron, Checkout, Return, Reservation, Employee, and Transaction. Assume each return is for many books. If a book is returned with damage, where do you record the information so that we can track the damage by user in case we need to? A) Book B) BookCopy C) Patron D) Association between Return and BookCopy E) Return

D

Based on the following SQL script, which command is correct to change the size of title to varchar2(50)? create table books ( ISBN char(15), title varchar2(100), price number(4,2) null, constraint pk_bk primary key (ISBN)); A) alter table books modify (title varchar2(50)); B) alter table books alter (title varchar2(50)); C) alter table books modify (title char(50)); D) alter table books alter (title char(50)); E) none of the above

E


Ensembles d'études connexes

CEH Handbook Chapter 9 & 10 Sniffing and Social Engineering VOCAB ITN 261

View Set

EC-6 Core subjects Math: Algebra and Patterns

View Set

2014 AP Language and Composition Multiple choice

View Set

BUS 378 - Bus Gov & Society - Chap 1 Quiz

View Set

California life insurance focus exam

View Set