The Boast of Cassiopeia (Κασσιόπεια) is a story from Greek mythology, associated with Perseus. The story is set in the royal household of Aethiopia (not to be confused with Ethiopia, the modern name of Axum). King Cepheus (Greek for gardener), and queen Cassiopeia (Greek for cassia juice), had promised their daughter Andromeda (Greek for ruler of men) to the nobleman Phineus.
Cassiopeia, having boasted herself equal in beauty to the Nereids, drew down the vengeance of Poseidon, who sent an inundation on the land and a whale-like sea-monster, the whale-like Cetus, (whom some modern writers and filmmakers replaced with the Scandinavian Kraken), which destroyed man and beast.
The oracle of Ammon announced that no relief would be found, unless the king exposed his daughter to the monster. Thus duly she was was fastened to a rock on the shore. Perseus, returning from having slain Medusa, found Andromeda, and slew the monster by turning it into stone with Medusa's head.
Perseus then set her free, and married her as his reward, in spite of Phineus. At the wedding a quarrel took place between the rivals, and Phineus was turned to stone by the sight of the Gorgon's head (Ovid, Metamorphoses v. 1).
Andromeda followed her husband to Tiryns in Argos, and became the ancestress of the family of the Perseidae through Perseus' and Andromeda's son, Perses. Perseus and Andromeda had six sons (Perseides): Perses, Alcaeus, Heleus, Mestor, Sthenelus, and Electryon, and one daughter, Gorgophone. Their descendants ruled Mycenae from Electryon down to Eurystheus, after whom Atreus got the kingdom, and include the great hero Heracles.
After her death she, Cetus, Cephus, and Cassiopeia, were placed by Athena amongst the constellations in the northern sky, near Perseus.
Origin of the Myth
Four constellations are associated with the myth, and their relative positions create a scene which may be the origin of a proportion of the myth. Viewing the fainter stars, visible to the naked eye, renders the constellations as
A large man wearing a crown (upside down with respect to the ecliptic. (The constellation Cepheus)
A smaller figure, next to the man, sitting on a chair. Due to the proximity to the pole star, it is visible the whole year, although sometimes upside down whilst in the chair  (http://borghetto.astrofili.org/costellazioni/cassiopeia.JPG). The greeks considered that this was an undignified position (being upside down, and also the normal way up, in a chair), and must be a suitable punishment for some crime. Since the punishment was one of losing dignity, vanity is a suitable crime. (The constellation Cassiopeia)
A maiden, chained up, facing/turning away from the ecliptic  (http://borghetto.astrofili.org/costellazioni/andromeda.JPG). (The constellation Andromeda)
A sea monster just under the ecliptic. (The constellation Cetus)
The constellation Pegasus is next to Andromeda, and may also be the origin of the part of the tale concerning Andromeda's rescue.
The genealogies in the myth possibly have their origin either in history, or in propaganda asserting an historic royal claim, such as a connection to Perseus.
The Myth in Art
Sophocles and Euripides (and in more modern times Corneille) made the story the subject of tragedies, and its incidents were represented in numerous ancient works of art.