AVIDeveloper
AVIDeveloper

Reputation: 3516

Database: Sharing two sets of values in a single table?

I'll start by saying I am not a DBA and I didn't get to do heavy database development so far (so I hope I'm not asking something obvious).

The Challenge:

  1. I have a dictionary application with pre-defined values.
  2. New values may be added via online updates.
  3. Users are not allowed to modify these application-values, but they may add/delete values of their own.
  4. The database (sqlite3) will contain a small amount of values (~2K-3K).
  5. The database schema is exactly the same for both user and application values.

Possible solutions:

I prefer the second solution - it'll avoid JOINs during runtime and the queries will remain simple.
However, an update to the application-values in the first solution would require me to just replace the application table with the new one.

Please let me know what you think:

Upvotes: 1

Views: 54

Answers (1)

Pleun
Pleun

Reputation: 8920

Why not just a column 'type' to your table and fill it with user/application?

Personaly I hate meaningfull ID's....

Upvotes: 3

Related Questions