Depend on RowID or implement primary keys?

I know this has been covered in a number of other conversations on the forum, so I know the details. I’m just not sure I am making the correct decision. I’m just getting around to moving the database in our program from RealSQLDatabase to SQLiteDatabase and running into the update issues on tables without a primary key. The main database does have primary keys in its tables, but some of the smaller secondary databases do not. Is it OK to retrieve the recordsets from them like this:

sql = “SELECT RowID, MyField1, MyField2,MyField3 FROM SecondaryDB”

and depend on the internal RowID when I update? Or are their some valid reasons why I should go back in and add Primary keys and rely on those? This will not be translated to another type of database in the future, it will always stay SQLite from this point on. Any recommendation on this issue would be helpful, thanks.

assign a primary key & do not depend on row id
why ?
see where it says
The VACUUM command may change the ROWIDs of entries in any tables that do not have an explicit INTEGER PRIMARY KEY.

I have seen RowID change on me as the database runs. SQLite tends to be more stable but like @Norman Palardy said, doing maintenance like a Vacuum can/will change the RowIDs.

many of us have lost lots of hair due to that. I pretend that they dont exist that way I am not depending on them. I generate my own UID (Unique ID) for each entry (row). Call the UID whatever you want (within reason). I have used ID, UID, RID, URID, and a few others.

good luck!

and make them auto-incrementing and let them just take care of themselves?

That probably seals the deal there, because the vacuum command is used from time to time to tidy things up. Thanks.

that part won’t matter
you can do that or not just make sure you add an explicit integer primary key

Got it, thanks. OK, let me give it a whirl, thanks for the input Norman and Scott.