Added field to appmetadata table in RFC 3 #6

Merged
khuxkm merged 1 commits from center/rfcs:tilde-center into master 2019-03-04 20:44:07 +00:00
Contributor

A gross oversight on my part, but the lack of a second foreign key to another appdata entry makes queries between appdata and appmetadata horribly inefficient for its desired use case.

Previously, if a user wanted to make a service like Facebook with one appdata entry (e.g. a user) link to many other appdata entries (e.g. friends) using the appmetadata table, the appmetadata entry would need to convey it was a friend attribute and the ID of the other user in the VARCHAR(32) value field.

Now, for the same appdata-to-appdata relationship, the appmetadata could link to the user, the friend user, and use the value field to denote the relationship of these two entries as “friend”. This new field to appmetadata enabled the power behind using a relational database and can turn what would be multiple SQL queries before into just one.

A gross oversight on my part, but the lack of a second foreign key to another appdata entry makes queries between appdata and appmetadata horribly inefficient for its desired use case. Previously, if a user wanted to make a service like Facebook with one appdata entry (e.g. a user) link to many other appdata entries (e.g. friends) using the appmetadata table, the appmetadata entry would need to convey it was a friend attribute and the ID of the other user in the VARCHAR(32) value field. Now, for the same appdata-to-appdata relationship, the appmetadata could link to the user, the friend user, and use the value field to denote the relationship of these two entries as “friend”. This new field to appmetadata enabled the power behind using a relational database and can turn what would be multiple SQL queries before into just one.
Author
Contributor

Is there anything I need to change to have this PR accepted?

Is there anything I need to change to have this PR accepted?
khuxkm closed this pull request 2019-03-04 20:44:07 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tildeverse/rfcs#6
No description provided.