My questions is whether it's possible to have unique index comprised of multiple columns where one of the columns may contain
Example: A table named 'regulated_person' has a number of columns including
ALIAS. The data type for
date, for the others it's String/
BIRTH_DATE are not nullable, i.e. they require values.
ALIAS serves as a tie-breaker for cases where two or more people have the same first/last names and are born the same day. Because the tie-breaking situations are not common I want to avoid the need to provide an
ALIAS value unless it's necessary.
By way of background the primary key for the table is handled by an auto-increment generator. The purpose for the unique index is to provide a 'business key' that will identify the row without having to resort to the primary key. I'm working with MySQL 5.1.35 and Hibernate ORM ver. 4.3.10.
Any suggestions as to server/database providers apart from MySQL would be welcome.
Thanks in advance for any guidance, and also apologies in advance for any unintended violations of 'forum protocol' as this is the first time I've submitted a question ANYWHERE.