Database Systems Test 1

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/53

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

54 Terms

1
New cards

b

Which statement is not a special case of foreign keys?

a. Multiple foreign keys referring to the same primary key

b. Foreign key referring to a foreign key in the same table

c. Composite foreign key referring to a composite primary key

d. Foreign key referring to a primary key in the same table

2
New cards

d

Which principle defines data independence?

a. Modification of indexes generates different results

b. Tuning query performance requires application modifications

c. Logical design maintains schema integrity

d. Physical design never affects query results

3
New cards

a

An entity named Stadium contains a primary key SeatNumber and a plural attribute SeatReservation which records spectator seat assignments. During implimentation, the plural attributes moved to a new table named ____

a. StadiumSeatReservation

b. StadiumSeatNumber

c. SeatReservationSeatNumber

d. SeatNumberSeatReservation

4
New cards

b

When creating an ER diagram, a dependency relationship is drawn with an arrow pointing to a ____ entity

a. independent

b. master

c. existence

d. functional

5
New cards

d

Boyce-Codd normal form provides an improvement over ____ normal form

a. second

b. first

c. fourth

d. third

6
New cards

a

What is the greatest number of instances of one entity that can relate to a single instance of another entity

a. Maximum

b. Minimum

c. Many-many

d. One

7
New cards

a

During database design, an entity with many optional attributes often becomes a(n) ____

a. Supertype

b. Master

c. Dependent

d. Independent

8
New cards

a

Optional attributes and relationships become columns that allow for ____ values

a. NULL

b. composite

c. artificial

d. subtype

9
New cards

a

Which two rules apply to primary keys?

a. Values must be unique and may not be NULL

b. Values can have duplicates and can be NULL

c. Values must be unique and can be NULL

d. Values can have duplicates and may not be NULL

10
New cards

b

The entity Book includes Paperback, Hardcover, and Digital books. The attribute ChapterCount applies to both PaperBack and HardCover but not Digital. Digital has a TextToSpeech attribute. Which entitiy type is Digital?

a. Supertype

b. Subtype

c. Similar

d. Master

11
New cards

d

Refer to the Teacher and Class tables. To maintain referential integrity, which foreign key action rejects the deletion of the row containing Rosa Lopez?
(There’s a table)

a. SET NULL

b. CASCADE

c. SET DEFAULT

d. RESTRICT

12
New cards

b

In the following ER diagram, what does ‘AlbumTitle’ represent?
ER diagram below:

records
Artist: ——→ Album:
ID _________ ID
Fname _____ AlbumYear
Lname _____ AlbumTitle

a. Relationship

b. Attribute

c. Key

d. Entity

13
New cards

d

Which role focuses on creating software that interacts with a database?

a. Designer

b. User

c. Administrator

d. Programmer

14
New cards

b

How are attributes documented in an entity-relationship diagram? (in ZyBook)

a. As a branching line from an entity

b. Within an entity rectangle

c. With a relationship line

d. As a shape connected to an entity

15
New cards

c

Refer to the Teacher and Class tables. Which foreign key action updates the TeacherID for the Web Development course to 45672 when Bryan McNeal’s Teacher ID is updated to 45672?
(TeacherID is a primary key in Teacher and a foreign key in Class)

a. SET DEFAULT

b. SET NULL

c. CASCADE

d. RESTRICT

16
New cards

a

Is DegreeCode a valid foreign key?

(o) DegreeCode: ———> (*) Code:
13 ____________________ 47
NULL _________________ 13
91 ____________________ 39
64 ____________________ 69

a. No

b. Yes

17
New cards

d

TaxiFleet: ——- OWNS ——— Taxi:
TaxiFleetID ______________ TaxiMedallionNumber
1(0) ____________ M(1)

What is the name of the new foreign key?

a. TaxiMedallionNumberTaxtFleetID

b. TaxiMediallionNumber

c. TaxiFleetIDTaxiMedallionNumber

d. TaxiFleetID

18
New cards

a

A person may not have a mobile phone. Determine the minimum for the attribute.
Entity Person, attribute MobilePhoneNumber

a. zero

b. one

19
New cards

b

With SET DEFAULT referential integrity, what happens if the row containing Slovenia is deleted from the country table
(There is a table connecting to a different table)

a. Delete is rejected

b. Row is deleted

20
New cards

c

Each title may be used for many books. Each book has at most one title. Determine the maxima for each Entity-Has-Attribute relationship
Entity Book, attribute Title

a. one-many

b. one-one

c. many-one

d. many-many

21
New cards

7000

Country:
Area1: _____________ Area2:
1897000 ___________ NULL
6000 ______________ 1000
NULL ______________ NULL
NULL ______________ 360000
NULL ______________ 67000

SELECT MAX(Area1 + Area2)
FROM Country;

Enter the result:

22
New cards

a

Assume the following rules:

A company has different divisions
A division may have many departments, and each department is in one division
The primary key of division is DivisionNumber
Each department has a required DepartmentName and DepartmentCode
DepartmentName is unique across all Departments
DepartmentCode is unique within a division but may be repeated for departments in different divisions

Select the best primary key for the department table

a. (DivisionNumber, DepartmentCode)

b. DepartmentName

c. DepartmentCode

d. (DivisionNumber, DepartmentName)

23
New cards

b

With RESTRICT referential integrity, what happens if the row containing Finland is denied from the Country table? (There is a table)

a. Row is deleted

b. Delete is rejected

24
New cards

100

Area:
100
NULL
NULL
93400
200

SELECT MIN(Area)
FROM Country;

Enter the result:

25
New cards

a

Column Names:

*ISO, CountryName, IndependenceDate, IndependenceYear

What columns depend on IndependenceDate?

a. IndependenceYear

b. ISO

c. CountryName

26
New cards

b

TaxiFleet: ——- OWNS ——— Taxi:

TaxiFleetID ______________ TaxiMedallionNumber

1(0) ____________________ M(1)

Are NULLs allowed in the foreign keys columns?

a. No

b. Yes

27
New cards

c

A book is not necessarily borrowed. A person may not have borrowed any books. Determine the relationship minima. Person-Borrows-Book

a. one-one

b. one-zero

c. zero-zero

d. zero-one

28
New cards

2257000

Country:

Area1: _____________ Area2:

1897000 ___________ NULL

6000 ______________ 1000

NULL ______________ NULL

NULL ______________ 360000

NULL ______________ 67000

SELECT MAX(Area1) + MAX(Area2)
FROM Country;

Enter the result:

29
New cards

b

Can Continent be a primary key of the Country table?

Continent:
Africa
NAmerica
Africa
Oceania
Africa

a. Yes

b. No

30
New cards

b

A streaming video service’s database is disabled due to a lightning strike. The IT department verifies that all database transactions performed before the lightning strike were saved on storage media

a. Prevent conflicts between concurrent transactions

b. Ensure transaction results are never lost

c. Transaction processed completely or not at all

31
New cards

c

Where are duplicate column names allowed?

a. Within a single table

b. Never

c. In different tables

32
New cards

b

Employee:
ID:
2538
5384
6381

A new employee can be added with ID 5384

a. True
b. False

33
New cards

c

How does a database administrator specify column names and data types?

a. With the Python language

b. In a special file managed by the database administrator

c. With the SQL language

34
New cards

b

What is the result of a relational operation?

a. A column

b. A table

c. A row

35
New cards
36
New cards
37
New cards
38
New cards
39
New cards
40
New cards
41
New cards
42
New cards
43
New cards
44
New cards
45
New cards
46
New cards
47
New cards
48
New cards
49
New cards
50
New cards
51
New cards
52
New cards
53
New cards
54
New cards