Buildings are complex ecosystems that house trillions of microorganisms interacting with each other, with humans and with their environment. Understanding the ecological and evolutionary processes that determine the diversity and composition of the built environment microbiome--the community of microorganisms that live indoors--is important for understanding the relationship between building design, biodiversity and human health. In this study, we used high-throughput sequencing of the bacterial 16S rRNA gene to quantify relationships between building attributes and airborne bacterial communities at a health-care facility. We quantified airborne bacterial community structure and environmental conditions in patient rooms exposed to mechanical or window ventilation and in outdoor air. The phylogenetic diversity of airborne bacterial communities was lower indoors than outdoors, and mechanically ventilated rooms contained less diverse microbial communities than did window-ventilated rooms. Bacterial communities in indoor environments contained many taxa that are absent or rare outdoors, including taxa closely related to potential human pathogens. Building attributes, specifically the source of ventilation air, airflow rates, relative humidity and temperature, were correlated with the diversity and composition of indoor bacterial communities. The relative abundance of bacteria closely related to human pathogens was higher indoors than outdoors, and higher in rooms with lower airflow rates and lower relative humidity. The observed relationship between building design and airborne bacterial diversity suggests that we can manage indoor environments, altering through building design and operation the community of microbial species that potentially colonize the human microbiome during our time indoors.