Database Data Modeling
Documenting rules and policies of an organization that govern data.
BUSINESS RULES Statements that define or constrain some aspect of the business.
Examples:
1) Every student in the university must have one or more faculty advisers.
2) Every student in the university is assigned to one discipline only.
Is this a business rule?
A student is any person who has applied for admission or taken a course or training program from any credit or noncredit unit of the university
A GOOD BUSINESS RULE IS:
Declarative – what is required from system
1)Precise – Non-Ambiguous
2)Atomic – one statement
3)Consistent – does not contradict other rules
4)Expressible – structured, natural language
5)Distinct – non-redundant
6)Business-oriented – understood by business people
CONCEPTUAL MODELING
Entity-Relationship Model
1) A logical representation of data for an organization
2) Expressed in terms of entities, attributes and relationships
Entity-Relationship Diagram
A graphical representation of an entity-relationship model
E-R MODEL CONSTRUCTS
Entities:
1) Entity instance–person, place, object, event, concept (often corresponds to a row in a table)
2) Entity Type–collection of entities (often corresponds to a table)
Relationships:
1) Relationship instance–link between entities (corresponds to primary key-foreign key equivalencies in related tables)
2) Relationship type–category of relationship…link between entity types
Attribute
property or characteristic of an entity or relationship type (often corresponds to a field in a table)
BUSINESS RULES FOR SAMPLE ERD
1) A CUSTOMER may submit any number of ORDERs. However, each ORDER must be submitted by exactly one CUSTOMER.
2) A SUPPLIER may supply many ITEMs. Each ITEM is supplied by any number of SUPPLIERs.
3) A SHIPMENT must include one(or more) ITEMs. An ITEM may be included on several SHIPMENTs
4) Each ITEM must be used in at least one PRODUCT. Conversely, each PRODUCT must use one or more ITEMs.
Comments
Post a Comment