Wednesday, 22 February 2017

LESSON-6 RELATIONAL DATABASES (Cont’d; Ashraf, Khan, and Mir) Posted on October 3, 2012

LESSON-6 RELATIONAL DATABASES (Cont’d; Ashraf, Khan, and Mir)

LESSON-6  RELATIONAL DATABASES  (Cont’d; Ashraf, Khan, and Mir)

 6.  Relational Databases

 6.1  Review E-R Models

Entity Relationship Enterprise Data Model: is a graphical model that focuses on the high level entities for the organization and associations among entities.

An entity is an object/ concept that is vital in enterprise data model.

 Advantages of the Database Approach

  • Program-data independence

  • Minimal data redundancy

  • Improved data consistency

  • Improved data sharing

  • Increased productivity in application development

  • Enforcement of standards

  • Improved data quality

  • Improved data accessibility and responsiveness

  • Reduced Program maintenance.

Components of the Database Environment

  • Computer-aided software engineering (CASE) tools

  • Repository

  • Database Management System; Oracle, others

  • Database; an organized collection of logical related data

  • Application programs

  • User interface

  • Data administration

  • System developers

  • End-users

 Information Planning Phase

  Step          Explanation

01                     Identify strategic planning factors

  1. Goals

  2. Critical success factors

  3. Problem areas

02                     Identify Corporate Planning Objects

  1. Organizational units

  2. Locations

  3. Business functions

  4. Entity types

03                     Develop enterprise model

  1. Functional decomposition

  2. Entity-relationship diagram

  3. Planning matrices

6.2  More On Entity Relationship Models

E-R model remains the mainstream approach of conceptual data modeling. It is a detailed logical representation of the data for a business area. It consists of entities, the relationship among them, and integrity constraints and business rules.

Basic Entity Concepts:

NOTE: graphic symbols for data models are depicted in Appendix-1

Entities: It is a person, place, object, event or concept of the application system to maintain data.

Entity Type: A collection of facts that share common properties.

Entity Instance: A single occurrence of an entity type is business fact.

Inappropriate Entities: Treasurer manages accounts, receives expense reports, and records expenses transactions against each account, Treasurer is user, and not an entity.

Treasurer: Expense Report, Account, Expense are inappropriate entities.   Account and Expense are appropriate entities.

Weak Entity: whose existence depends on some other entity types.

Strong Entity: exists independently of other entity types.

Associative Entity: is an association that participates in associating the instances of one or more entities/ classes and contains attributes that are peculiar to that relationship between those entity instances.

Attribute: A property or characteristic of an entity type.

Composite Attribute: that can be broken down into component parts

Single Attribute: atomic level attribute

Multi-valued Attribute: and take more than value for a given instance.

Derived Attribute: calculated from related attributes.

Identifier Attribute: uniquely identify individual instance.

Composite Attribute: identifier that consist of a composite attribute

More On Associative Entities: The presence of one or more attributes on a relationship suggests that such relationship be converted in to an entity type that associates the instance of one or more entity types and contains attributes that are peculiar to the relationship.

Attribute on Relationships:For instance, a worker obtains training and get certificate, worker and training instances have relationship ‘obtains’.

Get certificate is an attribute of relationship ‘obtains’ that is an attribute on relationship.

 6.3  Relationship Primer

 Intuitively, a relationship is an association among the instances of or more entity types that is of interest of business organization.

Relationship Type: meaningful association between (or among) entity types.

Relationship Instances: an association between (or among) entity instances, where each relationship instance includes exactly one entity from each participating entity type.

How to know whether or not to convert a relationship to an associative entity? There are four conditions that should exist:

  1. Participating entities types are many relationships.

  2. Resulting entity type has independent existence (meaning), and can be identified (by end user) with a single identifier.

  3. Associative entity has one or more attributes, besides identifier.

  4. Associative entity participates in one or more relationships independent of the entities related in the associative relationship.

Relationship Degree: Totality of entity types that participate in a relationship.

Unary: a relationship between the instances of a single entity.

Binary: simultaneous relationship among the instance of two entity types

Ternary: simultaneous relationship among the instances of three entity types

N-nary: a simultaneous relationship among the instances of n entity types

More On Relationship

One-to-one: each instance of entity ‘A’ is related with to at most one instance of entity ‘B’, and each instance of entity ‘B’ is related to one instance of entity ‘A’. Symbolic representation of two entities and relationship can depict this situation.

One-to-many: each instance of entity ‘A’ is related with to at-most  one or more instance of entity ‘B’, and each instance of entity ‘B’ is related to one instance of entity ‘A’. Symbolic representation of two entities and relationship depict this situation.

Many-to-many: each instance of entity ‘A’ is related with to at-most  one or more instance of entity ‘B’, and each instance of entity ‘B’ is related to one or more instances of entity ‘A’. Symbolic representation of two entities and relationship depict this situation.

How to view relationship instances of ‘A’ and ‘B’ entities; each entity is viewed separately with the relationship, that relationship versus each participating entities, it may be ‘A’ or ‘B’, or ‘C’ or more, while ‘A’ or ‘B’ may not be different. This way, entity versus relationship (or vice versa) has four categories of views;

  1. Mandatory one: at-least one to define the instance of the relationship.

  2. Mandatory many: at-least more then one instances of the relationship.

  3. Optional one: at-most one to define the instance of the relationship.

  4. Optional many; at-most many to define the instance of the relationship.

Relationship Cardinality Constraints: specifies instances count of one entity (or more) can be associated with each instance of another entity.

Minimum Cardinality: is the minimum number of instances of entity ‘B’ that may be associated with each instance of entity ‘A’.

Optional: When the number of participating instances of ‘B’ could be zero. Graphics symbols are used to express relationship, cardinality constraint.

Maximum Cardinality: is the maximum number of instances of entity ‘B’ that may be associated with each instance of entity ‘A’.

Optional: When the number of participating instances of ‘B’ is zero. Graphics symbols are used to express relationship, cardinality constraint.

Time Dependent Modeling: attributes are associated with time stamps (effective date), and needs to contain history of those data values.

If the variability of this nature exists which is time dependent, the effective date attribute would be imperative, for instance, assigning product to feasible product lines on time allocations.

Multiplicity of Relationships: for instances, employee work for a department, employee manages department, employee supervises employee.  Another instance, professor is qualified to a course, and professor is scheduled to a course.

*****

Click To MAIN PAGE: OBJECT- ORIENTED RELATIONAL MODELLING E-MONOGRAPH, By J. Ashraf, M. Khan, and H. Mir

  Click TO NEXT: LESSON-7 ADVANCED E-R MODELING (Cont’d; Ashraf, Khan, and Mir)

*****

 MESSAGE: DEDICATED TO ANONYMOUS COMBATANTS OF KNOWLEDGE

مکتب علم الل مہد منل لحد   Learning continues from birth to death

FOR PROMOTION OF LEARNEDNESS SHARE WITH FRIENDS ABOUT;
   
  1. CAUSE AND EVENTS – SPATIAL And TEMPORAL RESPECTIVELY:                         https://be4gen.wordpress.com/2012/11/16/cause-and-events-spatial-temporal-respectively/

  1. WHETHER ‘BRAIN-POWER’ OR ‘HEART-IMPULSE’ PLINTHS ‘HUMAN GEN’? http://sunedu.wordpress.com/2012/09/17/whether-brain-power-or-heart-impulse-plinths-human-gen/

************

No comments:

Post a Comment