DEV Community

Cover image for Schema in a database
Jloh reen
Jloh reen

Posted on

Schema in a database

Introduction

A database schema defines how data is organized within a relational database; this is inclusive of logical constraints such as, table names, fields, data types.

Types of schemas:

1.Star schema

A star schema is a data modeling technique for data warehouses that features a central fact table surrounded by several denormalized dimension tables , resembling a star.

2.Snowflake schema

It is a multi-dimensional data model that is an extension of a star schema, where dimension tables are broken down into subdimensions.

Conclusion

In summary, star schemas offer simplicity and fast query performance, while snowflake schemas provide a normalized structure that saves space but adds complexity. The choice depends on your specific data needs.

Top comments (0)