Most cars have on-board computers that run the electrics, steering, transmission and security systems. These systems require a continuous amount of power to operate. If you disconnect the battery, you might find that these systems don’t work even when you reconnect the battery.
The best way to maintain a battery on extended holidays is to use a maintenance charger. It can be left connected for an indefinite period, ensuring your car battery remains fully charged while you are away.