Normalization of data in PostgreSQL