From the course: Advanced SQL for Data Scientists

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Design a data model for analytics

Solution: Design a data model for analytics

From the course: Advanced SQL for Data Scientists

Start my 1-month free trial

Solution: Design a data model for analytics

(upbeat music) - [Instructor] Here is a solution to the data model challenge. So, first of all, the sensor data should be written to a table that models the data sent from the sensors. So, for example, if a sensor is sending a sensor ID, a timestamp, and then measure one, measure two, measure three, we should have a table with those five attributes: sensor ID, timestamp, and then the three measures. Now, likely the table will be partitioned by time. Now, we didn't explicitly state in the requirements the need for partitioning and we didn't discuss, for example, how long we wanted data to be kept in this table and if data past a certain age should be rolled off. Now, this is something you need to keep in mind when you're doing data science, and you're working with data modeling at the same time. Not all of the requirements are going to be outlined for you, the people that are, say, domain experts may not be aware of the…

Contents