> For the complete documentation index, see [llms.txt](https://gchandra.gitbook.io/data-warehousing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gchandra.gitbook.io/data-warehousing/data-warehousing-concepts/dimensional-modelling/star-schema.md).

# Star Schema

Star schema is the simplest model used in DWH. It's commonly used in Data Marts.

Star schema is built to streamline the process.

ETL process will produce data from the operational database, transform it into the proper format, and load it into the warehouse.

<figure><img src="/files/z1mHzDgBnXcABM7HJJfu" alt=""><figcaption><p>src: www.vertabelo.com</p></figcaption></figure>

```
dim_employee: info about employee 

dim_product: info about the product 

dim_store: info about store 

dim_sales_type: info about sales 

dim_time: the time dimension 

fact_sales: references to dimension tables plus two facts (price and quantity sold)
```

This Star schema is intended to store the history of placed orders.

<figure><img src="/files/cvaa79IS88RzuDb44jDy" alt=""><figcaption></figcaption></figure>

```
fact_supply_order: contains aggregated data about the order & supplies.
dim_supplier: supplier information.
```

#### **Advantages**

* The fact table is related to each dimension table by exactly one relation.
* Faster aggregations.
* Simpler queries. Relatively fewer joins.

#### **Disadvantages**

* Data Integrity is not enforced.
* Data redundancy. City > State > Country can be normalized and not repeated.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gchandra.gitbook.io/data-warehousing/data-warehousing-concepts/dimensional-modelling/star-schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
