Dimensional Modeling By Sathish Yellanki

download Dimensional Modeling By Sathish Yellanki

of 38

  • date post

    07-Nov-2014
  • Category

    Documents

  • view

    125
  • download

    4

Embed Size (px)

description

Dimensional Modeling Presentation

Transcript of Dimensional Modeling By Sathish Yellanki

Let us Start With CA-Erwin

Saturday, March 30, 2013

Introduction To DWH by Satish Kumar Yellanki

Slide No 1

Erwin Supports A Variety of Aspects of Database Design, Including Data Modeling. Erwin Supports Data Modeling in Two Flavors Forward Engineering The Creation of A Database Schema And Physical Database on The Basis of A Data Model. Reverse Engineering The Creation of A Data Model on The Basis of An Existing Database. Erwin Supports Data Modeling For A Wide Variety of Relational DBMS Software. Main Areas of Erwin Workplace Logical In This View, Data Model Represents Business Requirements Like Entities, Attributes Etc. Physical In This View, Data Model Represents Physical Structures Like Tables, Columns, Data Types Etc. Modelmart Many Users Can Work With A Same Data Model Concurrently.Saturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 2

Saturday, March 30, 2013

What Can Be Done With Erwin? Logical, Physical And Dimensional Data Models Can Be Created. Data Models Can Be Created From Existing Systems Like RDBMS, DBMS, Script Files. Different Versions of A Data Model Can Be Compared. Data Model And Database Can Be Compared. SQL Scripts Can Be Generated To Create Databases From Data Model. Reports Can Be Generated in Different File Formats. By Using Modelmart, Concurrent Users Can Work on The Same Data Model. Starting CA-Erwin Start Programs Computer Associates All Fusion Erwin Data Modeler Erwin Data Modeler. Step1 Creation of A Basic Data Model Click The Create New Button OR File New OR CTRL + N. In The Create Model Dialog Box Select Logical/Physical Option, And Any Template if Available. Select The Target Database As Oracle And Version As 10.x And Click OK.Introduction To DWH by Satish Kumar Yellanki

Slide No 3

Screen Shot 1 : Create Model Select TemplateThe Logical Model Does Not Allow The Target Database Selection. The Physical Model Provides A List of Different Databases That Are Supported By Erwin. We Can Select Predefined Templates By Browsing The System if Available. Saturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 4

Tool Bars

Model Navigator

Display Window

Action Log Window

Advisories Window

Screen Shot 2 : Main Window The Erwin Workplace Consists of Two Main Parts. The Model Navigator It Displays A Hierarchy of Items. The Display Window It Will Show The ER Diagram Itself.Introduction To DWH by Satish Kumar Yellanki Slide No 5

Saturday, March 30, 2013

Setting Preferences Erwin Accommodates A Number of Data Modeling Notations And Conventions. To Set The Preferences, Click Model Model Properties

Screen Shot 3 : Model Properties Window

Few Options That Are Very Regular For Setting From The Format Entity Display Menu, Make Sure That Primary Key Designator is CheckedSaturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 6

From The Format Entity Display Menu, Make Sure That Foreign Key Designator (FK) is Unchecked. From The Format Entity Display Menu, Make Sure That Show Migrated Attributes is Unchecked. From The Format relationship Display, Make Sure That Verb Phrase is Checked. We Can Choose Between Two Different ER Diagramming Notations From The Model Properties Window Information Engineering Notation (IE) Integration DEFinition For Information Modeling IDEF1X. Erwin Also Provides The Dimensional Modeling Notation. Steps To Create an Entity To Create A New Entity, Click on The Entity Icon on The Erwin Toolbar And Click in The Display Area, OR RightClick on The Entities Node in The Model Navigator.

New Entity Creation New Entity ButtonSaturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 7

Notice That The Default Name For The New Entity is E/x, Where x is Sequence Number of The Entity. Select The Entity in The Display Area And Click on The Tab Key To Focus The Cycle Between The Three Main Parts of The Entity The Name of The Entity The Primary Key Attribute(s) The Non-Primary Key Attribute(s). To Modify One of These Three Parts of The Entity, We Have To Press The Tab Key To Cycle To The Appropriate Part of The Entity, Then Type To Add OR Modify That Part of The Entity. Steps To Add Primary Key Columns Once The Entity Name is Changed, Then Press The Tab Key Again To Move The Focus To The Next Part of The Entity, To Add A Primary Key Attribute. Type The Name of The Primary Key Attribute As Per The Requirement of The System Being Designed. To Add Multiple Columns For A Primary Key, To Recognize As A Composite Primary Key State, Press Enter Key After Adding The First Column For Primary Key.Saturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 8

Steps To Add Non Key Attributes Press The Tab Key After Adding The Primary Key Attribute, Which Will Help To Add A Number of NonPrimary Key Attributes. After Adding The Required Non-Primary Key Attribute Press The Enter Key, To Add The Remaining Non Key Attributes. System For DesignEntity Attributes Emp_Num (PK) Emp_Fname Emp_Lname Emp_SSN Emp_Street Emp_City Emp_State Emp_Zipcode Emp_Phone Emp_Fax Entity Manager Attributes Man_Salary Man_Car_Allowance Entity Entity Attributes Entity Attributes Office_Num (PK) Office_Street Office_City Office_State Office_Zipcode Office_Name Office_Phone Office_Fax Prop_ID (PK) Prop_Street Prop_City Prop_State Prop_ZipCode Prop_Type Prop_Baths Prop_Rooms Prop_MonthlyRent

Office

Property

Employee

Entity Inspection Attributes

Attributes Insp_Date (PK) Insp_Comments

Associate

Assoc_Hourly_RateSlide No 9

Saturday, March 30, 2013

Introduction To DWH by Satish Kumar Yellanki

Screen Shot 4 : First Level Model EntitiesSaturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 10

Creating Relationships in Erwin Erwin Supports Three Basic Kinds of Relationship Types Identifying Relationship. Non-Identifying Relationship. Many-To-Many Relationship. Erwin Supports Three Basic Kinds of Cardinality Types One-To-One One-To-Many Many-To-Many Within The One-To-Many Category, Erwin Allows To Distinguish Between Identifying And Non-Identifying One-To-Many Relationships. Identifying Relationship An Identifying Relationship is A Relationship Between Two Entities in Which An Instance of A Child Entity is Identified Through its Association With A Parent Entity. In Identifying Relationship The Child Entity is Dependent on The Parent Entity For its Identity And Cannot Exist Without The Parent Entity. In An Identifying Relationship, One Instance of The Parent Entity is Related To Multiple Instances of The Child. Saturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 11

Screen Shot 5 : First Level Model RelationshipsSaturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 12

Notation Style in Erwin IDEF1X Notation A Solid Line With A Diamond OR A Filled Circle At Either End of The Line. IE Notation A Solid Line With Crows Feet. Steps To Create Identifying Relationship To Create An Identifying Relationship, Click First on The Identifying Relationship Icon. Click on The Parent Entity, Generally on The One Side of The Relationship Entity And Then Click on The Child Entity on The Many Side of The Relationship Entity. Note Erwin Provides A Label "R/x" For Every Relationship That is Created. This Default Label Can Be Changed As Per Our Requirement in A Meaningful Way. Defining Customized Labels For Relationships Double-Click on The Relationship To Open The Relationship Dialog Box. The Relationship Dialog Box Has Features To Refine The Properties of The Relationship. Saturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 13

Screen Shot 6 : Refining Relationships Dialog Box

In The Relationship Text Box The Relationship is Presented From Parent Entity R/1 Child Entity. The Verb Phrase Portion of This Box Allows To Define The Label To Place on The Relationship in Place of R/1.Introduction To DWH by Satish Kumar Yellanki Slide No 14

Saturday, March 30, 2013

Saturday, March 30, 2013

Note When An Entity Participates As The Child in An Identifying Relationship it is Modeled With Rounded Corners. This Notation is Useful To Understand The Weak Entity Concept in RDBMS. Creating Non-Identifying Relationship Click on The Non-Identifying Relationship Icon Which Uses A Dashed Line Instead of A Solid Line. Click On The Parent Entity, Then The Child Entity. In Non-Identifying Relationship Type, We Have The Option of Indicating Whether NULLS Are Permitted OR Not. This Decision Regards The Participation of The Parent Entity in A Relationship With The Child Entity. We Have A Choice of Mandatory OR Optional State in Non-Identifying Relationship.Introduction To DWH by Satish Kumar Yellanki

In The Relationship Cardinality Portion, We Can Determine How Many Child Entity Occurrences May Be Associated With Each Parent Entity Occurrence. We Can Define Participation As Mandatory OR Optional in The Database.

Slide No 15

Screen Shot 7 : Second Level Model RelationshipsSaturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 16

Screen Shot 8 : Third Level Model RelationshipsSaturday, March 30, 2013 Introduction To DWH by Satish Kumar Yellanki Slide No 17

Creating Subtypes And Supertypes Some Entities May Have Sub-Category Classifications. Each of The Sub-Category Classifications Has All of The Properties of The Main Category, But in Addition Have A Small Number of Specific Extra Attributes. In Many Situations The Subtype Entities Do Not Contain Any Key Attributes. The Attributes Registered in The Subtypes Are Only Reg