+ All Categories
Home > Documents > Introduction

Introduction

Date post: 21-Jan-2016
Category:
Upload: caine
View: 23 times
Download: 0 times
Share this document with a friend
Description:
Module 2:1. Introduction. Describing a Family Tree. - PowerPoint PPT Presentation
Popular Tags:
47
Transcript
Page 1: Introduction
Page 2: Introduction

INTRODUCTION

Module 2:1

Page 3: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Both my great grandparents had 2 children each. My Father had 4 siblings with 3 children each. My Mother had 3 siblings with 2 children each. My Father had 2 other Cousins with 2 children each. My Mother had 2 cousins with 3 children each. We are 5 in my family

Page 4: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• How many 1st degree cousins do I have? 2nd degree? How many cousins do we have in the whole clan? Great grand children?

• Given that all my titos and titas will give my 500 for christmas, how many will I receive by the 26th?

• How many are we all in all?

Page 5: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Solve for all cousins:Father Side

Father siblings = 4 x 3 children each = 12Father cousin = 2 x 2 children each = 4Father side = Father sibling + Father cousinFather side = 16 children

Mother SideMother sibling = 3 x 2 children each = 6 Mother cousin = 2 x 3 children each = 6Mother side = Mother sibling + Mother cousinMother side = 12

Cousins = Motherside + Fatherside = 16+12 = 28

Page 6: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Solve for all greatgrandchildren:Since Father Side = 16 and Mother Side =12And FatherMotherchildren = 5 childrenFS+MS+FMC= 16+12+5 = 33

• Solve for Titostitas:Fatherside:

Let FGGParents = (FGParentsA + FGParentsB) x 2FGParentsA= 2 ; FGParentsB = 4FGGParents = (2+4)2 = 12

MothersideMGGParents = (MGParentsA + MGParentsB) x 2MGParentsA= 2 ; FGParentsB = 3MGGParents = (2+3)2= 10

Christmas_Aguinaldo=(Motherside+Fatherside)xP500Christmas_aguinaldo=(10+12)x500=(22)xP500)=11,000

Page 7: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• How many are we all in allSince all siblings = 33Titos and Titas = 22Grandparents = 2 x 2 = 4 x 2 = 8Great grand parents = 2 x 2 = 4Parents = 2

• Allinall=33+22+8+4+2= 69

Page 8: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

Page 9: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Data models…Relatively simple representationsUsually graphicalOf a more complex real-world data structure

• …supported by powerful database design tools have made it possible to substantially diminish the errors of database design.

Page 10: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• help understand the complexities of a real-world object or event

• It represents data structures and their:

CharacteristicsRelationsConstrainsTransformations

Page 11: Introduction

BUILDING BLOCKS OF DATA MODELS

Module 2:1

Page 12: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• 1950s and early 1960s:Data processing using magnetic tapes for storage

Tapes provide only sequential accessPunched cards for input

• Late 1960s and 1970s:Hard disks allow direct access to dataNetwork and hierarchical data models in widespread useTed Codd defines the relational data model

Would win the ACM Turing Award for this workIBM Research begins System R prototypeUC Berkeley begins Ingres prototype

High-performance (for the era) transaction processing

Page 13: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• 1980s:Research relational prototypes evolve into commercial systems

SQL becomes industry standardParallel and distributed database systemsObject-oriented database systems

• 1990s:Large decision support and data-mining applicationsLarge multi-terabyte data warehousesEmergence of Web commerce

• 2000s:XML and XQuery standardsAutomated database administrationIncreasing use of highly parallel database systemsWeb-scale distributed data storage systems

Page 14: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• A collection of tools for describing

Data entitiesData attributesData relationshipsData constraints

Page 15: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Anything! Person, Place or thing, or events which data are to be collected and stored

• An entity represents a particular type of object in a real world

Physical objectscustomersProducts

Page 16: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Characteristics of an entity

• Example: the Attributes of a Customer are:

FirstnameLastnameCourseYear

Page 17: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Association among entities• Example:

The relationship between customers and an agent

• Types of RelationshipOne to Many (1:M) relationshipMany to Many (M:N) relationshipOne to One (1:1) relationship

Page 18: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• 1:Many (1:M)Store Employees

• Many:Many (M:N)Employees Skills

• 1:1 (1:1)Employee Store

Page 19: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Models an enterprise as a collection of entities and relationships

Entity: a “thing” or “object” in the enterprise that is distinguishable from other objects

Described by a set of attributesRelationship: an association among several entities

• Represented diagrammatically by an entity-relationship diagram:

Page 20: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

Page 21: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

Painter

paints

Painting

Employee

learns

skills

Employee

manages

store

1 1

1M

M

N

Page 22: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Example of tabular data in the relational model

Page 23: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

Page 24: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Restrictions placed on the data

• This ensures data integrity• Usually in a form of rulews• Examples

QPI: Not less than 0.00 not more than 4.00A class should only have a maximum of 45 studentsA teacher should only have 21 units or 7 subjectsAn uyab should have one and only one uyab.

Page 25: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Physical level: describes how a record (e.g., customer) is stored.

• Logical level: describes data stored in database, and the relationships among the data.

type customer = recordcustomer_id : string; customer_name : string;customer_street : string;customer_city : string;

end;

• View level: application programs hide details of data types. Views can also hide information (such as an employee’s salary) for security purposes.

Page 26: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• An architecture for a database system

Page 27: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

Page 28: Introduction

BUSINESS RULES

Module 2:1

Page 29: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Before database designers start designing databases (entities, attributes and relationships), they understand first the business rules.

Page 30: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• A business rule isBriefPreciseAnd unambiguous

• Description of PoliciesProceduresAnd principles

• Of a specific organization

Page 31: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Business rules help to create and enforce action within that organization’s environment

• It is rendered in writing and updated to reflect any changes in the organization’s operational environment

Page 32: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• A customer may generate many invoices

• An invoice is generated by one customer

• A training session cannot be scheduled for fewer that 10 employees or for more than 30 employees.

Page 33: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• A customer may generate many invoices(1:M relationship)

• An invoice is generated by one customer(1:M relationship)

• A training session cannot be scheduled for fewer that 10 employees or for more than 30 employees.(1:M relationship with a constrain)

Page 34: Introduction

TRANSLATING BUSINESS RULES INTO DATA MODEL COMPONENTS

Module 2:1

Page 35: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• What are the Business Rules? Site all of it.

• In every business rule, look for its entities and attributes

• Are there relationships from it?

• From the business rules, identify possible constrains.

Page 36: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Enrolling a Subject IM32Business Rules

A class should have a maximum of 45 studentsA student can’t enroll twice on a class on the same semester.There should be one teacher per class.Only 3rd and 4th year IM students are allowed to enroll in the class

Page 37: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Enrolling a Subject IM32Entities

ClassStudentTeacher

Page 38: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Enrolling a Subject IM32Attributes

Class Seats, Subject Code,Subject Description,Schedule

StudentName, year, course

TeacherName, Subject, Schedule

Page 39: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Enrolling a Subject IM32Constrains

Class not exceed 45 studentsTeacher not exceed 45 students

Page 40: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Enrolling a Subject IM32Relationships

Class1 Class 1 Teacher1 Class 45 students

Student1 Student 1 Class

Teacher1 Teacher Many students1 Teacher 1 Class1 Teacher 1 Class schedule

Page 41: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

Class

enrols

student

Teacher

teaches

skills

Teacher

handles

Class

1 1

1M

M

N

Page 42: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

Page 43: Introduction

SUMMARY

Module 2:1

Page 44: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Data Model is a (relatively) simple abstraction of complex real-world data environment. Database designers ause data models to communicate with application programmers and end users.

Page 45: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Basic data-modeling components are entities, attributes , relationships and constrains

Page 46: Introduction

Introduction

Data Model Building Blocks

Business Rules

Translating Business Rules to Data Models

Summary

• Business rules are used to identify and define the basic modeling components within a specific real-world environment

Page 47: Introduction

END

Module 2:1


Recommended