Well, Germany and other EU countries have something called a fundamental right to protection of personal data. Its article 8 in the charter of fundamental rights. So the border control can check if you are a wanted or an alert has been put out on you, but cannot store the fact that a check was made if there is no legal reason.
The EU isn't the land of the free after all