1contain the entities that describe the data and the
relationships between those entities. It represents the concept of the problem, the
entities, attributes, and relationship between them.
Conceptual data models
2A graphical technique for understanding and organizing the data independent
of the actual database implementation.
ER Modeling
3y is a thing or object of importance about which data must be captured.
All things aren’t entities. Information about an entity is captured in the form of attributes
and/or relationships. If something is candidate for being an entity and it has no
attributes or relationships, it isn’t entity.
entity
4is a particular member of the entity type. Example for entity
instance: A particular employee
Entity instance
5An entity which has its own key attribute is a regular entity. Example for regular
entity: Employee.
Regular Entity
6An entity which depends on another entity for its existence and doesn't have
any key attribute of its own is a weak entity. Example for a weak entity: In a parent/child
relationship, a parent is considered as a strong entity and the child is a weak entity.
In ER modeling, notation for weak entity is given below.
Weak entity
7Properties/characteristics which describe entities are called attributes.
In ER modeling, notation for attribute is given below.
Attributes
8The set of possible values that an attribute can take is called the domain of the
attribute. For example, the attribute day may take any value from the set {Monday,
Tuesday ... Friday}. Hence this set can be termed as the domain of the attribute day
Domain of Attributes
9The attribute (or combination of attributes) which is unique for every entity
instance is called.
Key attribute
10If an attribute cannot be divided into simpler components, it is a simple attribute.
Example of simple attribute: ID of an employee.
Simple attribute
11If an attribute can be split into components, it is called a composite attribute.
Example for composite attribute: Name of the employee which can be split into First
name, Middle name, and Last-named.
Composite attribute
12If an attribute can take only a single value for each entity instance, it is a single
valued attribute. Example of single valued attribute: age of a student. It can take only
one value for a particular student.
Single valued Attributes
13If an attribute can take more than one value for each entity instance, it is a multivalued attribute. Multi-valued. Example for multi valued attribute: telephone number of
an employee, a particular employee may have multiple telephone numbers.
In ER modeling, notation for multi-valued attribute is given below
Multi-valued Attributes
14An attribute which needs to be stored permanently is a stored attribute. Example
for stored attribute: name of a student
Stored Attribute
15An attribute which can be calculated or derived based on other attributes is a
derived attribute. Example for derived attribute: age of employee which can be
calculated from date of birth and current date. In ER modeling, notation for derived
attribute is given below.
Derived Attribute
16Associations between two or more entities the connections and interactions
between different entities in a database.
Relationship
17p is the number of entity types involved.
-The n-ary relationship is the general form for degree n.
-Special cases are unary, binary, and ternary, where the degree is 1, 2, and 3,
respectively.
Degree of a Relationshi
18Cardinality of a Relationship
One to one (1:1) relationship
One to many (1:N) relationship
Many to one (M:1) relationship
any to many (M:N) relationship
19in a relational database model, relationships define associations between entities.
Participation in a relationship refers to how entities are involved or participate in the relationship.
There are typically three types of participation:
Relationship Participation
20This means that every entity in the entity set must participate in the
relationship. In other words, each entity must have a corresponding relationship
instance. This is denoted by a double line connecting the entity to the relationship in the
ER diagram.
Total Participation
21 In _____, an entity may or may not participate in the
relationship. It's denoted by a single line connecting the entity to the relationship.
Partial Participation
22This is a type of partial participation where an entity may
choose not to participate in the relationship. It's represented by placing a circle (o) on the
side of the relationship where participation is optional.
Optional Participation
23Advantages of ER Modeling
Clarity
Simplicity
Communication
Database Design
Normalization
24Disadvantages of ER Modeling
Complexity Handling
Ambiguity
Overhead
Limited Implementation Details
Evolution Challenges
25
- It is today the primary data model for commercial data processing applications.
- It attained its primary position because of its simplicity, which eases the job of the
programmer, compared to earlier data models such as the network model or the
hierarchical model.
Relational Model
26- A relational database consists of a collection of -------, each of which is assigned
a unique name.
- A ------- is a collection of relationships; Thus, there is a close correspondence
between the concept of table and the mathematical concept of relation.
- Relation is used to refer to a ------
Tables
27- A ,-------- in a table represents a relationship among a set of values.
- Tuple is used to refer to a ----- while the term attribute refers to a column of a table
Row
28- It refers to a specific instance of a relation, i.e., containing a specific set of rows.
Relation Instance
29- For each attribute of a relation, there is a set of permitted values, called the------
Domain
30if elements of the domain are considered to be
indivisible units.
Atomic
31A special value that signifies that the value is unknown or does not exist. is a way to specify tuples within a given relation.
This is expressed in terms of their attributes.
No two tuples in a relation are allowed to have exactly the same value for all attributes.
Null value
32 the logical design of the database
Database schema
33 a snapshot of the data in the database at a given instant in time
Database Instance
34This concept corresponds to the programming-language notion of type definition.
In general, a -------consists of a list of attributes and their corresponding
domains.
- The schema of a relation does not generally change in contrast with the concept
of a relation which corresponds to the programming-language notion of a value of
a variable.
Relation Schema
35is a way to specify tuples within a given relation.
this is expressed in terms of their attributes.
No two tuples in a relation are allowed to have exactly the same value for all attributes.
KEYS
36KEYS IN DATABASE MANAGEMENT SYSTEM:
1. Super Key
2. Candidate Key
3. Primary Key
4. Alternate Key
5. Unique Key
6. Composite Key
7. Foreign Key
37is a set of one or more attributes that, taken collectively, allow us to
identify uniquely a tuple in the relat
Super Key
38Minimal Super keys are called -----
Candidate Key
39To denote a candidate key that is chosen
Primary Key
40 The key other than the primary key
Alternate Key
41Unique in terms of values, but it can also have NULL values.
unique Key
42Key comprised of more than one attributes.
Composite Key
43Key referring the relation (r1) to other relations (r2).
Foreign Key
44 a -------- requires that the
values appearing in specified attributes of any tuple in the referencing relation also
appear in specified attributes of at least one tuple in the referenced relation
Referential integrity constraint