Question : Today I have discovered for myself that may-have-a, one-to-zero-or-one, (1-0..1) relationship can be implemented in two different ways: […]
Tag: unique-constraint
Does creating a unique constraint on a Postgres column remove the need to index it?
Question : Does creating a unique constraint on a Postgres column remove the need to index it? I expect that […]
Optimal way to ignore duplicate inserts? [duplicate]
Question : This question already has answers here: Idiomatic way to implement UPSERT in PostgreSQL (3 answers) Closed 6 years […]
MySQL Unique Key Limit
Question : I have been given a database dump that I am trying to rebuild. When I import I get […]
How to set constraint sql 2 colume, Data is not available elsewhere and must be used only
Question : How to set constraint sql 2 colume, Data is not available elsewhere and must be used only. Example […]
Unique constraint replaces existing foreign key
Question : I have two tables, parent and child, the child table has a FK on the parent table using […]
Is it reasonable to mark all columns but one as primary key?
Question : I have a table representing movies. The fields are: id (PK), title, genre, runtime, released_in, tags, origin, downloads. […]
When to use unique composite keys? [closed]
Question : Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the […]
How can I enforce ensure uniqueness of an association with a time dimension?
Question : I have a database table AB which tracks the association of A and B over time: create table […]
3 additional varchar(32) keys and also updating them — too bad for performance?
Question : I have a table in mind which basicaly would look like this: table1 ——– id bigserial autoincrement primary […]