# bedroom ## Purpose The **bedroom** table defines residential units assigned to personnel within the facility; except D-Class personnel. It is used to manage housing allocation based on location and room classification, ensuring controlled distribution of living quarters across facility. ## Columns | Field | Type | Description |-----------|-----------|------------------------------------------------------------------| | id_bed | MEDIUMINT | Unique bedroom identifier (PK, AUTO_INCREMENT) | id_loc | SMALLINT | Location identifier where the bedroom is physically located (FK) | room_type | ENUM | Classification of room quality |------------------------------------------------------------------------------------------| ### ENUM values - room_type = ('basic','advanced','elite') ## Relationships - References **location.id_loc** through **bedroom.id_loc** to define the physical location of the bedroom. - Referenced by **personnel.id_bed** to assign personnel members to residential units. ## Rules - Bedrooms are strictly located in EZ only - `id_bed` with value NULL indicates that the personnel is either off-site, retired or deceased. - Bedrooms are assigned based on personnel role and clearance level: - basic: standard accommodation for sleeping and administrative use (e.g. cooks, security officers, maintenance staff) - advanced: enhanced quarters with private facilities and space for limited work equipment (e.g. researchers, senior researchers, senior security officers) - elite: high-security and high comfort-living quarters reserved for senior personnel (e.g. heads of research, security chief, site director) ## Example output +--------+--------+-----------+ | id_bed | id_loc | room_type | +--------+--------+-----------+ | 1 | 5 | elite | +--------+--------+-----------+