Re: 2 Unique FKs in single Table
Posted by: Rick James
Date: August 04, 2016 11:04PM

Start by cleaning up the indexes.

PRIMARY KEY (`id`,`wafer_id`),
UNIQUE KEY `id_UNIQUE` (`id`),
UNIQUE KEY `sensor_UNIQUE` (`wafer_id`,`line`,`col`),
KEY `fk_sensor_wafer1_idx` (`wafer_id`),

-->

PRIMARY KEY(id),
UNIQUE KEY `sensor_UNIQUE` (`wafer_id`,`line`,`col`),

A PRIMARY KEY is a UNIQUE key is a KEY.
UNIQUE(a,b,c) renders KEY(a) useless.

In `pcb` it does not make sense to have 4 UNIQUE keys. Are they really unique?

Options: ReplyQuote


Subject
Written By
Posted
Re: 2 Unique FKs in single Table
August 04, 2016 11:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.