You are on page 1of 28

Evolution of data models

Pemodelan Data
Rizka Wakhidatus Sholikah
Outline

• Data models building blocks


• Business rules
• Evolution of data models

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Data model basic building blocks
Entities

Attributes
Data Models
Relationships

Constraints

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Entities

• Entity is a person, place, thing, or event about which data will be


collected and stored
• An entity represents a particular type of object in the real world
• Each entity occurrence is unique and distinct
• Entities may be physical objects
• Customers
• Products
• Entities can be abstractions
• Flight routes

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Attributes

• Attribute is a characteristic of entity or object


• An attribute has a name and a data type
• Example:
• Customers entity has attributes
• Customer last name
• Customer first name
• Customer phone number
• Attributes are the equivalent of fields in the file system

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Relationship

• Relationship describes an association among entities


• There are three types of relationship:
• One-to-one (1:1 or 1..1)
• One-to-many (1:M or 1..*)
• Many-to-many (M:N or *..*)

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Can you give an
example of each
relationship?

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
One-to-one

• One entity associated with only one instance


of the related entity
• Example:
• A company may only has one director
• The relationship between entities company and
director is 1..1

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
One-to-many

• One entity associated with many instance of


the related entity
• Example:
• A customer may generates a lot of invoice but an
invoice is generated by only one customer
• The relationship between customer and invoice
is 1..*

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Many-to-many

• one occurrence of an entity is associated


with many occurrences of a related entity
and one occurrence of the related entity is
associated with many occurrences of the first
entity
• Example:
• A student can take many courses, a courses can
be taken by many students
• The relationship between student and course is
*..*

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Constraints

• Constraint is a restriction placed on the data


• Usually expressed in the form of rules
• Constraints are important to ensure the data integrity
• Example:
• A students GPA must be between 0.00 and 4.00

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
How can we properly identify the entities,
attributes, relationships, and constraints?

by clearly identify the business rules for the


problem domain that we dealing

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Business Rules

• Business rules is a description of a policy, procedure, or principle


within an organization.
• Example: a professor may teach up to four classes during a
semester
• Properly written business rules are used to define entities,
attributes, relationships, and constraints
• A business rule mast be easy to understand and widely
disseminated to ensure that every person in the organization
shares a common interpretation of the rules

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Business Rules

• Example of business rules in a company:


1. A customer may generate many invoice
2. An invoice is generated by only one customer
3. A training session cannot be scheduled for fewer than 10 employees and
for more than 30 employees
• Rule 1 and 2 show:
• There are two entities customer and invoice
• There are 1..* relationship between customer and invoice
• Rule 3 shows:
• There is a constraints between two entities employee and training
• There is relation between employee and training
INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia
www.its.ac.id
Business rules

Translating
Discovering Naming
into Data
Business rules Conventions
Model

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Discovering rules

• Interview with several end-user


• Interview with the main sources of business rules: company
managers, policy makers, or department managers
• Documentation of company’s procedures, standards, and
operations
• Problem that might occurs:
• Different perspective and perceptions
• Before build the data model, we have to reconcile the perspective
different to ensure the accuracy of business process

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Translating into data model

• A noun in business rules will be translated into an entity in the


model
• A verb that associates between the nouns will translate into a
relationship
• Identify the type of relationship by asking two question:
• How many instances of B are related to one instance of A?
• How many instances of A are related to one instance of B?

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Naming conventions

• The entity names should be:


• Descriptive of the objects in the business environment
• Use terminology that is familiar to the user
• The attribute names should be:
• Descriptive of the data represented by the attribute
• Good practice:
• Prefix the name of attribute with the name or abbreviation of the entity
• Example: attribute customer name can be write as CUS_NAME
• The use of proper naming convention will improve the data model ability
to facilitate communication among stakeholder
• Proper naming convention also make the model has a good
documentation
INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia
www.its.ac.id
The Evolution of Data Model

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Hierarchical Model

• Tree like structure


• There is one root node
• There are child nodes that are
sorted in particular order
• Showing the 1..* relationship
between parent/ root node and
child nodes
• Rarely use in todays data
modeling

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Network Model

• More effective to create


complex data relationship
compare to hierarchical model
• Representing the data model
in graph
• An object is represented as a
node
• And the relation between the
objects as an edge

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Relational Model

• Organize data using tables


• Tables are structures that impose
a schema on the records that
they hold
• Each column has a name and
data type
• There is special fields in tables
called foreign key, allowing to
bridge the two table
• Very adaptable to many types of
data
INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia
www.its.ac.id
Entity Relationship Model

• High level relational model


which is use to define data
element and the relationship
for the entities in a system
• Describe the relationship 1..1,
1..*, *..* among entities
• Boxes mean entity
• Diamonds mean relationship
• Oval is an attribute

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Object-Oriented Data Model

• Combining OOP (Object Oriented Programming) and the


relational data model
• An object represents data and its relationships in a single
structure, along with attributes that specify the object
properties and methods for its behavior
• Consist of
• Classes: collections of similar objects with shared attributes and
behaviors
• Inheritance: enables a new class to inherit the attributes and
behaviors of an existing object

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Object-Oriented Data Model

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Extended Relational Data Model
(ERDM)

• A model that includes the object-oriented models best features


in a relational database structure environment
• Extensible data types based on classes and inheritance
• DBMS based on ERDM is called O/R DBMS (Object/relational
DBMS)
• Example: OLTP OLAP database applications

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
NoSQL

• large-scale distributed database system that stores structured and


unstructured data in efficient ways
• Not based on the relational model and SQL
• Support highly distributed database architectures
• Provide high scalability, high availability, and fault tolerance
• Support very large amounts of sparse data (data with a large number of
attributes but where the actual number of data instances is low)

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Thank you

You might also like