How can I allow only one record per category?

  • Thread starter Thread starter Rachel Garrett
  • Start date Start date
R

Rachel Garrett

Greetings,

Suppose I have a database with a category for Region, and the
possibilities are North, South, East, and West. (I might want to add
regions in the future, and some tables will have more than one record
per region, so Region needs to be its own column rather than having
columns for North, South, East, and West individually.)

Now let's say that there are some tables that use Region, where I want
to allow only one record for North, one record for South, one for
East, and one for West.

What is the best way to accomplish this?

Thanks,
Rachel
 
In the table in which you want only one record per region, index the Region
column, and, in the properties, specify "no duplicates".

As XPS350 said, if you make Region a Primary Key, it will be indexed with no
duplicates allowed, but it is not _necessary_ that Region be the Primary
Key, only with properties as I described.
 
In the table in which you want only one record per region, index the Region
column, and, in the properties, specify "no duplicates".

As XPS350 said, if you make Region a Primary Key, it will be indexed withno
duplicates allowed, but it is not _necessary_ that Region be the Primary
Key, only with properties as I described.

Thanks; I'll use this.

--Rachel
 
Back
Top