29. Practice Exercises and Final Assignment
29.6 Modules 11–12: Data Modelling, Hierarchies and Groups
- Classify each table (Orders, Product, Customer, DarkStore, DeliveryPartner, Date) as fact or dimension and justify.
- Draw the star schema on paper with cardinality and filter direction.
- Create the date table with CALENDAR and add Fiscal Year (April–March). Mark it as a date table.
- Why does Month Name sort alphabetically, and how do you fix it?
- Create the inactive Delivered Date relationship. How can a measure use it?
- Why should the Date table relate to
Order Dateand not toOrder DateTime? - Create Location (State › City › Area › Store Name), Date and Product hierarchies. Turn off Auto date/time.
- Create a Region list group (West, Vidarbha, North Maharashtra, Marathwada, South Maharashtra) with an Other group, and a hierarchy Region › City.
- Create 5-minute bins on Delivery Time Mins and ₹100 bins on Amount, and build histograms.
Ravindra Bagale's Tip
Friends, many students draw relationships until the visuals "look right" instead of checking cardinality and direction. For each relationship in the exercise, write down why it is one-to-many and single direction before you create it. Don't worry – after doing it two or three times, it becomes a habit.
Ravindra Bagale's Tip – मराठी
मित्रांनो, बरेच students cardinality आणि direction तपासण्याऐवजी visuals "बरोबर दिसेपर्यंत" relationships काढत राहतात. Exercise मधली प्रत्येक relationship बनवण्याआधी ती one-to-many आणि single direction का आहे ते लिहून काढा. घाबरू नका, दोन-तीन वेळा केलं की सवय होते.
Ravindra Bagale's Tip – हिंदी
दोस्तों, बहुत से students cardinality और direction check करने की जगह तब तक relationships बनाते रहते हैं जब तक visuals "सही न दिखें". Exercise की हर relationship बनाने से पहले लिखो कि वह one-to-many और single direction क्यों है. घबराओ मत, दो-तीन बार करने पर आदत हो जाती है.