Entity Modelling Also Known as Data Modelling or Logical Data Structures PowerPoint PPT Presentation

presentation player overlay
1 / 32
About This Presentation
Transcript and Presenter's Notes

Title: Entity Modelling Also Known as Data Modelling or Logical Data Structures


1
Entity Modelling(Also Known as Data Modelling
or Logical Data Structures)
  • Information Systems AnalysisCOMM1B

2
Purpose of Data Modelling
  • Process Modelling
  • DFDs show
  • movement of data (data flows) and
  • transformation of data (processes)
  • Data Modelling
  • Entity Modelling or LDS show
  • how the data is ORGANISED or STRUCTURED
  • what data is stored in the system

3
Purpose of Data Modelling
  • Define the Data in the current system
  • Model how the data is interrelated or structured
  • Entity Model (diagrammatic)
  • Create Entity Descriptions
  • Keys and attributes (entity descriptions)
  • The technique provides a sound basis for
    file/database design

4
Entity Modelling
  • Top down approach
  • Start by asking
  • who or what do we need to store data about?
  • Results in a useful first attempt, but
  • may be incomplete
  • may have redundant data
  • relationships may be vague
  • useful cross-check with relational data analysis

5
Entities
  • An entity is something of interest to the system
    about which data is kept
  • A thing of interest to the system
  • MUST have data kept about it
  • MUST have more than one occurrence
  • Library in a library system is not an entity
  • but Branch could be an entity in a multiple
    site library system eg. University library

6
Identifying Entities Example Scenario
  • A potential customer telephones the company and
    gives details of the vehicle to be insured. This
    results in a quotation which remains on file for
    one month. If the customer accepts the quotation
    within one month it becomes a policy. If an
    accident occurs the customer contacts the company
    who send out a claim form. The customer completes
    the claim form, sends it back to the company who
    then files it as a claim.

7
Potential Entities
  • A potential customer telephones the company and
    gives details of the vehicle to be insured. This
    results in a quotation which remains on file for
    one month. If the customer accepts the quotation
    within one month it becomes a policy. If an
    accident occurs the customer contacts the company
    who send out a claim form. The customer completes
    the claim form, sends it back to the company who
    then files it as a claim.

8
List of Entities
  • Entities
  • Customer, Vehicle, Quotation, Policy, Accident,
    Claim
  • Not Entities
  • Company, Details, File, Month, Claim Form

9
Entity Attributes
  • What is an ATTRIBUTE?
  • An item of data held about an ENTITY
  • It is comparable to a data item or field in a
    database table

10
Identifying Attributes
  • Customer
  • customer ref. number, customer name, address,
    tel. number, credit limit
  • Vehicle
  • registration number, make, model, year, engine
    size
  • Policy
  • policy number, name of policyholder, type of
    cover, effective date, expiry date

11
Key Attributes
  • uniquely identifies a specific occurrence of an
    entity
  • Customer name is not unique
  • Customer ref. Number is unique (within the
    system)

12
Entity Modelling example
  • A sale always starts with a CUSTOMER placing an
    ORDER
  • a CUSTOMER will receive an ESTIMATE
  • The ESTIMATE may become an ORDER
  • An ORDER can be for one or more STOCK ITEMS
  • Each STOCK ITEM belongs to a certain STOCK
    CATEGORY (e.g. taps, sinks, cupboards, etc.)

13
Entity Modelling example
14
Entity Relationship Modelling Symbols
One
Symbol for an entity
Many Crows Foot
15
Entity Relationship Modelling Symbols
Customer
Entity names are ALWAYS singular We are referring
to a specific occurrence of that entity, not the
set of occurrences ie. A Customer, not all the
Customers held on file
16
Entity Modelling (one-to-many)
One-to-many relationship between CUSTOMER and
ESTIMATE many really means. One or more than one
Customer
be issued with
be issued to
Estimate
A customer must receive at least one estimate
17
Entity Modelling(optional relationship)
One-to-many relationship between CUSTOMER and
ESTIMATE, showing optionality (customer can exist
in system without receiving an estimate)
Customer
be issued with
be issued to
Estimate
A customer can receive none, one or more than
one estimate
18
Entity Modelling (one-to-one)
become
Estimate
Order
be derived from
One-to-one relationship between ESTIMATE and
ORDER, showing optionality
19
Entity Modelling (many-to-many)
refer to
Order
Stock item
be present on
Many-to-many relationship between ORDER and STOCK
ITEM, showing optionality
20
Entity Modelling (one-to-many)
Stock Category
One-to-many relationship between STOCK CATEGORY
and STOCK ITEM
contain
Belong to
Stock Item
21
Example Entity Relationship Model
CUSTOMER
be issued with
be issued to
STOCK CATEGORY
ESTIMATE
contain
become
belong to
be derived from
be present on
STOCK ITEM
ORDER
refer to
22
Entity Modelling (many-to-many)
have consultation with
Doctor
Patient
have consultation with
Many-to-many relationship between DOCTOR and
PATIENT, showing optionality
23
Entity Modelling (link entity)
have consultation with
have consultation with
Resolution of many-to-many relationship between
DOCTOR and PATIENT Create link entity
Appointment
24
Entity Relationship Model
CUSTOMER
be issued with
be issued to
STOCK CATEGORY
ESTIMATE
contain
become
belong to
be derived from
be present on
STOCK ITEM
ORDER
refer to
25
Entity Relationship Model
26
Entity Modelling (multiple relationships)
Many-to-many relationship between MOTORIST and
VEHICLE
Motorist
drive
be driven by
Vehicle
27
Entity Modelling (multiple relationships)
One-to-many relationship between MOTORIST and
VEHICLE
Motorist
be registered owner of
owned by
Vehicle
28
Entity Modelling (multiple relationships)
Multiple relationships between MOTORIST and
VEHICLE
Motorist
be registered owner of
drive
be driven by
owned by
Vehicle
29
Entity Modelling (exclusivity)
Relationships between CUSTOMER and INVOICE, and
CUSTOMER and STATEMENT
Customer
be issued with
be issued with
be dispatched to
be dispatched to
Statement
Invoice
A customer must be issued with both invoices and
a statements
30
Entity Modelling (exclusivity)
Exclusive relationships between CUSTOMER and
INVOICE, and CUSTOMER and STATEMENT
Customer
be issued with
be issued with
be dispatched to
be dispatched to
Statement
Invoice
A customer must be issued with either invoices or
statements, but not both
31
Entity Modelling finally
  • Remove redundant relationships

BECOMES
A
B
A
B
C
C
32
Summary
  • Entity models show in a diagrammatic form how the
    data in a system is structured and inter-related
  • In a model of an existing system this is as they
    currently exist, not how we would like them to be
  • As with DFDs, the existing model will be
    gradually transformed into a proposed system
    entity model
Write a Comment
User Comments (0)
About PowerShow.com