Introduction To Data Modeling
Introduction To Data Modeling
- Database Systems
- Data Models
DATABASE DESIGN
Focuses on how database structure will be used
to store and manage end-user data.
DATA MODELING
First step in designing databases.
Refers to the process of creating a specific data
model for a determined problem domain.
DATA MODEL
A relatively simple representation, usually
graphical, of more complexed real-world data
structure.
DATA MODELING
Data Modeling Overview
• A data model is a conceptual representation of the data structures that
are required by a database. The data structures include the data
objects, the associations between data objects, and the rules which
govern operations on the objects. As the name implies, the data model
focuses on what data is required and how it should be organized rather
than what operations will be performed on the data. To use a common
analogy, the data model is equivalent to an architect's building plans.
1. Diagram
It represents the data structures in a pictorial
form. Because the diagram is easily learned, it
is valuable tool to communicate the model to
the end-user.
2. Data Document
This a document that describes in detail the
data objects, relationships, and rules required
by the database.
DATA MODEL BASIC BUILDING BLOCKS:
1. Entities
2. Attributes
3. Relationships
4. Contraints
ENTITIES
• Entities are the principal data object about which information is to be collected.
Entities are usually recognizable concepts, either concrete or abstract, such as
person, places, things, or events which have relevance to the database. Some
specific examples of entities are EMPLOYEES, PROJECTS, INVOICES. An entity is
analogous to a table in the relational model.
NOTE:
An entity occurrence (also called an instance) is an individual occurrence of an
entity. An occurrence is analogous to a row in the relational table.
Special Entity Types
E.G. RELATIONSHIP
Degree of a Relationship
• Binary relationships, the association between two entities is the most common
type in the real world. A recursive binary relationship occurs when an entity is
related to itself. An example might be "some employees are married to other
employees".
Existence
• Existence denotes whether the existence of an entity instance is dependent
upon the existence of another, related, entity instance.
• The existence of an entity in a relationship is defined as either mandatory or
optional.
– If an instance of an entity must always occur for an entity to be included
in a relationship, then it is mandatory. An example of mandatory
existence is the statement "every project must be managed by a single
department".
• Generalization occurs when two or more entities represent categories of the same
real-world object.
– For example, Wages_Employees and Classified_Employees represent categories of the
same entity, Employees. In this example, Employees would be the supertype;
Wages_Employees and Classified_Employees would be the subtypes.
PAINTER A CUSTOMER B
Painting1 Invoice1
Painting2 Invoice2
Painting3 Invoice3
MANY-TO-MANY RELATIONSHIP
STUDENT CLASS
Student A Math
Student B Science
Student C History
ONE-TO-ONE RELATIONSHIP
EMPLOYEE C STORE 1
BUSINESS RULES
• Is a brief, precise and umbiguous description of a policy,
procedure, or a principle within a specific organization
• The main and distinguishing characteristics of data as
‘viewed by the company’.
1. Heirarchical Model
IMPLEMENTATION
MODELS 2. Network Model
3. Relational Model
CONCEPTUAL
4. Entity Relational Model
MODELS
5. Object-Oriented (OO) Model
Conceptual models: logical nature of data representation