Hi All
Presently we get device details though a feed where multiple devices can be mapped to single CustomerId. The device details are loaded in table : TBL_DEVICES . The devices presently do not have any natural primary key so we have created a sequence as primary key . We had a new request to assign a unique key for each device so that they can be searched from the UI using the unique key (Presently they can search using CustomerId) . The team has asked me to create a new column and increment using a sequence .
TBL_DEVICES ( Existing structure)
-----------------
DEVICE_ID NUMBER PRIMARY KEY using Sequence
CUSTOMER_ID NUMBER FOREIGN KEY
DEVICE_DESC VARCHAR2(100)
CAPACITY NUMBER
Can't we use the existing primary key as a unique key? . When I asked the same they said that showing primary key on UI is not a good practice . I was not convinced as it doesn't make sense to add a column and sequence which adds no value.
Please suggest.
Thanks