2

The sqlite database file format has two fields to identify the application the database file belongs to. The first field, application_id, is supposed to identify the application. The second field, user_version, can identify the version of the file format used by the database file in case there is more than one file format for an application.

These fields can be queried and set with pragmas:

PRAGMA application_id;      -- get application ID
PRAGMA application_id = ?;  -- set application ID
PRAGMA user_version;        -- get user version
PRAGMA user_version = ?;    -- set user version

Is there an official place where I can register my application ID to make sure that it is unique?

fuz
  • 88,405
  • 25
  • 200
  • 352

1 Answers1

2

The only registry is the magic.txt file in the source repository.

To register an application_id value, ask the developers by sending a mail to the SQLite mailing list.

CL.
  • 173,858
  • 17
  • 217
  • 259
  • It's a pretty small list so this doesn't seem to be done very often. This answer could be improved by explaining why you would want to do this, when you would not want to do this, and what to do instead. – Assimilater Jun 17 '17 at 05:16
  • @Assimilater That would not answer this question. If you want to know that, [ask](https://stackoverflow.com/questions/ask) a new question. – CL. Jun 17 '17 at 07:50
  • @Assimilater This question was asked [on request by CL](https://stackoverflow.com/a/35556931/417501). Extra boilerplate doesn't add anything. If you want to know what a SQLite application ID is useful for, consider [reading the documentation](http://www.sqlite.org/pragma.html#pragma_application_id). – fuz Sep 15 '17 at 10:21
  • @fuz, I had seen that request, and I had also long ago read that documentation. It doesn't change that this answer feels hollow and unhelpful. The documentation explains the application_id is meant to be useful for applications which use sqlite as a file format but it doesn't explain why so few applications seem to do this. Look at how empty magic.txt is, that suggests there might be more someone should consider before bothering with registering an application_id – Assimilater Sep 16 '17 at 15:49
  • Consider a question about c involving pointer syntax errors. An acceptable answer is to explain the error, a better answer is to explain why it might not be doing what they think it's doing. Same here, this is an acceptable answer, but better to explain why it might not mean what one thinks it means to register an `application_id` – Assimilater Sep 16 '17 at 15:50