Top "Unique-constraint" questions

Unique-constraint is an index that sets one or multiple fields to be unique in a data entity

How does unique constraint affect write performance in Postgres DB

Does the UNIQUE constraint specified on a column or group of columns affect the write performance of Postgres DB in …

performance postgresql unique-constraint
UNIQUE Constraint, only when a field contains a specific value

I'm trying to create a UNIQUE INDEX constraint for two columns, but only when another column contains the value 1. For …

mysql unique-constraint
What is the difference between UNIQUE, UNIQUE KEY and CONSTRAINT 'name' UNIQUE?

I have a basic users table I want to create in MySQL. I do not want duplicate emails or duplicate …

mysql database-design unique create-table unique-constraint
HABTM - uniqueness constraint

I have two models with a HABTM relationship - User and Role. user - has_and_belongs_to_many :roles …

ruby-on-rails has-and-belongs-to-many unique-constraint
Unique constraint not created in JPA

I have created the following entity bean, and specified two columns as being unique. Now my problem is that the …

mysql jpa jboss unique-constraint
Should I specify both INDEX and UNIQUE INDEX?

On one of my PostgreSQL tables, I have a set of two fields that will be defined as being unique …

postgresql indexing unique-constraint unique-index
Can PostgreSQL have a uniqueness constraint on array elements?

I'm trying to come up with a PostgreSQL schema for host data that's currently in an LDAP store. Part of …

arrays postgresql database-design ldap unique-constraint
How to specify that a combination of columns should be a unique constraint using annotations?

I want to make sure that all rows in my table have a unique combination of two fields, and I …

hibernate jpa annotations unique-constraint
Why can I not set this unique constraint in PostgreSQL?

I keep getting: SQL error: ERROR: could not create unique index "service_import_checksum_key" DETAIL: Key (checksum)=() is duplicated. …

postgresql constraints unique-constraint unique-key
Combination of two columns unique constraint

I created the table t1t2 which connects tables t1 and t2 as follows: CREATE TABLE t1t2( id integer …

sqlite constraints unique-constraint