Chapter 2 Flashcards

(38 cards)

1
Q

A database model is a conceptual framework for database systems, with three parts:

A

Data structures that prescribe how data is organized.
Operations that manipulate data structures.
Rules that govern valid data.

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

A table has

A

name, a fixed tuple of columns, and a varying set of rows

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

A column has

A

name and a data type.

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

A row is

A

unnamed tuple of values. Each value corresponds to a column and belongs to the column’s data type

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

A data type is a

A

named set of values, from which column values are drawn.

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

Database/Mathematics/File System
Table/Relation/File

A

A container for storing related data.

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

Database/Mathematics/File System
Row/Tuple/Record

A

A single entry or instance in the container.

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

Database/Mathematics/File System
Column/Attribute/Field

A

A property or characteristic of the entity.

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

Database/Mathematics/File System
Data Type/Domain/Data Type

A

Specifies valid values for data.

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

Relational operations - Select

A

selects a subset of (or all) rows of a table

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

Relational operations - Project

A

selects one or more columns of a table

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

Relational operations - Product

A

lists all combinations of rows of two tables

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

Relational operations - Join

A

combines two tables by comparing related columns

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

Relational operations - Union

A

selects all rows of two tables

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

Relational operations - Intersect

A

selects rows common to two tables.

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

Relational operations - Difference

A

selects rows that appear in one table but not another

17
Q

Relational operations - Rename

A

changes a table name

18
Q

Relational operations - Aggregate

A

computes functions over multiple table rows, such as sum and count

19
Q

Relational rules -Unique primary key

A

All tables have a primary key column, or group of columns, in which values may not repeat

20
Q

Relational rules - Unique column names

A

Different columns of the same table have different names.

21
Q

Relational rules -No duplicate rows

A

No two rows of the same table have identical values in all columns

22
Q

sublanguages-Data Definition Language

A

defines database structure

23
Q

sublanguages-Data Query Language

A

retrieves data

24
Q

sublanguages-Data Manipulation
Language

A

inserts, updates, and deletes
data.

25
sublanguages-Data Transaction Language
manages transactions
26
sublanguages-Data Control Language
Data Control Language
27
Language elements -Literal
Explicit value such as a character string or number. String literals are enclosed in either single or double quotes
28
Language elements -Keyword
Word with a special meaning for the language processor. Keywords are defined by the database system
29
Language elements -Identifier
Name of a database object, such as a column, table, or database. Identifiers are specified by the programmer
30
Language elements -Expression
Sequence of literals, identifiers, and operations that evaluate to a single value
31
Language elements -Comment
Text that is ignored by the language processor. Single-line comments begin with-- followed by a space. Multi-line comments are enclosed in/ * and */.
32
Syntax definitions -UPPERCASE
text indicates SQL keywords.
33
Syntax definitions -lower case
text indicates an identifier or expression provided by the user. In some cases, lower case text is a placeholder for a complex construction, defined elsewhere.
34
Syntax definitions -Square brackets []
enclose an optional language element
35
Syntax definitions - Curly braces {}
enclose a series of alternative language elements, separated by vertical bars. One, and only one, of the alternatives must be included in the statement.
36
Syntax definitions - Ellipsis ...
indicates that the preceding language element may be repeated
37
Syntax definitions - Parentheses ()
and commas are literal symbols. Unlike brackets and braces, parentheses and commas appear in SQL statements exactly as written in the syntax definition.
38