Unique primary key not really unique?

Hi, am new to bubble though have (old) SQL and database experience. Am trying to get a sound understanding and going well until i created a simple single data type called Children with 3 attributes Child Name, child age and child skill (i will be adding Parent data type later).
Anyway, i changed the primary key from Unique Key to Child Name.
However, when adding records manually via App Data, it is allowing me to add duplicates - am confused - when the Bubble manual says otherwise or so i believed.
The use case for this is displaying data for a single Thing, not a list of Things. whenever i do a Search, no matter what the constraint is, it retrieves a list of things. I am assuming and hoping that if I added a constraint on a (truly unique) Primary key, then a Search For to return a single thing, and Bubble would recognise it as a single thing and not a list.
I am clearly not getting my head around something quite fundamental and my SQL background is most likely clouding it - have searched forum and not seem to find an answer to this. Thanks in advance
jk

In Bubble a search always returns a list, so if you’re searching for a single thing using constraints, and that constraint is for something unique, you just need to specify ‘First Item’ on the returned search results in order to access it.

As to your first question, as far as I’m aware the Unique ID (and also Slug) is the only thing that identifies an entry in the Bubble database (a ‘thing’) as being unique and distinct from another entry (another ‘thing’).

Any other fields can have the same values as other things (apart from Slug) unless you specifically create logic to prevent that from happening when they are created. Otherwise Unique ID is the way things are identified (I’m not aware of any way to change that in Bubble).

1 Like

thanks Adam, got it - i coincidently realised i was reading “primary key” when App Data label was ‘primary field’! i really do need to clear my head of SQL lingo
thanks again
jk

1 Like

Yeah, the ‘primary field’ in the app data is just for display purposes to make it easier to read when looking through data - it doesn’t have any function other than that.

ta - onto my next hurdle! : )