This is a very good question and one that needs some clarifications because of just how many applications are involved in a plumbing drain. Let’s begin in the basement of a residence or commercial building. A home that has an overhead sewer (please see definition of Overhead Sewer and Gravity sewer) will have a basement (floor) plumbing drain.
This drain is usually installed because the furnace has a condensate drain piped to a floor drain. This drain must be trapped, obviously the drain can be used to receive water while cleaning the floor etc. The floor drain is tied into a sewage ejector pump when the pit fills the pump, evacuates the water overhead into the house drain and it moves by gravity out to the city main.
Moving out of the basement into the living areas or work areas we have many a plumbing drain to define and explain. Let’s take a look in the bathroom, the lavatory drain is connected to a P-trap under the lavatory that receives waste water while washing hands, shaving or brushing one’s teeth. The toilet which receives human waste is also considered a plumbing drain, the toilet is internally trapped meaning it’s trap is built into the fixture. If the bath room has a bidet this would also be very similar to a toilet in that it is internally trapped and receives human urine draining to the main waste stack.
If the bathroom is equipped with a shower only that shower usually has a floor drain in its center (the drain can be offset depending on the conditions of installation.) that is connected to a P-trap. If the bath room is equipped with a tub/shower it is equipped with a waste and over flow plumbing drain. The aforementioned drain is trapped as well but has an over flow that prevents a tub from overflowing.
In commercial applications a trapped floor drain is required in bathrooms so they can be cleaned and the water for cleaning can be brought to the drain for disposal in to the waste system. In most municipalities a floor drain installed in a commercial bathroom must have an approved trap primer.
Moving to the kitchen the outlet to your single or double bowl sink is a drain with a p-trap. In a commercial application some municipalities require that the drain be tied in an approved grease trap. If there is a point of use water heater piped underneath a coffee station/break station sink that heater’s T & P Valve needs to be piped to a dedicated floor drain, that floor drain shall also be primed.
Finally moving on to the roof, in both commercial and some residential roofs there will be roof drains dedicated to receiving rain and water from melted snow. The number of drains is determined by a plumbing engineer, it based on the surface area if the roof and (100 year rain fall). In some applications the roof can be used to hold rain and melted water when the storm piping is running at capacity. Also some roofs have been designed to have overflow drains which act as a back-up drainage system. These overflow drains are usually piped outside the building and splash in the ground.