advanced database traditional 1

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

1/328

encourage image

There's no tags or description

Looks like no tags are added yet.

329 Terms

1
New cards

In a relational database, data is stored in one or more

Tables

2
New cards

The columns of a relational database table are referred to as

Fields

3
New cards

The rows of a relational database table are referred to as

Records

4
New cards

The column that uniquely identifies each row in the table is called

Primary key

5
New cards

A primary key that consists of two or more columns is called a

Composite primary key

6
New cards

An is automatically created for each key you define.

Index

7
New cards

Like a key, an index can include one or more

Columns

8
New cards

When one row in a table is related to one or more rows in another table, this is called a

One-to-many relationship

9
New cards

Typical relationships exist between the primary key in one table and the

Foreign key in another table.

10
New cards

One-to-one relationships are frequently used.

True

11
New cards

Which type of relationship is the most common?

One-to-many relationship

12
New cards

If two tables have a one-to-one relationship, the data in the two tables could really be stored in a single table.

True

13
New cards

A many-to-many relationship is usually implemented by using a(n)

Intermediate table.

14
New cards

A many-to-many relationship can usually be broken down into two one-to-many relationships.

True

15
New cards

To define a column in a table, you assign what are called

Properties.

16
New cards

The most critical column property is its

Data type.

17
New cards

When choosing a data type, try to assign the type that minimizes disk storage use in order to improve performance of the

Queries.

18
New cards

Null represents a value that is

Not applicable, unknown, unavailable.

19
New cards

The NN column property represents

Not Null.

20
New cards

If you don't allow null values for a column, you must provide a value for that column.

True

21
New cards

A is a value assigned to a column when another value isn't provided.

Default value.

22
New cards

An auto column is a numeric column whose value is generated automatically when a row is added to the table.

Increment.

23
New cards

Two types of diagrams: ER diagram and an

Enhanced entity-relationship (EER) diagram.

24
New cards

The EER diagram uses the icon to show a primary key column.

Key.

25
New cards

The vendor_state column is assigned what data type?

CHAR.

26
New cards

The table begins with two primary key columns.

Invoicelineitems.

27
New cards

The OneSymbol.png symbol refers to the part of a one-to-many relationship.

One.

28
New cards

The Crow’s Feet symbol refers to the part of a one-to-many relationship.

Many.

29
New cards

SQL programmers typically work with statements.

DML.

30
New cards

The SELECT clause names the

Columns to be retrieved.

31
New cards

The FROM clause names the

Tables where columns come from.

32
New cards

A calculated column only exists in the results of a query.

True.

33
New cards

In the SELECT statement, the WHERE clause gives criteria for which are selected.

Rows.

34
New cards

In a SELECT statement, the clause returns sorted rows.

ORDER BY.

35
New cards

The SELECT statement returns what is called a result set, also called the result table.

Temporarily.

36
New cards

The SELECT statement is commonly referred to as a

Query.

37
New cards

When you retrieve data from two tables, this type of operation is called a

Join.

38
New cards

This is the most common type of join where the rows from the tables are only included in the result set if their related columns match.

INNER join.

39
New cards

Use the clause on the SELECT statement to retrieve data from two tables.

FROM.

40
New cards

An INSERT statement adds a to a table, as demonstrated in Figure 1-14.

Row.

41
New cards

What statement is used to change the data in one or more rows of a table?

UPDATE.

42
New cards

Use the statement to delete rows from a table.

DELETE.

43
New cards

Because inserting, updating, and deleting causes permanent changes to a database, the textbook recommends that you do not perform any of these commands until you understand the effect that they can have on the database.

True.

44
New cards

SQL is a freeform language. That means that you can include without affecting the way the database interprets the code.

Spaces, indentation, line breaks.

45
New cards

SQL is case-sensitive.

False.

46
New cards

Coding recommendations include: Capitalize keywords, Start each clause on a new line, Separate words with underscores, Break long clauses into multiple lines and indent continued lines.

True.

47
New cards

Use /* and */ to code a comment.

Block.

48
New cards

Use -- to code a comment.

Single-line.

49
New cards

Before you can work with a database, you need to connect to the database

Server.

50
New cards

If a password appears when making a connection, an option can be checked to save the password in a.

Vault.

51
New cards

To clear the password from the vault, right-click the connection, select Edit Connection, and click Clear.

True.

52
New cards

To connect to a MySQL server on another computer, right-click the connection and select Edit Connections.

True.

53
New cards

To add a new connection, click the icon to the right of MySQL Connections.

Plus.

54
New cards

The database server is also referred to as the database

Engine.

55
New cards

After you connect to a database server, use the category of the Navigator window to navigate objects.

SCHEMAS.

56
New cards

Database objects include:

Tables, functions, stored procedures, views.

57
New cards

To work with a node or object, right-click to display a .

Context-sensitive menu.

58
New cards

Double-click the node for a database to select it and the objects it contains.

View.

59
New cards

To navigate through objects, click the to the left of each node.

Arrows.

60
New cards

To view table data, right-click the table name and select 'Select Rows – Limit 1000.'

True.

61
New cards

The table data is displayed in the .

Result Grid.

62
New cards

To insert, edit, and delete rows, use the buttons at the .

Top of the Result Grid.

63
New cards

To apply changes, click Apply at the .

Bottom of the Result Grid.

64
New cards

Use the button to cancel changes.

Revert.

65
New cards

Column information includes .

The column’s data type, the column name.

66
New cards

Use the tab to add, delete, or modify a column.

Columns.

67
New cards

Add a new column by .

Entering it at the bottom.

68
New cards

Delete a column by right-clicking on the column and selecting Delete.

True.

69
New cards

Change the name of a column by selecting the column and editing it.

True.

70
New cards

Later you’ll learn how to use to edit column definitions.

Scripts.

71
New cards

To view column definitions, right-click the table name and select .

Alter.

72
New cards

A SQL tab automatically opens when you connect to a server.

True.

73
New cards

Keywords in the editor are displayed in .

Blue.

74
New cards

New SQL tab button:

B.

75
New cards

SQL editor area:

D.

76
New cards

Execute current SQL statement:

C.

77
New cards

Result grid area:

E.

78
New cards

Window to select a database:

A.

79
New cards

If an error occurs, Workbench displays:

A brief description, the error number.

80
New cards

Errors can be caused by:

Misspelling a keyword, Selecting the wrong database, Misspelling a table/column name, Omitting a closing quote.

81
New cards

Error messages appear in the tab.

Output.

82
New cards

In MySQL, is a file containing SQL statements.

Script.

83
New cards

Script files use the extension.

.sql.

84
New cards

To switch between open scripts, select the appropriate tab.

True.

85
New cards

The Open SQL Script File button is in the part of Workbench.

Upper left.

86
New cards

A SQL script usually contains .

Multiple SQL statements.

87
New cards

End each statement with a .

; (semicolon).

88
New cards

To execute one statement, move the insertion point into it and click Execute Current Statement.

True.

89
New cards

To execute all statements, press Ctrl+Shift+Enter or click .

Execute SQL Script.

90
New cards

You can also execute selected statements only.

True.

91
New cards

It’s important to be aware of the MySQL Command Line Client.

True.

92
New cards

The MySQL Command Line Client prompt looks like:

mysql>.

93
New cards

To stop the Command Line Client, enter exit or quit followed by a .

; (semicolon).

94
New cards

If you enter the show databases statement into the MySQL Command Line and this appears on the screen: mysql> show databases -> This means: you forgot to type a semicolon at the end of the show databases statement.

True.

95
New cards

To list the names of the databases stored on a server, use the statement.

show databases.

96
New cards

After displaying the database names, you can select a database to use. What full SQL statement would you type to select the database named ex?

use ex;.

97
New cards

SQL statements are not case sensitive.

False.

98
New cards

A scroll bar indicates columns than displayed.

More.

99
New cards

Without ORDER BY, rows appear in primary key sequence.

True.

100
New cards

The symbol means retrieve all columns.

True.