Search Header Logo
module 4

module 4

Assessment

Presentation

•

Computers

•

University

•

Practice Problem

•

Medium

Created by

Carlos Theran

Used 2+ times

FREE Resource

25 Slides • 25 Questions

1

media

2

media

3

media

4

Multiple Choice

Which of the following best describes a view in MySQL?

1

A copy of the data stored in a table

2

A logical window into the data stored in underlying tables

3

A physical backup of the database

4

A temporary table created for each query

5

media

6

Open Ended

Explain two important benefits of using views in a database system.

7

media

8

Multiple Select

Which of the following are true about views in SQL? Select all that apply.

1

Views do not duplicate data

2

Views always display current data when opened

3

Only one view can be created per table

4

The name of a view can be used similarly to a table name

9

media

10

Fill in the Blank

Fill in the blank: The SQL command to create a view starts with ___ VIEW view_name AS.

11

media

12

Open Ended

Given the table 'Students' and the view 'data_science_students', what would be the result of the query: SELECT * FROM data_science_students?

13

media

14

Multiple Choice

Which SQL command would you use to remove the view 'data_science_students' from the database?

1

DELETE VIEW data_science_students;

2

REMOVE VIEW data_science_students;

3

DROP VIEW data_science_students;

4

ERASE VIEW data_science_students;

15

media

16

Multiple Choice

What is the main purpose of using indexes in a database?

1

To increase the speed of retrieving data

2

To store more data

3

To ensure data security

4

To reduce the size of the database

17

media

18

Multiple Choice

Which of the following is a primary benefit of creating indexes in a relational database system?

1

Improving database performance

2

Increasing storage requirements

3

Reducing data redundancy

4

Enhancing user interface design

19

Multiple Choice

Which SQL command is used to delete an index from a table?

1

REMOVE INDEX

2

DELETE INDEX

3

DROP INDEX

4

CLEAR INDEX

20

Open Ended

Explain the difference between a single-field index and a multiple-field (composite) index in SQL.

21

media

22

media

23

Fill in the Blank

Fill in the blank: The SQL statement to create an index on the 'department' column of the Employees table is CREATE INDEX idx_department ON Employees (___);

24

media

25

Multiple Select

Select all statements that are true about how indexes affect query performance.

1

Indexes speed up data retrieval in large tables.

2

Indexes always reduce the size of the database.

3

Indexes require processing resources to maintain.

4

Without indexes, queries may require a full table scan.

26

media

27

Open Ended

Describe a scenario where using a composite index would be more beneficial than a single-field index.

28

media

29

Multiple Choice

Which SQL command would you use to view all indexes on the Employees table?

1

SHOW INDEX FROM Employees;

2

SELECT INDEXES FROM Employees;

3

LIST INDEXES ON Employees;

4

DISPLAY INDEXES Employees;

30

media

31

Open Ended

Explain the importance of physical security in database management and provide two examples of how it can be implemented.

32

media

33

Multiple Select

Which of the following statements about entity integrity and referential integrity is/are correct? Select all that apply.

1

Entity integrity ensures primary keys cannot be null.

2

Referential integrity ensures foreign keys match primary keys in another table.

3

Entity integrity allows duplicate primary keys.

4

Referential integrity is not related to foreign keys.

34

media

35

Fill in the Blank

Legal-values integrity in a database ensures that only ___ values are accepted in a field.

36

media

37

Open Ended

Given the table definitions for Departments and Employees, how does the FOREIGN KEY constraint help maintain data integrity between these tables?

38

media

39

Multiple Choice

What will happen if you try to insert an employee with a dept_id that does not exist in the Departments table?

1

The insertion will fail due to referential integrity rules.

2

The employee will be added with a null dept_id.

3

The employee will be added, but the dept_id will be ignored.

4

The insertion will succeed without any errors.

40

media

41

Fill in the Blank

To add a new field to a table in Access, you can use the ___ in Table Design View.

42

media

43

Multiple Select

Which of the following operations can be performed using the SQL ALTER TABLE command?

1

Adding and removing tables

2

Adding and removing fields

3

Creating and dropping indexes

4

All of the above

44

Multiple Choice

Which SQL command would you use to change the datatype of an existing column in a table?

1

MODIFY column_name datatype

2

ADD column_name datatype

3

DROP COLUMN column_name

4

RENAME COLUMN old_name TO new_name

45

media

46

media

47

Open Ended

Explain the difference between INNER JOIN and LEFT JOIN in SQL. Provide an example scenario where each would be used.

48

media

49

Open Ended

What steps should you take if you encounter orphan records when trying to enforce referential integrity?

50

Multiple Choice

Which of the following is a benefit of creating indexes in a relational database system?

1

Improves database performance

2

Increases data redundancy

3

Slows down query processing

4

Reduces data security

media

Show answer

Auto Play

Slide 1 / 50

SLIDE