1. Introduction to Data Modeling
Hello, and welcome to this course on data modeling with Snowflake!
2. Your instructors
My name is Nuno Rocha, and I'm Director of Engineering at DataCamp. This course was done in collaboration with Margarita Torres, Senior Data Engineer with expertise in establishing foundational structures for data analysis and data science projects.
Data modeling is all about organizing data in a way that's both easy to understand and efficient to use. Every hour invested in refining a data model can save countless hours during data querying and analysis. Together, we're going to uncover this essential process. Let's dive in!
3. What is data modeling?
Imagine opening a closet packed with clothes, shoes, and accessories, all jumbled together. If nothing is sorted, finding a belt or the matching shoes you need becomes a terrible task!
That's precisely how data feels without proper modeling: cluttered and confusing.
4. What is data modeling? (1)
Data modeling is like organizing that chaotic closet: categorizing, labeling, and placing everything neatly so we can easily find what we need.
5. What is data modeling? (2)
Now, let's scale that closet to the size of a shopping center. Can you visualize the importance of organization on such a large scale? Imagine the chaos and the waste of time. This is how vital data modeling is.
A data model is a representation, like a blueprint, that outlines the organization and storage of data. It aims to design a well-laid center where everything has its place, and we can find anything quickly and easily.
6. Components of data modeling
In the context of a shopping center, imagine the entire place, full of shops, is our database.
7. Components of data modeling (1)
The individual stores are our entities, the tables in the database. Our entities would be a clothing store, a grocery store, an electronics store, and so on.
8. Components of data modeling (2)
The products inside each store are the attributes, the columns in a table. An attribute of the stores entities would be product price, quantity in stock, brand, etc.
9. Components of data modeling (3)
And the pathways and escalators connecting these stores, or entities, represent relationships.
10. Describing entities
Let's look at a single entity from our shopping center: the grocery entity. An entity is a distinct object or concept represented in a data model. These are the tables in a database.
What is the grocery entity made of? Which attributes does it contain? Let's describe it.
11. Describing entities (1)
The SQL command DESCRIBE TABLE, or simply DESC TABLE, followed by the table's name will display the structure of a table.
By executing this query, you'll see the structure of the entity.
It contains elements like product id, product name, category, price, quantity available, supplier name, and expiration date. They are the attributes.
12. Describing entities (2)
Attributes are the characteristics of an entity. Category, quantity available, supplier name, all these are attributes of this grocery entity.
The rest of the columns in the description are the data type and other technical details from this table. For now, we're simply observing the data model, this map or blueprint, to understand what a grocery entity could contain.
13. Another industry
Let's move into a more detailed examination of a similar industry, e-commerce online retail. This digital marketplace isn't just about buying or selling products online. It's a complex system of inventory, transactions, delivery logistics, and more. Given the complexities of online shopping, you can imagine how detailed its structure could be.
In industries like e-commerce, data modeling isn't just helpful; it's essential. It provides the framework, the blueprint, for organizing vast amounts of information in a logical and meaningful way.
We will continue exploring this industry’s data in the exercises to gain a deeper understanding of what data modeling is.
14. Terminology and functions overview
Let's take a moment to review the main concepts we learned.
15. Let's practice!
Now let's practice so we can remember what we have learned.