Lesson 1 4 Chaprter 2 Part 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

LESSON 1: BUSINESS RULES

- Statements that define or constrain some aspect of the business


- Assert business structure
- Control/influence business behavior
- Expressed in terms familiar to end users
- Automated through DBMS software

DIFFERENT TYPES OF BUSINESS RULE:

• STRUCTURAL ASSERTION
- Is a statement that something of importance to be the business either exists as a
concept of interest or exists in relationship to another thing of interest.
- It details a specific, static aspects of the business, expressing things known or how
known things fir together (Hay, 1999).
- Are frequently portrayed graphically as entity/relationship diagram.

EXAMPLE:
A STUDENT takes exactly one COURSE, and COURSE is taken by any number of STUDENTs.

• ACTION ASSERTION
- Is a statement that concerns some dynamic aspects of the business (Laurent, Laurent, &
Madera, 2020).
- It identifies constraints on the results that actions can produce.
- Action assertions impose constraints – ‘must’ (or “should”) or ‘must not’ (or “should
not”).

EXAMPLE:
A STUDENT may register for a SECTION of a COURSE only if he or she has successfully
completed the prerequisites for the COURSE.

• DERIVATION
- Is a statement taken from other knowledge in the business.
- Derivation is a mathematical or logical inference involving literals and facts.

EXAMPLE:

Age = Current date – Birthdate


• Each STUDENT may enroll to only one PROGRAM. Conversely, each PROGRAM is
enrolled by one or more STUDENT(s).
• A STUDENT may complete any number of SUBJECT(s). Conversely, each SUBJECT may be
completed by any number of STUDENT(s).
• Each EXAMINEE chooses exactly one COURSE. And each COURSE is chosen by at least
one EXAMINEE(s).

REMEMBER!

A business rule follows a certain grammar (Hoffer, Ramesh, & Topi, 2016).

<entity><minimum cardinality><relationship><maximum cardinality><entity>


EXAMPLE: A <FACULTY><may><handle><any number of>SUBJECT(s).

To find out the minimum and maximum cardinality, follow this based on the basic grammar.

Each\A\An <entity><maximum cardinality><relationship><how many?> <entity>


EXAMPLE: A <FACULTY><may> <handle> <how many?> SUBJECT(s).

NOTE: The answer is more than one subjects.

EXAMPLE: A <SUBJECT><is> <handled by> <how many?>FACULTY.


NOTE: The answer is also more than faculty.
A FACULTY may handle any number of SUBJECT(s). And a SUBJECT is handled by at least
one FACULTY.

CHARACTERISTICS OF A GOOD BUSINESS RULE:


- Declarative – what, not how a policy is enforced.
- Precise – clear, agreed-upon meaning, has one interpretation.
- Atomic – one statement, indivisible yet sufficient.
- Consistent – do not contain conflicting statement nor contradict other rules.
- Expressible – structured, natural language
- Distinct – non-redundant
- Business-oriented – understood by business people

THE E-R MODEL (ENTITY RELATIONSHIP)

- Is a logical representation of a data for an organization or for a business area.


3 COMPONENTS OF E-R DIAGRAM (ERD):

• ENTITIES:
- Refers person, place, object, event, concept.
- Collection of entities.
- Names are singular nouns.
- Rectangles are used to represent entities.

• ATTRIBUTES:
- Property or characteristic of an entity or relationship type.
- Names are singular nouns.
- Ovals or ellipses are used to represent attributes.

• RELATIONSHIPS:
- Is the glue that holds together various components of the E-R diagram.
- Names are active or passive verbs.
- Diamonds are used to represent the relationship between the entities.
LESSON 2: ENTITY TYPES
- Is an object or concept that is important to the business.
- Represent t is a specific type of object.
- Distinguishable.
- Singular nouns.
- To write it on capital letter or capitalized.

• ENTITIES

* Entity instance – person, place, object, event, concept.

* Entity Type – collection of entities.

SHOULD BE:
* An object that will have many instances in the database.

* An object that will composed of multiple attributes.

* An object that we are trying to model.


SHOULD NOT BE:

* A user of the database system.

* An output of the database system. (e.g a report)

TYPES OF ENTITY:
• STRONG ENTITY
- That does not rely on another entity type for identifications.
• WEAK ENTITY:
- That relies or depends on another entity type for identification and existence.
- Has no business meaning in E-R diagram without the entity on which it depends.
- Is called its identifying owner or simply its owner.
- Is indicated by double.

• ASSOCIATIVE OR COMPOSITE ENTITY:


- A special entity that is also a relationship.
- An entity type that is formed from many-to-many relationship.

• RECURSIVE ENTITY:
- Which a relationship can exist between occurrences of the same entity type.
LESSON 3: ATTRIBUTE
- Is a properly or a characteristic of an entity type that is interest to the organization.
- It often corresponds to field in a table.
- In naming attributes, the first letter must be uppercase that followed by lowercase
letters.
- If an attribute name consists of two words, use an underscore character to connect the
two words or simply remove the space in between and start each word with a capital
letter.
- Also have a domain.
- A domain is the attribute’s set of possible values.

For example. The domain for attribute gender, it consists of only two possibilities, M or F.

TYPES OF ATTRIBUTE:

• SIMPLE ATTRIBUTE OR ATOMIC ATTRIBUTE


- Are attributes that cannot be broken down into simpler components.

• SINGLE-VALUED ATTRIBUTE
- Are attribute that can have only one value.
EXAMPLE:
Student Number
College Name
Proctor No.
NOTE: a single-valued attribute is not necessarily a simple attribute.
• MUTI-VALUED ATTRIBUTE
- That may take on more than one value for a given entity instances.
- Can be represented by placing the attribute name within curly braces

• COMPOSITE ATTRIBUTE
- That can be further subdivided to yield additional attributes.

• DERIVED ATTRIBUTE
- That is derived by using mathematical algorithm.
• IDENTIFIER ATTRIBUTE
- That identifies uniquely every instances of an entity type.
LESSON 4: RELATIONSHIP

• MAXIMUM CARDINALITY
- The maximum number of entities that can be involved in the relationship.

• MINIMUM CARDINALITY
- The minimum number of entities that can be involved in the relationship.
- If the minimum is zero, then it is optional.
- If the minimum is one, the it is mandatory.

• ONE-TO-ONE
- Each entity in the relationship will have exactly one related entity.

• ONE-TO-MANY
- Entity on one side of the relationship can have many related entities, but an entity on
the other side will have a maximum of one related entity.

• MANY-TO-MANY
- Entities on both sides of the relationship can have many related entities on the other
side.
• RELATIONSHIP
- Referred as a glue that binds the various components of an ERD.
- Can have attributes
- Two entities can have more than one type of relationship between them (multiple
relationship).
- Represented by a diamond with a relationship name on it.
- Relationship names are active or passive verbs.

DEGREE OF RELATIONSHIP
• UNARY RELATIONSHIP
- Is a relationship between the instance of a single entity type.

• BINARY RELATIONSHIP
- Is a relationship between the instances of two entity types and is the most common
type of relationship in data modeling.
3 EXAMPLES OF BINARY RELATIONSHIP:

1. One-to-Many Relationship / Many-to-One Relationship


- The 1:M/M:1 relationship is the relational ideal and constitutes the relational

database’s main building block.

- In 1:M relationship, the entity instances of the first entity type is associated with
any number of instances in the second entity type. And the instances in the second

entity type is associated with at most one instances in the first entity type.

- In M:1 relationship, an entity instances in the first entity type is associated with at
most one entity instance in second entity type. And an entity instance in second

entity type is associated with any number of instances in the first entity type.

2. Many-to-many Relationship
- The M;N relationship is a more troublesome proposition in the relational

environment, but it can be implemented by breaking it up to produce a set of 1:M

relationships.
- In M:N relationship, entity instances in first and second entity type are associated

with any number from each other.


3. One-to-one Relationship

- An entity instance in the first entity type is associated with at most one entity
instance in the second entity type, and an entity in B is associated with at most one

entity instance in the first entity type.

• TERNARY RELATIONSHIP
- Is a simultaneous relationship among the instances of three entity types.

You might also like