Hi everyone,
In a table, I'd like to have an auto filled field (like, an ID) but I don't want to have it as my primary key (I'd like to use it as say, name of a book for my library table). But OO doesn't seem to like my idea. Is there a better way to do it?
Thank you so much in advance.
Irene
[Solved] Primary key
[Solved] Primary key
Last edited by Hagar Delest on Fri Jul 28, 2017 10:44 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
Apache OpenOffice 4.1.2
Windows 10 ... I think
Windows 10 ... I think
Re: Primary key
A name is not suitable as a primary key. Simply use the auto-value. A primary key should be a unique value that points to a distinct row so any other table having a foreign key just needs the simple and completely meaningless book number to identify all the other attributes of a book.
A name is not a small value. A name has many bytes, therefore it is not suitable for really fast lookups.
A name is not unique. Two books can have the same name.
A name is not meaningless like an auto-ID. An auto-ID serves the one and only purpose to be a unique identifier for some item. You can change any attribute of your book while the unique identifier always points to the same book.
A name is not a small value. A name has many bytes, therefore it is not suitable for really fast lookups.
A name is not unique. Two books can have the same name.
A name is not meaningless like an auto-ID. An auto-ID serves the one and only purpose to be a unique identifier for some item. You can change any attribute of your book while the unique identifier always points to the same book.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice