You are on page 1of 6

AMACC LAS PIÑAS – COLLEGE 3LP WORKSHEET

NAME : __Lemuel Patulot__________ SCORE : _________

USN: ____15000429000 ___ COURSE : BSIT YEAR: 2ND DATE : _02/05/23____

WEEK 4 : Discuss and illustrate ER-model, entities, Relationship and attribute; Basic concepts, mapping
Constraints, Keys

ER-MODEL

ENTITY ATTRIBUTE RELATIONSHIP

KEY ONE TO ONE

WEAK ENTITY COMPOSITE ONE TO MANY

MULTIVALUED MANY TO ONE

DERIVED MANY TO
MANY

What is ER Model? Entity Relationship Model, or ER Model, is a high-level conceptual data


model diagram. To create a well-designed database, rigorous analysis of the data requirements is
assisted by the ER model. The ER Model depicts actual people, things, and the connections
between them. Before deploying your database, it is recommended that you create an ER Model in
a DBMS.

You can create a well-designed database by using ER Modeling to methodically assess your data
requirements. Therefore, finishing ER modeling before installing your database is regarded as best
practice.

ENTITY

What is Entity? a tangible, plainly recognized, and unrecognizable living or nonliving entity. Anything
within the company must be represented in our database. It could be a tangible object, a simple fact
about the company, or an actual event that takes place.
An entity, which contains data in the database, might be a place, person, item, event, or concept. Entities

Notation of an Entity

Entity set:

Student

A collection of entities of the same kind is known as an entity set. It might include entities whose
attributes have values that are similar. Properties, usually referred to as attributes, are used to represent
entities. Each characteristic has a unique value. A student entity, for instance, might have a name, age,
and class as properties.

Student Class

Example of Entities:

There could be some departments at a university. These departments all provide a variety of curricula
and employ a variety of professors.

Each program is composed of a few courses. Students sign up for a certain program and sign up for
various courses inside it. Each course is taught by a lecturer from the designated department, who
teaches a different group of students.

Weak Entities

An entity that lacks its primary attribute is referred to as weak. By taking into account the main key of
another entity, it can be uniquely identified. Weak entity sets must be involved in order for that to
happen.

TYPE
ATM ID
ADDRESS AMOUNT
TIME
TRANS NO

Weak
ATM TRANSACTION
Relation

"Trans No" is a discriminator inside a group of transactions in an ATM in the ER Diagram examples above.
ATTRIBUTE

It is a relationship-type or entity-type single-valued property.

A lecture, for instance, might have the following attributes: time, date, duration, location, etc.

An attribute in ER Diagram examples, is represented by an Ellipse

Types of Attributes Description

Simple attribute Simple attributes can’t be divided any


further. For example, a student’s
contact number. It is also called an atomic
value.

It is possible to break down composite


Composite attribute attribute. For example, a student’s
full name may be further divided into
first name, second name, and last name.

Derived attribute This type of attribute does not include in the


physical database. However, their values are
derived from other attributes present in the
database. For example, age should not be
stored directly. Instead, it should be derived
from the DOB of that employee.

Multivalued attributes can have more than


Multivalued attribute
one values. For example, a student can have
more than one mobile number, email
address, etc.
Relationship ATTRIBUTES

Relationship is nothing but an association among two or more entities. E.g., Tom works in the
Chemistry department.
TRANS NO

AMOUNT

TYPE
TOM CHEMISTRY

TRANSACTION

Entities take part in relationships. We can often identify relationships with verbs or verb phrases.

For example:

 You attending this lecture

 I am giving the lecture

 Just loke entities, we can classify relationships according to relationship-types:

Cardinality
Defines the numerical attributes of the relationship between two entities or entity sets.

Different types of cardinal relationships are:

 One-to-one Relationships
 One-to-many Relationships
 Many-to-one Relationships
 Many-to-many Relationships
Relationship Cardinality

Mandatory one

Mandatory many
Optional one

Optional many

1.One-to-one:

One entity from entity set X can be associated with at most one entity of entity set Y and vice versa.

Example: One student can register for numerous courses. However, all those courses have a single
line back to that one student.

Student Course

2.One-to-many:

One entity from entity set X can be associated with multiple entities of entity set Y, but an entity
from entity set Y can be associated with at least one entity.

For example, one class is consisting of multiple students.

Class Student
3. Many to One

More than one entity from entity set X can be associated with at most one entity of entity set Y.
However, an entity from entity set Y may or may not be associated with more than one entity
from entity set X.

For example, many students belong to the same class.

Student Class

4. Many to Many:

One entity from X can be associated with more than one entity from Y and vice versa.

For example, Students as a group are associated with multiple faculty members, and faculty
members can be associated with multiple students.

Student Faculty member

You might also like