{"action":"created","issue":{"url":"https://api.github.com/repos/openreferral/specification/issues/190","repository_url":"https://api.github.com/repos/openreferral/specification","labels_url":"https://api.github.com/repos/openreferral/specification/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/openreferral/specification/issues/190/comments","events_url":"https://api.github.com/repos/openreferral/specification/issues/190/events","html_url":"https://github.com/openreferral/specification/issues/190","id":294610000,"number":190,"title":"Question: ER Diagram `SERVICE_AT_LOCATION` table's Primary key","user":{"login":"adityasrini","id":8474514,"avatar_url":"https://avatars1.githubusercontent.com/u/8474514?v=4","gravatar_id":"","url":"https://api.github.com/users/adityasrini","html_url":"https://github.com/adityasrini","followers_url":"https://api.github.com/users/adityasrini/followers","following_url":"https://api.github.com/users/adityasrini/following{/other_user}","gists_url":"https://api.github.com/users/adityasrini/gists{/gist_id}","starred_url":"https://api.github.com/users/adityasrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityasrini/subscriptions","organizations_url":"https://api.github.com/users/adityasrini/orgs","repos_url":"https://api.github.com/users/adityasrini/repos","events_url":"https://api.github.com/users/adityasrini/events{/privacy}","received_events_url":"https://api.github.com/users/adityasrini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-06T02:21:26Z","updated_at":"2018-02-06T02:42:30Z","closed_at":null,"author_association":"NONE","body":"Hello maintainers, I have a question about your [ER diagram](https://openreferral.readthedocs.io/en/latest/_images/hsds_er_diagram_v1.1.png). In your table titled `SERVICE_AT_LOCATION`, you have a primary key titled `ID`. @chewgley and I were trying to figure out whether or not the primary key was unique or if it was a composite key comprising of the `service_id`, and `location-id` fields. If it is a unique value for each entry, I want to know what purpose that would serve that wouldn't be served by a combination of the two fields."},"comment":{"url":"https://api.github.com/repos/openreferral/specification/issues/comments/363292225","html_url":"https://github.com/openreferral/specification/issues/190#issuecomment-363292225","issue_url":"https://api.github.com/repos/openreferral/specification/issues/190","id":363292225,"user":{"login":"NeilMcKechnie","id":8440886,"avatar_url":"https://avatars2.githubusercontent.com/u/8440886?v=4","gravatar_id":"","url":"https://api.github.com/users/NeilMcKechnie","html_url":"https://github.com/NeilMcKechnie","followers_url":"https://api.github.com/users/NeilMcKechnie/followers","following_url":"https://api.github.com/users/NeilMcKechnie/following{/other_user}","gists_url":"https://api.github.com/users/NeilMcKechnie/gists{/gist_id}","starred_url":"https://api.github.com/users/NeilMcKechnie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeilMcKechnie/subscriptions","organizations_url":"https://api.github.com/users/NeilMcKechnie/orgs","repos_url":"https://api.github.com/users/NeilMcKechnie/repos","events_url":"https://api.github.com/users/NeilMcKechnie/events{/privacy}","received_events_url":"https://api.github.com/users/NeilMcKechnie/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T02:42:30Z","updated_at":"2018-02-06T02:42:30Z","author_association":"NONE","body":"Hi @adityasrini , I am not the official keeper of the spec, but my opinion is that if the service_at_location entity matches something in your own schema, then it would make sense to populate with its unique id. The purpose served is it would cleanly relate back to the source schema for purposes of doing updates, etc. In our case the equivalent entity is quite rich in data fields and functionality so we want to keep the reference to our unique id's intact when emitting HSDS.\r\n\r\nIf not, I would think a composite of service_id and location_id would make sense. I don't recall if HSDS specifies this id as an int or as a string, but if the latter you might do something like prefix the service_id with an \"S\" and the location_id with an \"L\", for clarity when generating the composite."}}
{"actor":{"display_login":"NeilMcKechnie"}}