hakdog Flashcards
A column or group of columns in a table that uniquely identify every row in that table.
Primary key
Defines the number of entities in one entity set, which can be associated with the number of entities of other set via relationship set.
Cardinality
One entity from entity set A can be associated with at most one entity of entity set B and vice versa.
One-to-one
One entity from entity set A can be associated with more than one entities of entity set B however an entity from entity set B, can be associated with at most one entity.
One-to-many
More than one entities from entity set A can be associated with at most one entity of entity set B, however an entity from entity set B can be associated with more than one entity from entity set A.
Many-to-one
One entity from A can be associated with more than one entity from B and vice versa.
Many-to-many
One entity from A can be associated with more than one entity from B and vice versa.
Many-to-many
Each entity is involved in the relationship. It is represented by double lines.
Total participation
Not all entities are involved in the relationship. It is represented by single lines.
Partial participations
It has the power of expressing database entities in a conceptual hierarchical manner.
ER Model
The process of generalizing entities, where the generalized entities contain in the properties of all the generalized entities. A number of entities are brought together into one generalized entity based on their similiar characteristics.
Generalization
A group of entities is divided into sub-groups based on their characteristics. Take a group ‘person’ for example
Specialization
It is an important feature of generalization and specialization. It allows lover level of entities to inherit the attributes of higher level entities.
Inheritance
The data stored in database, may it be user data or metadata, must be a value of some table cell.
Rule 1: Information Rule
Every single data element (value) is a guaranteed to be accessible logically with a combination of table-name, primary key (row value), and attribute name (column name)
Rule 2: Guaranteed Access Rule
The NULL values in a database must be given a systematic and uniform treatment. This is a very important rule because a NULL can be interpreted as one the following − data
is missing, data is not known, or data is not applicable.
Rule 3: Systematic Treatment of Null Values
The structure description of the entire database must be stored in an online catalog, known as data dictionary, which can be accessed by authorized users.
Rule 4: Active online catalog
A database can only be accessed using a language having linear syntax that support data definition, data manipulation, and transaction management operations.
Rule 5: Comprehensive Data sub-language rule
All the views of a database, which can theoretically be updated, must also be updatable by the system.
Rule 6: View Updating Rule
A database must support high-level insertion,
updation, and deletion.
Rule 7: High-Level Insert, Update, and Delete Rule
The data stored in a database must be independent of the
applications that access the database. Any change in the physical structure of a database must not have
any impact on how the data is being accessed by external applications.
Rule 8: Physical Data Independence
The logical data in a database must be independent of its user’s
view (application). Any change in logical data must not affect the applications using it.
Rule 9: Logical Data Independence
The end-user must not be able to see that the data is distributed
over various locations. Users should always get the impression that the data is located at one site only.
Rule 11: Distribution Independence
A database must be independent of the application that uses it. All its
integrity constraints can be independently modified without the need of any change in the application.
Rule 10: Integrity Independence
If a system has an interface that provides access to low-level records,
then the interface must not be able to subvert the system and bypass security and integrity constraints.
Rule 12: Non-Subversion Rule
The main highlights of this model are Data is stored in tables called relations, Relations can be normalized, In normalized relations, values saved are atomic values, Each row in relation contains unique value, Each column in relation contains values from a same domain.
Relational Model
In relationaldata model, relations are saved in the format of Tables. This format stores the relation among entities. A table has rows and columns, where rows represents records and columns represent the
attributes.
Table
A single row of a table, which contains a single record for that relation.
Tuple
A finite set of tuples in the relational database
system represents ______
Relation Instance
It describes the relation name (table name),
attributes, and their names
Relation Schema
Each row has one or more attributes, known as
_______ , which can identify the row in the relation (table) uniquely.
Relation Key
Every attribute has some pre-defined value scope
Attribute Domain
Every relation has some conditions that must hold for it to be a valid relation. These conditions are called _______ .
Relational Integrity Constraints
There must be at least one minimal subset of attributes in the relation, which can identify a tuple
uniquely. This minimal subset of attributes is called ___ for that relation.
Key
If there are more than one such minimal subsets, these are called _________
Candidate Keys
It is a key used to link two tables together.
Foreign Key
It is a field (or collection of fields) in one table that
refers to the PRIMARY KEY in another table.
Foreign Key
The table containing the foreign key is called the
Child Table
The table containing the candidate key is called the
Referenced or parent
table