2022 cards Flashcards
DDL
defining the database schema
SQL
Declarative/non - procedural DM.Requires a user to specify what data are needed without specifying how to get those data. Easy to learn and use.
entity
an object that exists and is distinguishable from other objects.
entity set
set of entities of the same type that share the same properties
PK
A subset of the attributes form a primary key of the entity set; i.e., uniquely identifying each member of the set
Do we represent entity or entity set in ER diagram?
Entity set
Relationship
A relationship is an association among several entities
Role in Relationship
Each occurrence of an entity set plays a “role” in the relationship. The labels “ course_id ” and “ prereq_id ” are called roles
Types of Attributes
- Simple and composite attributes
- Single-valued and multivalued attributes
- Derived attributes
Attribute Domain
the set of permitted values for each attribute
Composite attributes
Composite attributes allow us to divided attributes into subparts
Mapping cardinalities of binary relationship
- One to one
- One to many
- Many to one
- Many to many
Total participation
Total participation (indicated by double line): every entity in the entity set participates in at least one relationship in the relationship set.
Partial Participation
Partial participation: some entities may not participate in any relationship in the relationship set.
Weak entity set
A weak entity set is one whose existence is dependent on another entity, called its identifying entity. Instead of associating a primary key with a weak entity, we use the identifying entity, along with extra attributes called discriminator to uniquely identify a weak entity.