Lesson 3 Flashcards
Domain
In data modeling, the construct used to organize and describe an attribute’s set of possible values.
Key
One or more attributes that determine other attributes.
What are the types of keys?
- Superkey
- Candidate key
- Primary key
- Secondary key
- Foreign key
Primary key
- In the relational model, an identifier composed of one or more attributes that uniquely identifies a row.
candidate key is selected as a unique entity identifier.
Determination
The role of a key
- In a database table, ‘B determines A’ means that knowing the value of [attribute B] allows you to find the value of [attribute A].
- If [B] is a key, this relationship is special: Each value of [B] uniquely identifies a single record, and thus, a single value of [A].
- This ensures that no two rows have the same value for [B].”
Functional dependence
Within a relation R:
- An [attribute A] is functionally dependent on an [attribute B] if and only if
- A given value of [attribute B] determines exactly one value of [attribute A].
- The “relationship A is dependent on B” is equivalent to “B determines A,” and is written as B-> A.
Determinant
Any attribute in a specific row whose value directly determines other values in that row
Dependent
An attribute whose value is determined by another attribute.
Full functional dependence
A condition in which an attribute is functionally dependent on a composite key but not on any subset of the key.
Composite key
A multiple-attribute key
Key attributes
The attributes that form a primary key
Superkey
Every candidate key is a superkey, but not every superkey is a candidate key.
- Any combination of columns(attributes) that uniquely identifies a row in a table.
- Think of it like a complete address; it has all the information you need to find a specific location.
Candidate key
- A candidate key is a minimal superkey.
- It means you can’t remove any columns (attributes) from it, but still have it uniquely identify a row.
Like a shortened address, it has just the essential information to find the location.
Entity integrity
- A property of a relational table.
- Guarantees each entity has a unique value in a primary key.
- Also that the primary key has no null values.
Null
- Note that a null is not a blank.
- The absence of an attribute value.
Foreign key (FK)
An attribute or attributes in one table whose values must match the primary key in another table or whose values must be null.
Referential integrity
A condition by which a dependent table’s foreign key must have either a null entry or a matching entry in the related table.
Secondary key
- A key used strictly for data retrieval purposes.
- For example, customers are not likely to know their customer number (primary key), but the combination of last name, first name, middle initial, and telephone number will probably match the appropriate table row.
What are the 3 types of referential integrity rules?
- Delete
- Insert
- Update
Flags
Special codes implemented by designers to trigger a:
- required response
- alert end users to specified conditions
- encode values.
Flags may be used to prevent nulls by bringing attention to the absence of a value in a table.
Composite entity
- Designed to transform an M:M relationship into two 1:M relationships.
- The composite entity’s primary key comprises at least the primary keys of the entities that it connects.
What are the other names that refer to the definition of composite entity?
- Bridge entity
- Associative entity
Linking table
also known as a junction table or an associative entity
Used to implement a many-to-many (M:M) relationship, which is then resolved into two one-to-many (1:M) relationships
Index
- An ordered array of index key values and row ID values (pointers).
- Indexes are generally used to speed up and facilitate data retrieval.
_____ ____ can also be referred to as a index
Index key
Unique index
An index in which the index key can have only one associated pointer value (row).
What’s the practical significance of taking the logical view?
The logical view serves as a reminder of the simple file concept of data storage.
A table can also be thought as?
A persistent representation of a logical relation.
Why is the order of the rows and columns not important to the DBMS?
- DBMSs don’t care about row or column order.
- They use queries based on names and values.
- Rearranging them doesn’t change the underlying data in the database.
String data types may not be intended for mathematical manipulation, but can include ___ ?
Character sets that can include digits or a numeric string.