Definitions and General Building Supply and Drainage Requirements
Definitions that decide questions
Precision matters here. The building drain is the lowest piping that receives sanitary discharge and conveys it to the building sewer; it ends about 30 inches outside the exterior wall. Everything downstream is the building sewer. A fixture drain runs from the trap to the junction; a fixture branch receives two or more fixture drains; a soil stack carries water closets, a waste stack carries other fixtures. Developed length is measured along the centerline of pipe and fittings - not straight-line distance. Drainage fixture units (DFU) express the load of a fixture relative to others.
General requirements
Every dwelling must provide at least a water closet, lavatory, bathtub or shower, and kitchen sink. Every fixture (with narrow code exceptions) must be separately trapped and vented, have a trap seal of 2 to 4 inches, and be protected against siphonage. Storm water may not connect to the sanitary system. Pipes must be protected from freezing, corrosion, and structural damage, supported at required intervals, and sleeved or firestopped where they penetrate rated assemblies. Flood-level rim governs where fixtures and openings must sit relative to floors and drains.
Worked example
A crew runs a 4-inch sewer under a slab from a bathroom group and measures 22 inches past the foundation wall, calling the 22-inch stub the building sewer. Wrong - the building drain extends to roughly 30 inches outside the wall, so that stub is still building drain and must be inspected, supported, and sloped as drainage piping.
Rule of thumb
When a question hinges on a term, define the term first; the sizing, slope, and inspection answers usually follow from the definition.