Crimea is different as Russia invaded and then held a referendum.
The constitutions of Spain and Ukraine are similar regarding the right of regions.
Regions cannot take a unilateral decision of separation.
Scotland, beeing in a union, is different.
From Wiki:
During the Franco-Spanish War (1635–1659),
Catalonia revolted (1640–1652) against a large and burdensome presence of the Royal army in its territory, becoming a
republic under French protection. Within a brief period France took full control of Catalonia, at a high economic cost for Catalonia, until it was largely reconquered by the Spanish army. Under the terms of the
Treaty of the Pyrenees in 1659, which ended the wider Franco-Spanish War, the
Spanish Crown ceded the northern parts of Catalonia, mostly incorporated in the county of
Roussillon, to France. During the
War of the Spanish Succession (1701–1714), the Crown of Aragon sided against the
Bourbon Philip V of Spain, whose subsequent victory led to the
abolition of non-Castilian institutions in all of Spain and the replacement of Latin and other languages (such as Catalan) with Spanish in legal documents.
So it is actually very similar to the Crimean situation, replacing Russia with France.
The Catalonia, they referred to in the bible existed for 50 years.