FINALS Flashcards

(33 cards)

1
Q

Inheritance in a generalization hierarchy means that the supertype entity inherits all the attributes of the subtype entity.
Select one:
a. True
b. False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which of the following is an example of a partial completeness constraint?
Select one:
a. A supertype “Pet” has subtypes “Dog,” “Cat,” and “Fish.” Each subtype can have any number of pets, including none.
b. A supertype “Building” has subtypes “House” and “Office.” Not all buildings must belong to one of these subtypes.
c. A supertype “Clothing” has subtypes “Shirt,” “Pants,” and “Dress.” Each piece of clothing must either be of the subtypes.

A

A supertype “Building” has subtypes “House” and “Office.” Not all buildings must belong to one of these subtypes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following is an example of a partial completeness constraint?
Select one:
a. A supertype “Fruit” has subtypes “Apple” and “Orange.” All fruits must must either be of the subtypes.
b. A supertype “Shape” has subtypes “Circle,” “Square,” and “Triangle.” Not all shapes must belong to one of these subtypes.
c. A supertype “Employee” has subtypes “Manager” and “Worker.” Each subtype can have any number of employees, including none.

A

A supertype “Shape” has subtypes “Circle,” “Square,” and “Triangle.” Not all shapes must belong to one of these subtypes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

All weak entities must have a minimum cardinality of 1 on the entity on which it depends.
Select one:
a. False
b. True

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Specifies that an entity instance can simultaneously be a member of two (or more) subtypes.
Select one:
a. anchor object
b. disjoint rule
c. overlap rule

A

overlap rule

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A generic or template data model that can be reused as a starting point for a data modeling project.
Select one:
a. action assertion
b. total specialization rule
c. universal data model

A

universal data model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A supertype should have at least two subtypes.
Select one:
a. True
b. False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following is an example of a total completeness constraint?
Select one:
a. A supertype “Person” has subtypes “Employee” and “Manager.” Not all people must belong to one of these subtypes.
b. A supertype “Vehicle” has subtypes “Car,” “Truck,” and “Boat.” Each subtype can have any number of vehicles, including none.
c. A supertype “Animal” has subtypes “Cat,” “Dog,” and “Bird.” All animals must belong to one of these subtypes.

A

A supertype “Animal” has subtypes “Cat,” “Dog,” and “Bird.” All animals must belong to one of these subtypes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

All instances of the subtypes must be an instance of the supertype.
Select one:
a. FALSE
b. TRUE

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Specifies the number of instances of one entity that can (or must) be associated with each instance of another entity.
Select one:
a. weak entity
b. cardinality constraint
c. business rule

A

cardinality constraint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following is an example of a partial completeness constraint?
Select one:
a. A supertype “Color” has subtypes “Red,” “Blue,” and “Green.” Not all colors must belong to one of these subtypes.
b. A supertype “Document” has subtypes “Invoice,” “Receipt,” and “Quote.” Each subtype can have any number of documents, including none.
c. A supertype “Sport” has subtypes “Basketball,” “Football,” and “Baseball.” Each sport must must either be of the subtypes.

A

A supertype “Color” has subtypes “Red,” “Blue,” and “Green.” Not all colors must belong to one of these subtypes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Specifies that if an entity instance (of the supertype) is a member of one subtype, it cannot simultaneously be a member of two (or more) subtypes.
Select one:
a. disjoint rule
b. anchor object
c. overlap rule

A

disjoint rule

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A generic entity type that has a relationship with one or more subtypes.
Select one:
a. subtype
b. supertype

A

supertype

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which of the following is an example of a total completeness constraint?
Select one:
a. A supertype “Furniture” has subtypes “Couch,” “Chair,” and “Table.” Each subtype can have any number of pieces of furniture, including none.
b. A supertype “Person” has subtypes “Teacher,” “Student,” and “Administrator.” All people must belong to one of these subtypes.
c. A supertype “Vehicle” has subtypes “Car,” “Motorcycle,” and “Bicycle.” Not all vehicles must belong to one of these subtypes.

A

A supertype “Person” has subtypes “Teacher,” “Student,” and “Administrator.” All people must belong to one of these subtypes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which of the following is an example of a total completeness constraint?
Select one:
a. A supertype “Food” has subtypes “Meat,” “Vegetables,” and “Fruits.” All types of food must belong to one of these subtypes.
b. A supertype “Device” has subtypes “Phone,” “Tablet,” and “Laptop.” Not all devices must belong to one of these subtypes.
c. A supertype “Animal” has subtypes “Mammals,” “Reptiles,” and “Fish.” Each subtype can have any number of animals, including none.

A

A supertype “Food” has subtypes “Meat,” “Vegetables,” and “Fruits.” All types of food must belong to one of these subtypes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

All instances of the supertype are also instances of one of the subtypes.
Select one:
a. False
b. True

17
Q

A subtype can have a relationship not shared by the supertype.
Select one:
a. True
b. False

18
Q

To remove a relation from a SQL database, we use the ______ command.

Select one:
a. Delete Table
b. Drop Table
c. Remove Table

19
Q

What does SQL stand for?

Select one:
a. Structured Query Language
b. Structured Question Language
c. Strong Question Language

A

Structured Query Language

20
Q

The BETWEEN SQL keywords specifies

Select one:
a. a list of values
b. a column list
c. a range to test in the SQL query search condition

A

a range to test in the SQL query search condition

21
Q

Which one of the following provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in the database?

Select one:
a. Data Manipulation Language
b. Data Control Language
c. Data Definition Language

A

Data Manipulation Language

22
Q

Which of the following SQL statements has correct syntax?

Select one:
a. SELECT * FROM Table1 WHERE Column1 >= 10
b. SELECT * FROM Table1 WHERE Column1 = = 10
c. SELECT * FROM Table1 WHERE Column1 = > 10

A

SELECT * FROM Table1 WHERE Column1 >= 10

23
Q

Which one of the following is used to define the structure of the relation, deleting relations and relating schemas ?

Select one:
a. Data Manipulation Language
b. Data Definition Language
c. Data Control Language

A

Data Definition Language

24
Q

Create table employee (name varchar ,id integer)
What type of statement is this ?

Select one:
a. Data Control Language
b. Data Definition Language
c. Data Manipulation Language

A

Data Definition Language

25
Which of the following is the correct SQL statement to use to remove rows from a table? Select one: a. remove b. delete c. drop
delete
26
Consider the schema STUDENT(student_id, firstname, lastname, course, year) Which of the following statements displays the id number and firstname of all 1st year students? Select one: a. SELECT* FROM Student WHERE year = 1 b. SELECT student_id, firstname FROM Student WHERE year = 1 c. SELECT * FROM Student WHERE year == 1
SELECT student_id, firstname FROM Student WHERE year = 1
27
Which of the following SQL statements deletes all rows in table called SalesData? Select one: a. DELETE * FROM SalesData b. DELETE ALL SalesData c. DELETE FROM SalesData d. DELETE SalesData
DELETE FROM SalesData
28
Which one of the following deletes all the entries but keeps the structure of the relation? Select one: a. Delete from instructor; b. Delete from r where P; c. Delete from instructor where dept name= ’Finance’;
Delete from instructor;
29
Which of the following SQL statements will remove all rows that had a SALES_DATE in the year 1995? Select one: a. DROP FROM sales WHERE YEAR = 1995 b. DROP * FROM sales WHERE YEAR = 1995 c. DELETE FROM sales WHERE YEAR = 1995 d. DELETE * FROM sales WHERE YEAR = 1995
DELETE FROM sales WHERE YEAR = 1995
30
Which SQL statement is used to return only different values? Select one: a. DISTINCT b. DIFFERENT c. UNIQUE
DISTINCT
31
Which of the following is the correct SQL statement to use to remove rows from a table? Select one: a. REMOVE ROW b. DROP c. DELETE
DELETE
32
Consider the schema STUDENT(student_id, firstname, lastname, course, year) Which of the following statements displays all records of student? Select one: a. Select all from students b. Either of the two c. Select * from students
Select * from students
33
Which of the following is a valid wildcard character in a LIKE clause of a SELECT statement? Select one: a. / b. $ c. % d. *
%