Saving and recovering styles with database layers