Is it best to design all tables with a UNIQUE...

Is it best to design all tables with a UNIQUEID() from the start?

I’ve been reading on scaling up, and whilst I’ve yet to launch a prototype, the app I’m developing has the potential to hold secure data that will need to be accessed forever (ish) once it starts to be accumulated… for legal purposes.

Individual users will need access to a mainly small set of data but their own data (individual lines/records) could become quite numerous… a log of locations taken at least hourly.

Scaling up using MySQL indicates possible future problems if tables don’t have an 8 digit ID field?

Assuming that upscaling to a proper database will be likely at some point in the future, it would seem to make sense to give each table an 8 digit unique ID?

Any thoughts?

0 2 297
2 REPLIES 2

In general, a good idea unless there is a “natural” unique key — SS# or timestamp or …

In your case, if the data being collected is log records, a timestamp might be fine (assumiing you aren’t generaitng multiple log records in the same second).

Yes, I understand, thank you Currently building with Googlesheets but thinking ahead…

Top Labels in this Space