Explore fundamental relational data concepts

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/89

encourage image

There's no tags or description

Looks like no tags are added yet.

90 Terms

1
New cards

An organization has multiple applications, each storing data in its own unique structure, making the data inefficient, hard to maintain, and hard to optimize. Which data model was designed to solve this problem? a) Relational database model b) Document database model c) Key-value database model

a

2
New cards

Which feature of the relational database model is described as an intuitive, efficient, and flexible way to store and access structured information? a) JSON documents b) Tables c) Graph structures

b

3
New cards

A retail company wants to track its customers, products, orders, and line items. In a relational database, what does each row in the customer table represent? a) A collection of customer attributes b) A relationship between customers c) A single instance of a customer entity

c

4
New cards

A Customer table includes a MiddleName column that can be empty for customers with no middle name or whose middle name is unknown. What term describes this empty value? a) NULL b) Blank c) Zero

a

5
New cards

A Product table has a Price column that stores decimal numeric data rather than text. What determines the kind of data a column stores? a) The number of rows in the table b) The column's datatype c) The table's primary key

b

6
New cards

A database designer wants to use standard datatypes that are supported by most database systems. Which organization defines these standard datatypes? a) IEEE b) ISO c) American National Standards Institute (ANSI)

c

7
New cards

A company's sales spreadsheet duplicates customer and product details for each line item sold. What schema design process should be applied to minimize this data duplication? a) Normalization b) Denormalization c) Indexing

a

8
New cards

Which of the following is a simple normalization rule? a) Combine multiple entities into a single table b) Separate each discrete attribute into its own column c) Store duplicate values to make each row self-contained

b

9
New cards

A database designer needs to uniquely identify each row in a Customer table. What should be used? a) A foreign key b) A composite key c) A primary key

c

10
New cards

An Order table needs to reference the customer who placed the order. What should be stored in the Order table? a) The customer's primary key as a foreign key b) A copy of the customer's address c) The customer's name as a text value

a

11
New cards

A relational database management system prevents an order from being created for a customer that does not exist in the Customer table. What is this enforcement called? a) Normalization b) Referential integrity c) Indexing

b

12
New cards

A LineItem table uses a unique combination of OrderNo and ItemNo to identify each line item. What type of key is this? a) Primary key b) Foreign key c) Composite key

c

13
New cards

What does SQL stand for? a) Structured Query Language b) Standard Query Logic c) Sequential Query Language

a

14
New cards

In what year was SQL originally standardized by ANSI? a) 1987 b) 1986 c) 1990

b

15
New cards

Which SQL dialect is used by Microsoft SQL Server and Azure SQL Database? a) PL/SQL b) PL/pgSQL c) Transact-SQL (T-SQL)

c

16
New cards

Which SQL dialect is used by Oracle and stands for Procedural Language/SQL? a) PL/SQL b) T-SQL c) PL/pgSQL

a

17
New cards

Which SQL dialect is the procedural language implemented in PostgreSQL? a) T-SQL b) PL/pgSQL c) PL/SQL

b

18
New cards

A database administrator needs to create a new table in the database. Which category of SQL statement should be used? a) DML b) DCL c) DDL

c

19
New cards

Which DDL statement modifies the structure of an existing table, such as adding a new column? a) ALTER b) CREATE c) DROP

a

20
New cards

A database administrator wants to permanently remove a table and all its rows from the database. Which statement should be used? a) DELETE b) DROP c) RENAME

b

21
New cards

Which DCL statement grants a user permission to read and modify data in a table? a) DENY b) REVOKE c) GRANT

c

22
New cards

Which DML statement is used to retrieve rows from a table? a) SELECT b) INSERT c) UPDATE

a

23
New cards

By default, an UPDATE statement without a WHERE clause will: a) Modify only the first row b) Modify every row in the table c) Fail with an error

b

24
New cards

Which clause is used to specify criteria so that only matching rows are selected, updated, or deleted? a) ORDER BY b) JOIN c) WHERE

c

25
New cards

Which clause sorts the results of a SELECT statement by a specified column? a) ORDER BY b) WHERE c) JOIN

a

26
New cards

Which clause retrieves data from multiple tables by matching a foreign key in one table with its associated primary key in the other? a) WHERE b) JOIN c) ORDER BY

b

27
New cards

In Transact-SQL, why is the table name [Order] enclosed in square brackets? a) Because it references a foreign key b) Because the table is stored in a different schema c) Because ORDER is a reserved keyword in Transact-SQL

c

28
New cards

A column defined with the NOT NULL clause: a) Must always contain a value b) Becomes the primary key automatically c) Has a default value assigned

a

29
New cards

What does VARCHAR stand for? a) Verified character data b) Variable length character data c) Virtual character data

b

30
New cards

What does the INT datatype store? a) Decimal numbers b) Text strings c) An integer or whole number

c

31
New cards

A view in a relational database is best described as: a) A virtual table based on a SELECT query b) A physical copy of table data c) A sorted index of table rows

a

32
New cards

Which SQL statement is used to execute a stored procedure? a) RUN b) EXEC c) CALL

b

33
New cards

An index over a table is most similar to: a) A table of contents b) A library card catalog c) An index at the back of a book

c

34
New cards

What does a database index contain? a) A copy of the indexed column's data in sorted order with pointers to the corresponding rows b) A backup of the entire table c) Only the primary key values

a

35
New cards

For a table with few rows, what typically happens when a query uses an indexed column? a) The index always speeds up the query b) The query optimizer may ignore the index because reading the entire table is just as efficient c) The query fails because the index is too small

b

36
New cards

What is a cost of creating an index on a table? a) It slows down SELECT queries b) It prevents the table from being joined c) It consumes storage and must be maintained on every insert, update, and delete

c

37
New cards

Which of the following is NOT a DDL statement? a) INSERT b) CREATE c) ALTER

a

38
New cards

A stored procedure is used to: a) Create a virtual table b) Encapsulate programmatic logic in a database c) Speed up search operations on a column

b

39
New cards

Which Azure capability can generate T-SQL queries using natural language? a) Azure Stream Analytics b) Azure Data Explorer c) Microsoft Copilot in Azure

c

40
New cards

Which of the following is a common RDBMS that uses SQL? a) PostgreSQL b) MongoDB c) Redis

a

41
New cards

Ensuring that product prices are stored as decimal values and line item quantities as integers is a benefit of: a) Removing data duplication b) Constraining values to appropriate data types c) Creating foreign key relationships

b

42
New cards

In a relational database, an entity can be: a) Only a physical object b) Only a business transaction c) Anything for which you want to record information

c

43
New cards

A database administrator needs to rename an existing table. Which DDL statement should be used? a) RENAME b) ALTER c) CREATE

a

44
New cards

Which DCL statement denies permission to perform specific actions? a) GRANT b) DENY c) REVOKE

b

45
New cards

Which DML statement inserts new rows into a table? a) SELECT b) UPDATE c) INSERT

c

46
New cards

A view provides a way to: a) Query data as a virtual table based on a SELECT query b) Permanently store data separately from the underlying tables c) Speed up insert operations

a

47
New cards

Which SQL statement type is used to manipulate the rows in tables, including retrieving, inserting, modifying, and deleting data? a) DDL b) DML c) DCL

b

48
New cards

A company wants to improve query performance on a large Product table when searching by product name. What should be created? a) A view on the Product table b) A stored procedure c) An index on the Name column

c

49
New cards

In the normalization example, changing a customer's address requires modifying: a) A single row in the Customer table b) Every row that references that customer c) The Order table only

a

50
New cards

Decomposition of attributes into individual columns during normalization provides: a) Removal of primary keys b) Granularity for querying, such as filtering customers by city c) Elimination of foreign keys

b

51
New cards

The relational model is used by organizations of all types and sizes for: a) Only large enterprises b) Only transactional systems c) A broad variety of information management needs

c

52
New cards

Proprietary SQL extensions provide functionality NOT covered by the SQL standard, including: a) Security management and programmability b) Data definition and data manipulation c) Standard query operations

a

53
New cards

Which statement is true about the basic form of an INSERT statement? a) It inserts multiple rows at once b) It inserts one row at a time c) It cannot specify column names

b

54
New cards

The SELECT * statement retrieves: a) Only the primary key column b) Only the first row c) All columns from the table

c

55
New cards

In the CREATE TABLE example from the module, the Price column is defined as: a) DECIMAL NULL b) INT NOT NULL c) VARCHAR(20)

a

56
New cards

A join condition typically matches: a) Two primary keys from the same table b) A foreign key from one table and its associated primary key in another table c) Two foreign keys from different tables

b

57
New cards

The GRANT statement in the module permits user1 to: a) Create new tables b) Delete the Product table c) Read, insert, and modify data in the Product table

c

58
New cards

When a query returns many rows, they: a) Don't necessarily appear in any specific sequence b) Always appear in primary key order c) Always appear in alphabetical order

a

59
New cards

The UPDATE example in the module changes the Address column for rows that have: a) Any ID value b) The value 1 in the ID column c) NULL in the ID column

b

60
New cards

The DELETE example in the module removes rows from the Product table where: a) ID = 1 b) ID = 99 c) ID = 162

c

61
New cards

The stored procedure example in the module is named: a) RenameProduct b) UpdateProduct c) ChangeProduct

a

62
New cards

The index example in the module creates an index named: a) idx_ProductPrice b) idx_ProductName c) idx_ProductID

b

63
New cards

The index creates what type of structure that the query optimizer can use? a) A hash table b) A linked list c) A tree-based structure

c

64
New cards

How many indexes can you create on a table? a) Many b) Only one c) A maximum of two

a

65
New cards

What must you strike a balance between when deciding whether to create an index? a) The number of columns and the number of rows b) Having indexes that speed up queries versus the cost of maintaining them during insert, update, and delete operations c) The size of the database and the number of users

b

66
New cards

The SQL code examples in the module are based on which dialect? a) PL/SQL b) PL/pgSQL c) Transact-SQL

c

67
New cards

Which of the following is mentioned as a common RDBMS that uses SQL? a) MySQL b) MongoDB c) Cassandra

a

68
New cards

Azure SQL Managed Instance uses which SQL dialect? a) PL/SQL b) Transact-SQL c) PL/pgSQL

b

69
New cards

T-SQL includes proprietary extensions for: a) Only basic queries b) Only data definition c) Writing stored procedures and triggers, and managing user accounts

c

70
New cards

A trigger is described in the module as: a) Application code that can be stored in the database b) A type of index c) A virtual table

a

71
New cards

The relational database model was designed to solve the problem of multiple arbitrary data structures.

True

72
New cards

In a relational table, every row must have a value in every column.

False

73
New cards

ANSI standard datatypes are supported by most database systems.

True

74
New cards

Normalization separates each entity into its own table and each discrete attribute into its own column.

True

75
New cards

Referential integrity prevents orders from being created for customers that do not exist in the Customer table.

True

76
New cards

SQL was originally standardized by ISO in 1986 and by ANSI in 1987.

False

77
New cards

The DROP statement can be reversed by using an UNDO command.

False

78
New cards

By default, a DELETE statement without a WHERE clause removes every row from the table.

True

79
New cards

An index always improves query performance, regardless of table size.

False

80
New cards

A composite key is based on a unique combination of multiple columns.

True

81
New cards

A view stores its own copy of the data separately from the underlying tables.

False

82
New cards

A stored procedure can accept parameters to create a flexible solution for common actions.

True

83
New cards

Indexes consume storage space and must be maintained on insert, update, and delete operations.

True

84
New cards

The ORDER BY clause is used to sort the results of a SELECT statement.

True

85
New cards

T-SQL is the SQL dialect used by PostgreSQL.

False

86
New cards

Microsoft Copilot in Azure can generate T-SQL queries using natural language.

True

87
New cards

A primary key uniquely identifies each entity instance in a table.

True

88
New cards

A foreign key is stored in one table to reference the primary key of a related entity in another table.

True

89
New cards

The basic form of an INSERT statement can insert multiple rows at a time.

False

90
New cards

The SELECT statement without a WHERE clause returns all rows from the table.

True