Re: ERROR: 22P02: invalid input syntax for integer [message #4960 is a reply to message #4955] |
Mon, 31 August 2015 16:30 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to previous message](/theme/default/images/down.png) |
rafs
Messages: 69 Registered: May 2015
|
Member |
|
|
In this version of the project I was experimenting with trying to avoid having technical PKs everywhere, as per your design suggestions. I like this approach better, but in a table I also needed a unique identifier, 'uid' that means something external to the DB relationships. So, basically most tables had natural string primary keys, and in several of them they were compound primary keys. The one with the three compound keys also required 'uid' for external use. I preferred the three compound keys because they meant something and could be searched in the one table without having to figure out how to search the current table by creating JOINing SQL queries or however that is supposed to happen.
Basically, I am still learning and experimenting. The old DB used technical keys that got hard-coded into a final product. Those design choices have created restrictions future expansion. I am trying to add a new layer of abstraction to the old design, so now these previous integer keys, are themselves entities within this new model.
If I make it to the end of this project I will probably have made every mistake possible.
[Updated on: Mon, 31 August 2015 18:12] Report message to a moderator
|
|
|