LIS2780 – Database Management – Flashcards

Unlock all answers in this set

Unlock answers
question
The response of the DBMS to a query is the ____.
answer
query result set
question
Constraints
answer
- are important because they help to ensure data integrity. - is a restriction placed on the data.
question
Primary Key
answer
- used to ensure that each row in a table is uniquely identifiable - used to uniquely identify each entity instance.
question
The Crow's foot symbol with two parallel lines indicates ____ cardinality.
answer
(1,1)
question
Partial completeness is symbolized by ____.
answer
a circle over a single line
question
An entity cluster is formed by combining multiple interrelated entities into ____.
answer
a single abstract entity object
question
If one exists (and there are no security issues), a data modeler may use a ____ as the primary key of the entity being modeled.
answer
natural identifier
question
Within a specialization hierarchy, every subtype can have ____ supertype(s) to which it is directly related.
answer
only one
question
____ is a generic entity type that is related to one or more entity subtypes.
answer
an entity supertype
question
specialization hierarchy
answer
depicts the arrangement of higher-level entity supertypes (parent entities) and lower-level entity subtypes (child entities).
question
One important inheritance characteristic is that all entity subtypes inherit their ____ key attribute from their supertype.
answer
primary
question
Redundant relationships
answer
occur when there are multiple (unnecessary) relationship paths between related entities.
question
time-variant data
answer
data whose values change over time and for which you must keep a history of the data changes. - requires a multivalued attribute which is resolved by creating a new table.
question
fan trap
answer
occurs when you have one entity in two 1:M relationships to other entities, thus producing an association among the other entities that *may* not be expressed in the model.
question
For most business transactional databases, we should normalize relations into ____.
answer
3NF
question
When designing a database, you should ____.
answer
make sure entities are in normal form before table structures are created
question
From a strictly database point of view, ____ attribute values can be calculated when they are needed to write reports or invoices.
answer
derived
question
The most likely data type for a surrogate key is ____.
answer
numeric
question
Data redundancy produces ____.
answer
data integrity problems
question
A relational table must not contain a(n) ____.
answer
repeating group
question
A table that is in 2NF and contains no transitive dependencies is said to be in ____.
answer
3NF
question
An atomic attribute ____.
answer
cannot be further subdivided
question
A table with a composite key, has all key attributes defined, has no repeating groups, and all its attributes are dependent on at least part of the primary key, is said to be in ____.
answer
1NF
question
A table that is in 1NF and includes no partial dependencies is said to be in ____.
answer
2NF
question
SQL character data format(s) is(are) ____.
answer
CHAR and VARCHAR
question
The SQL command that modifies an attribute's values in one or more table's rows is ____.
answer
UPDATE
question
The SQL command that lets you insert rows into a table is ____.
answer
INSERT
question
To list all the contents of the PRODUCT table, you would use ____.
answer
SELECT * FROM PRODUCT;
question
The SQL command that lets you select attributes from rows in one or more tables is ____.
answer
SELECT
question
What is a relationship, and what three types of relationships exist?
answer
A relationship is an association among (two or more) entities. Three types of relationships exist: one-to-one (1:1), one-to-many (1:M), and many-to-many (M:N or M:M.)
question
Primary Key (ENTITY INTEGRITY)
answer
Entity integrity describes a condition in which all tuples (i.e., rows or records) within a table are uniquely identified by their primary key. The unique value requirement prohibits a null primary key value, because nulls are not unique. - ensures that each row is uniquely identified by the primary key.
question
Foreign Key (REFERENTIAL INTEGRITY)
answer
Referential integrity describes a condition in which a foreign key value has a match in the corresponding table, or in which the foreign key value may be null (depending upon the business rules). - means that, if the foreign key contains a value, that value refers to an existing valid tuple (row) in another relation.
question
What are the requirements that two relations must satisfy in order to be considered union-compatible?
answer
Both must have the same number of attributes (columns) and corresponding attributes (columns) must have the same (or compatible) domains (data types).
question
Weak Entity
answer
- The entity must be existence-dependent on its parent entity. - The entity must inherit at least part of its primary key from its parent entity.
question
Strong Relationship
answer
- requires weak or existent-dependent entities that have primary keys partially or fully made up of the parent entity's primary key. - In a Crow's Foot ERD, a strong relationship is depicted with a solid line connecting the two entities.
question
Existent-Dependent Entity
answer
- also known as a composite (bridge, join, link, associative) entity - generally used to transform M:N relationships into 1:M relationships.
question
Recursive Relationship
answer
when an entity is related to itself.
question
Entity SUPERtype
answer
- is used to minimize the likelihood of redundant relationships - s a generic entity type that is related to one or more entity subtypes - minimize the number of nulls - contains the common characteristics
question
Entity SUBtype
answer
- stores data that is UNIQUE TO THE SUBTYPE
question
Subtype DISCRIMINATOR
answer
the attribute in the supertype entity that is used to determine to which entity subtype the supertype occurrence is related
question
OVERLAPPING subtypes
answer
each entity instance of the supertype may appear in more than one subtype
question
PARTIAL completeness
answer
not every supertype occurrence is a member of a subtype - a disjointed subtype
question
Entity CLUSTER
answer
- a "virtual" entity type used to represent multiple entities and relationships in the ERD. - formed by combining multiple interrelated entities into a single abstract entity object. - used to represent multiple entities and relationships with the purpose of simplifying the ERD and thus enhancing its readability.
question
Primary Key Characteristics
answer
- Unique values: must be able to guarantee - Nonintelligent: no embedded semantic meaning - No Change over Time: changing value means changing identity of entity - preferrably single-attribute: minimum # of attributes possible - preferrably numeric: better managed that way - security complaint: not composed of any value that could be a security risk
question
Composite Primary Keys
answer
useful for: - composite entities (resolving M:N relationship) - weak entities with strong relationships
question
SURROGATE primary key
answer
- used to ensure entity integrity, and by making queries simpler - an "artificial" PK that is used to uniquely identify each entity occurrence when there is no good natural key available or when the "natural" PK would include multiple attributes. - used to ensure that relationships between entities can be created more easily - introduced by the designer with the purpose of simplifying the assignment of primary keys to tables. - are usually numeric, they are often automatically generated by the DBMS, and they are free of semantic content (they have no special meaning).
question
Normalization
answer
the process for evaluating and correcting table structures to - minimize data redundancies - reduce likelihood of data anomalies - minimize and/or eliminate data integrity problems
question
1NF
answer
all the key attributes are defined (no repeating groups in the table) and when all remaining attributes are dependent on the primary key
question
2NF
answer
all the key attributes are defined (no repeating groups in the table) , all remaining attributes are dependent on the primary key, and it includes no partial dependencies
question
3NF
answer
when it includes no partial dependencies and it contains no transitive dependencies
question
BCNF
answer
every determinant in the table is a candidate key.
question
Partial Dependency
answer
exists when an attribute is dependent on only a portion of the primary key.
question
The most common anomalies considered when data redundancy exists are:
answer
update, insertion, deletion anomalies
question
To remove a transitive dependency, the designer must
answer
- Place the attributes that create the transitive dependency in a separate table - Make sure that the new table's primary key attribute is the foreign key in the original table.
question
Why is a table whose primary key consists of a single attribute automatically in 2NF when it is in 1NF?
answer
A dependency based on only a part of a composite primary key is called a partial dependency. Therefore, if the PK is a single attribute, there can be no partial dependencies.
question
TOTAL completeness
answer
each instance of a super may appear in more than one subtype - overlapping subtype
question
Foreign Key
answer
attribute or combination of attributes in one table whose values must match the primary key i another (parent) table or whose values must be null
question
Candidate Key
answer
minimal super-key, that is, one that does not contain a subset of attributes that is itself a supe-key
question
Natural Identifier
answer
a real-world, generally accepted identifier used to identify real world objects. familiar to end users and forms part of their day-to-day vocabulary
question
Prime Attribute
answer
key attribute that is part of a key or is the whole key. - prime attribute = if an attribute is part of the key
question
Non-Prime Attribute
answer
attribute that is not part of a key
question
ERD
answer
- Entity Relationship Diagram - Diagram that depicts an entity relationship model's entities, attributes and relations.
question
CHEN
answer
describes relationships (1:1, 1:M, and M;N) among entities at the conceptual level with the help of ER diagrams
question
Crow's Foot
answer
representation of the entity relationship diagram using three-pronged symbol to represent the "many" sides of the relationship
question
Existence-Independent
answer
- entity that can exist apart from one or more related entities. - created first when referencing an existence dependent table to it.
question
Existence-Dependent
answer
property of an entity whose existence depends on one more other entities.
question
Weak Relationship
answer
- non-identifying relationship - exist when the PK of the related entity does not contain a PK component of the parent entity
question
Optionality
answer
- means that one entity occurrence does not REQUIRE a corresponding entity occurrence in a particular relationship - has one or more optional relationships - represented by a O
question
Cardinality
answer
- assigns a specific value to connectivity. - expresses the of allowed entity occurrences associated with a related entity
question
Connectivity
answer
- symbols - describes the classification of the relationship between entities.
question
UNARY relationship
answer
association within an entity (course is a pre-rec to another course)
question
BINARY relationship
answer
association between TWO entities - most common relationship
question
TERNARY relationship
answer
association between THREE entities
question
DE-Normalization
answer
- process which a table is changed from a higher level normal form to a lower normal form - usually done to increase processing speed - potentially yields data anomalies
question
Generalization
answer
grouping of COMMON attributes into a SUPERtype entity
question
Specialization
answer
grouping of UNIQUE attributes into a SUBtype entity
question
Determinant
answer
any attribute in a specific determines other values in that row.
question
Dependency Diagram
answer
a representation of all data dependencies (PK, Partial or Transitive) within a table - arrows on top are good dependencies - arrows on bottom are bad (partial & transitive)
question
Transitive Dependency
answer
condition where an attribute is dependent on another attribute that is not part of the primary key
question
Repeating Groups
answer
characteristic describing a group of multiple entities of the same type that exist for a single key attribute occurrence. - repeating group = multivalued attribute
question
SELECT
answer
returns information from server
question
INSERT
answer
adds records
question
UPDATE
answer
makes changes to data tables
question
DELETE
answer
removes records (deletes a row from a table)
question
WHERE
answer
pulls data based on at least one attribute's specific value
question
ORDER BY
answer
organizes data
question
FROM
answer
pulls data from specified table
question
COUNT
answer
lists total number of rows containing non-null values
question
MIN
answer
aggregate function that yields the minimum attribute value encountered in a given column
question
MAX
answer
yields the maximum attribute value encountered in given column
question
SUM
answer
yields the sum of all values given column or expression
question
COMMIT
answer
SQL command that PERMANENTLY saves data changes to database
question
ROLLBACK
answer
SQL command that restores the database table content to its last condition, to the condition that existed after the last commit statement
question
Subquery
answer
a query that is embedded(nested) inside another query - query nested in another query
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New