🎯 Objective: partition one fact table into two or more ➔ vertical slices the measure columns, horizontal slices the fact records.
📦 Core Components:vertical≡ vertical partitioning in distributed databases | horizontal≡ horizontal partitioning in parallel databases.
⚡ Key Constraint: the slicing attribute must already be visible somewhere in the schema — a pivoted fact forces a vertical slice, a Type Dimension forces a horizontal one; with neither, the fact cannot be sliced at all.
📝 How It Works
1. Vertical slice — split the measures
Definition ➔ divide the fact’s attributes across multiple fact tables; each new fact keeps the full dimension key and takes a subset of the measures.
Dimensions untouched ➔ neither the dimension tables nor their records change; only the fact is partitioned.
Private Taxi ➔ PrivateTaxiFACT(CarNo∗,DriverNo∗,WeekNo∗,Total_Kilometers,Total_Fuel_Used,Total_Income) becomes three one-measure stars, each still hanging off CarDIM, DriverDIM, WeekDIM.
2. Horizontal slice — split the records
Definition ➔ allocate rows to different fact tables by a range or value of an attribute; every new fact keeps the full column list.
Dimensions may shrink too ➔ a slice on TimeID means each star’s TimeDIM need only hold that star’s months; a slice on a dimension member means the dimension itself can be split.
Bookshop by year ➔ pre-2010 facts to one star, 2010-onward to another.
Bookshop by shop type ➔ religious vs general; since BookshopDIM holds no type attribute, the membership test must run against the operational database, and the key is renamed per star (BookshopID ➔ ReligiousBookshopID).
3. Which slice — read it off the existing schema
Pivoted fact ⇒ vertical ➔ the breakdown already lives in the column names (Num_of_Bachelor_Projects, Num_of_Master_Projects), so the split is by column.
Type dimension ⇒ horizontal ➔ the breakdown lives in a key attribute value (LevelNo, PilotType), so the split is by row.
Neither ⇒ cannot slice ➔ with only Num_of_Projects and no level information anywhere, no partition can be derived.
The type dimension disappears after the slice ➔ LevelNo is already implied by which star you are querying, so LevelTypeDIM is dropped.
A determinant dimension stops being determinant ➔ after slicing Flight Charter, each fact holds one personnel type only, so no double count is possible and PilotDIM / CoPilotDIM return to solid boxes.
⚙️ Core Implementation
🔹 Vertical slice — project the measures
three CTAS, full key repeated in each
create table PrivateTaxiFact1 asselect CarNo, DriverNo, WeekNo, Total_Kilometers from PrivateTaxiFact;create table PrivateTaxiFact2 asselect CarNo, DriverNo, WeekNo, Total_Fuel_Used from PrivateTaxiFact;create table PrivateTaxiFact3 asselect CarNo, DriverNo, WeekNo, Total_Income from PrivateTaxiFact;
💡 Common Mistake:Dropping a key column from one slice ➔ each slice must carry the whole composite key or it can never be joined back ➔ Multi-Fact Star Schemas.
🔹 Horizontal slice — filter the records
by range, then by a value that lives only in the operational DB
create table BookshopFact2a asselect * from BookshopFact1 where TimeID < 201001; -- old recordscreate table BookshopFact2b asselect * from BookshopFact1 where TimeID >= 201001; -- recent recordscreate table ReligiousBookshopFact as -- slice on a dimension memberselect BookshopID as ReligiousBookshopID, CategoryID, TimeID, Num_of_Books, Total_Salesfrom BookshopFact1where BookshopID in ( select BookshopID from ... -- operational source where <the type is Religious Bookshop> );create table ReligiousBookshopDim as -- split the dimension to matchselect BookshopID as ReligiousBookshopID, Address, Suburb, Postcode, State, Countryfrom BookshopDimwhere BookshopID in ( select BookshopID from ... where <the type is Religious Bookshop> );
💡 Common Mistake:Looking for the slicing attribute inside the warehouse ➔ BookshopDIM has no type column, so the subquery must reach back to the operational database; that reach is exactly what a Type Dimension would have removed.
⚖️ Core Decision Matrix
Aspect
Vertical slice
Horizontal slice
What is partitioned
measure columns
fact records
Analogy
vertical partitioning, distributed databases
horizontal partitioning, parallel databases
Key columns
repeated in full in every slice
unchanged
Column list
narrower in each slice
identical in every slice
Dimension tables
untouched
may be trimmed to the slice, or split with a renamed key
Triggered by
a pivoted fact (breakdown in the column names)
a type dimension (breakdown in a key value)
Slicing attribute afterwards
encoded in which measures a fact holds
encoded in which fact you query — the type dimension is dropped
When It Flips: the same case study takes either slice depending on which combined shape was built first — Bachelor/Master pivots ➔ vertical, Bachelor/Master with LevelTypeDIM ➔ horizontal ➔ Combining Star Schemas.
📊 Exam Execution Trace & Applied Exercises
Manual Execution Trace — Flight Charter, both routes
Step
Starting schema
Slice applied
Resulting facts
PilotDIM afterwards
0
FlightCharterFACT, dashed PilotDIM, 3 measures
—
1
determinant (dashed)
1
pivoted: 6 measures, ..._Pilot / ..._CoPilot
vertical — columns split by role
2, each 3 measures
normal (solid)
2
type dimension: PilotTypeDIM in the key
horizontal — rows split on PilotType
2, each 3 measures
normal (solid), PilotTypeDIM dropped
3
base schema only, no breakdown anywhere
none possible
1
unchanged
Reading the trace ➔ steps 1 and 2 reach the same two star schemas by opposite mechanics; step 3 is the precondition failure.
Applied Exercise — pick the slice
Problem:ProjectFACT(AreaID∗,StaffNo∗,Year∗,Num_of_Bachelor_Projects,Num_of_Bachelor_Students,Num_of_Master_Projects,Num_of_Master_Students). Split it into a Bachelor star and a Master star.
Final Extracted Output: two stars, each with the same three dimensions and two measures; had the schema instead carried LevelTypeDIM, the identical outcome would be reached with where LevelNo = 'B' / 'M' — a horizontal slice.
⚠️ Common Mistakes
💡 Slicing when nothing records the slicing attribute ➔ without a pivoted measure or a type dimension the information simply is not in the warehouse; the chapter’s conclusion is that the slice is not possible.
💡 Keeping the type dimension after a horizontal slice ➔ every row in the new fact has the same type value, so the dimension is dead weight.
💡 Assuming the determinant property survives ➔ it exists to prevent a double count that the slice has already eliminated.
🧠 Active Recall
You are told to slice a fact by student level. What do you inspect first, and what does each answer commit you to?
Answer
Short answer: inspect where the level information is recorded — in the measure column names, or in a key attribute — because that alone decides vertical versus horizontal.
Why:Pivoted fact ➔ vertical ➔ the level is already a column split, so the slice is a projection. Type dimension ➔ horizontal ➔ the level is a row value, so the slice is a filter and the dimension is then dropped. Neither ➔ refuse ➔ a fact holding only Num_of_Projects cannot be decomposed after the fact; the breakdown had to be modelled earlier ➔ Combining Star Schemas.