Explain how VLANs and subnets differ, what broadcast domains are, and when you would use each.
Using the provided network inventory tables, write a query that reports the relationship between VLANs, subnets, broadcast domains, and active devices. Include records that lack a matching VLAN, subnet, or device.
vlan_id, vlan_name, cidr, broadcast_domain_id, network_design_note, and active_device_count.vlan_id ascending, then cidr ascending, with unmatched values last.| Column | Type | Description |
|---|---|---|
| vlan_idPK | INT | VLAN identifier |
| vlan_name | VARCHAR(100) | Human-readable VLAN name |
| site | VARCHAR(100) | Physical site |
| broadcast_domain_id | INT | Identifier for the Layer 2 broadcast domain |
| purpose | VARCHAR(100) | Intended network use |
| Column | Type | Description |
|---|---|---|
| subnet_idPK | INT | Subnet identifier |
| vlan_id | INT | Associated VLAN identifier |
| cidr | VARCHAR(30) | CIDR network range |
| network_role | VARCHAR(100) | Intended Layer 3 network role |
| Column | Type | Description |
|---|---|---|
| device_idPK | INT | Device identifier |
| device_name | VARCHAR(100) | Device name |
| vlan_id | INT | Configured VLAN identifier |
| device_type | VARCHAR(50) | Device category |
| is_active | BOOLEAN | Whether the device is currently active |