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
A On B
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:
- null entry
- 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.
A candidate key is a ______ superkey without any _______ attributes.
A candidate key is a minimal superkey without any unnecessary attributes.
Each table _____ represents an attribute.
Column
Date attributes contain calendar dates stored in a special format known as the _____ date format.
Julian
A table is also called a _____ because the relational model’s creator, E. F. Codd, used the two terms as synonyms.
Relation
In a relational table, each column has a specific range of values known as the ______ domain.
Attribute
_____ logic, used extensively in mathematics, provides a framework in which an assertion (statement of fact) can be verified as either true or false.
Predicate
Primary keys are required in relational databases to ensure ___.
entity integrity
Why is the idea of unique determination irrelevant to how databases function?
- “Determination” isn’t unique to databases.
- It also exists in math and logic, where something is precisely defined or fixed.
For example, in a function, the input determines the output.
How many types of attributes can determine functional dependence?
Functional dependencies can be determined by a single attribute or a combination of multiple attributes.
If the [attribute (B)] is functionally dependent on a [composite key (A)]; but not on any subset of that composite key, the [attribute (B)] is fully __?
- Functional Dependency: Attribute B is functionally dependent on attribute A if each value of A determines exactly one value of B.
- Composite Key: A composite key is a key that consists of two or more attributes.
- Full Functional Dependency: A full functional dependency occurs when an attribute (B) is functionally dependent on a composite key (A), but not on any subset of that composite key.
When you press the Enter key or the Tab key to move to the next entry without making a prior entry of any kind.
This creates what?
A NULL is created
When can nulls create problems?
- Variety of the applications- development, software & it’s sophistication.
- When functions such as COUNT, AVERAGE, and SUM are used.
In the relational model, _____ are important because they are used to ensure that each row in a table is uniquely identifiable.
Keys
A _____ is a key that can uniquely identify any row in the table.
Superkey
A _____ key can be described as a minimal superkey, a superkey without any unnecessary attributes.
Candidate
A _____ is the primary key of one table that has been placed into another table to create a common attribute.
Foreign key
A _____ key is defined as a key that is used strictly for data retrieval purposes.
Secondary
When you define a table’s primary key, the DBMS automatically creates a(n) _____ index on the primary key column(s) you declared.
Unique
In a relational model, ____ are also used to establish relationships among tables and to ensure the integrity of the data.
Keys
A primary key is a _____ key selected to uniquely identify all other attribute values in any given row.
Candidate
A table is also called a relation because the relational model’s creator, E. F. Codd, used the two terms as __________.
Synonyms
A ______ is perceived as a two-dimensional structure composed of rows and columns.
Table
The word ______, also known as a dataset in Microsoft Access, is based on the mathematical set theory from which Codd derived his model.
Relation
Rows are sometimes referred to as __________.
Records
The CUSTOMER table’s primary key is CUS_CODE. The CUSTOMER primary key column has no null entries, and all entries are unique. This is an example of _____ ______.
Entity Integrity
Referential integrity dictates what?
- That the foreign key must contain values that match the primary key, in the related table
- Must contain null values.
The _____ constraint can be placed on a column to ensure that every row in the table has a value for that column.
NOT NULL
To avoid nulls, some designers use special codes, known as _____, to indicate the absence of some value.
Flags
RDBMSs enforce ___ automatically.
integrity rules
How is a one-to-many (1:M) relationship implemented in a relational database model?
By putting the foreign key of the “one” side; in the table of the “many” side.
When are 1:1 relationships necessary in database design? Provide examples.
The _____ relationship is the “relational model ideal.”
1:M
The _____ relationship should be rare in any relational database design.
1:1
How do you implement a M:N relationship.
Implemented by creating a new entity in 1:M relationships with the original entities.
Another name for a composite entity is a(n) _____ entity.
Bridge
The ___ relationship is the relational database norm.
1:M
____ relationships cannot be implemented as such in the relational model.
M:N
Many-to-many
- If one department chair “a professor”, but can chair only one department.
- Also the department can have only one department chair.
- The entities PROFESSOR and DEPARTMENT exhibit a ___ relationship
1:1
One characteristic of generalization hierarchies is that they are implemented as ____ relationships.
1:1
The proper use of ______ keys is crucial to controlling data redundancy.
Foreign
Proper data ________ design requires carefully defined and controlled data redundancies to function properly.
Warehousing
What are the database designers two main options when defining a composite table’s primary key?
- use the combination of foreign keys or
- create a new primary key
A(n) _____ is an orderly arrangement used to logically access rows in a table.
Index
A ______ index is an index in which the index key can have only one pointer value (row) associated with it.
Unique
An index key can have multiple _______ (a composite index).
Attributes