timwis / dataface

Build and manage data with a spreadsheet-like interface
https://dataface-demo.herokuapp.com
43 stars 4 forks source link

Discussion: Use CTIDs instead of primary keys #35

Open timwis opened 7 years ago

timwis commented 7 years ago

@begriffs suggested that perhaps we can use the ctid value of a row to make changes to it, obviating the need for a primary key to be set.

For example:

The nice thing about this is that end-users wouldn't need to know what primary keys are. Are there trade offs? If you're using it against a table that does have a primary key field(s), it should still work, I imagine...

timwis commented 7 years ago

Another thing to keep in mind is that once we add the concept of "linked tables" (foreign key columns), we'll need the foreign table to have a primary key. So we may not be able to get around having primary keys in dataface after all.