Pin represents rpi gpio pin & controls is string describing what the relay controls. Any state change is save to sqlite database.