Data Warehousing
  • Data Warehousing
  • Readme
  • Fundamentals
    • Terms to Know
    • Jobs
    • Skills needed for DW developer
    • Application Tiers
    • Operational Database
    • What is a Data Warehouse
      • Typical Data Architecture
      • Problem Statement
      • Features of Data Warehouse
      • Need for Data Warehouse
      • Current State of the Art
    • Activities of Data Science
    • Types of Data
    • Data Storage Systems
    • Data Warehouse 1980 - Current
    • Data Warehouse vs Data Mart
    • Data Warehouse Architecture
      • Top-Down Approach
      • Bottom-Up Approach
    • Data Warehouse Characteristic
      • Subject Oriented
      • Integrated
      • Time Variant
      • Non Volatile
    • Tools
    • Cloud vs On-Premise
    • Steps to design a Data Warehouse
      • Gather Requirements
      • Environment
      • Data Modeling
      • Choosing ETL / ELT Solution
      • Online Analytic Processing
      • Front End
      • Query Optimization
    • Dataset Examples
    • Thoughts on some data
  • RDBMS
    • Data Model
      • Entity Relationship Model
      • Attributes
      • Keys
      • Transaction
      • ACID
    • Online vs Batch
    • DSL vs GPL
    • Connect to Elvis
    • SQL Concepts
      • Basic Select - 1
      • Basic Select - 2
      • UNION Operators
      • Wild Cards & Distinct
      • Group By & Having
      • Sub Queries
      • Derived Tables
      • Views
    • Practice using SQLBolt
  • Cloud
    • Overview
    • Types of Cloud Services
    • Challenges of Cloud Computing
    • AWS
      • AWS Global Infrastructure
      • EC2
      • S3
      • IAM
    • Terraform
  • Spark - Databricks
    • Storage Formats
    • File Formats
    • Medallion Architecture
    • Delta
  • Data Warehousing Concepts
    • Dimensional Modelling
      • Star Schema
      • Galaxy Schema
      • Snowflake Schema
      • Starflake Schema
      • Star vs Snowflake
      • GRAIN
      • Multi-Fact Star Schema
      • Vertabelo Tool
    • Dimension - Fact
    • Sample Excercise
    • Keys
      • Why Surrogate Keys are Important
    • More Examples
    • Master Data Management
    • Steps of Dimensional Modeling
    • Types of Dimensions
      • Date Dimension Table
      • Degenerate Dimension
      • Junk Dimension
      • Static Dimension
      • Conformed Dimensions
      • Slowly Changing Dimensions
        • SCD - Type 0
        • SCD - Type 1
        • SCD - Type 2
        • SCD - Type 3
        • SCD - Type 4
        • SCD - Type 6
        • SCD - Type 5 - Fun Fact
      • Role Playing Dimension
      • Conformed vs Role Playing
      • Shrunken Dimension
      • Swappable Dimension
      • Step Dimension
    • Types of Facts
      • Factless Fact Table
      • Transaction Fact
      • Periodic Fact
      • Accumulating Snapshot Fact Table
      • Transaction vs Periodic vs Accumulating
      • Additive, Semi-Additive, Non-Additive
      • Periodic Snapshot vs Additive
      • Conformed Fact
    • Sample Data Architecture Diagram
    • Data Pipeline Models
    • New DW Concepts
Powered by GitBook
On this page
  • One to One Mapping
  • One to Many Mapping
  • Many to Many Mapping
  1. RDBMS
  2. Data Model

Entity Relationship Model

Student

student id
name
join date

101

Rachel Green

2000-05-01

201

Joey Tribianni

1998-07-05

301

Monica Geller

1999-12-14

401

Cosmo Kramer

2001-06-05

Courses

student id
semester
course

101

Semester 1

DBMS

101

Semester 1

Calculus

201

Semester 1

Algebra

201

Semester 1

Web

One to One Mapping

Student

student id
name
join date

101

Rachel Green

2000-05-01

201

Joey Tribianni

1998-07-05

301

Monica Geller

1999-12-14

401

Cosmo Kramer

2001-06-05

Studentdetails

student id
SSN
DOB

101

123-56-7890

1980-05-01

201

236-56-4586

1979-07-05

301

365-45-9875

1980-12-14

401

148-89-4758

1978-06-05

For every row on the left-hand side, there will be only one matching entry on the right-hand side.

For student id 101, you will find one SSN and one DOB.

One to Many Mapping

Student

student id
name
join date

101

Rachel Green

2000-05-01

201

Joey Tribianni

1998-07-05

301

Monica Geller

1999-12-14

401

Cosmo Kramer

2001-06-05

Address

student id
address id
address
address type

101

1

1 main st, NY

Home

101

2

4 john blvd,NJ

Dorm

301

3

3 main st, NY

Home

301

4

5 john blvd,NJ

Dorm

201

5

12 center st, NY

Home

401

6

11 pint st, NY

Home

What do you notice here?

Every row on the left-hand side has one or more rows on the right-hand side.

For student id 101, you will notice the home address and Dorm address.\

Many to Many Mapping

Student

student id
name
join date

101

Rachel Green

2000-05-01

201

Joey Tribianni

1998-07-05

301

Monica Geller

1999-12-14

401

Cosmo Kramer

2001-06-05

Student Courses

student id
course id

101

c1

101

c2

301

c1

301

c3

201

c3

401

c4

Courses

course id
course name

c1

DataBase

c2

Web Programming

c3

Big Data

c4

Data Warehouse

What do you notice here?

Students can take more than one course, and courses can have more than one student.

PreviousData ModelNextAttributes

Last updated 2 years ago