{"action":"closed","issue":{"url":"https://api.github.com/repos/hendrixjoseph/FamilyTree/issues/5","labels_url":"https://api.github.com/repos/hendrixjoseph/FamilyTree/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/hendrixjoseph/FamilyTree/issues/5/comments","events_url":"https://api.github.com/repos/hendrixjoseph/FamilyTree/issues/5/events","html_url":"https://github.com/hendrixjoseph/FamilyTree/issues/5","id":92802296,"number":5,"title":"Change FATHER_CHILD and MOTHER_CHILD to FATHER_OF and MOTHER_OF","user":{"login":"hendrixjoseph","id":12754677,"avatar_url":"https://avatars.githubusercontent.com/u/12754677?v=3","gravatar_id":"","url":"https://api.github.com/users/hendrixjoseph","html_url":"https://github.com/hendrixjoseph","followers_url":"https://api.github.com/users/hendrixjoseph/followers","following_url":"https://api.github.com/users/hendrixjoseph/following{/other_user}","gists_url":"https://api.github.com/users/hendrixjoseph/gists{/gist_id}","starred_url":"https://api.github.com/users/hendrixjoseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hendrixjoseph/subscriptions","organizations_url":"https://api.github.com/users/hendrixjoseph/orgs","repos_url":"https://api.github.com/users/hendrixjoseph/repos","events_url":"https://api.github.com/users/hendrixjoseph/events{/privacy}","received_events_url":"https://api.github.com/users/hendrixjoseph/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-03T06:18:42Z","updated_at":"2015-07-03T06:23:18Z","closed_at":"2015-07-03T06:23:18Z","body":"Also make the child a primary key.\r\n\r\n```sql\r\nALTER TABLE FATHER_CHILD \r\nRENAME TO FATHER_OF;\r\n\r\nALTER TABLE FATHER_OF  \r\nMODIFY (CHILD_ID NOT NULL);\r\n\r\nALTER TABLE FATHER_OF\r\nADD CONSTRAINT FATHER_OF_PK PRIMARY KEY \r\n(\r\n  CHILD_ID \r\n)\r\nENABLE;\r\n```\r\n\r\nChange PERSON_VIEW appropriately\r\n\r\n```sql\r\nSELECT\r\n    P.ID,\r\n    DAD.ID AS FATHER_ID,\r\n    DAD.NAME AS FATHER,\r\n    MOM.ID AS MOTHER_ID,\r\n    MOM.NAME AS MOTHER,\r\n    P.NAME,\r\n    GENDERS.FULL_WORD AS GENDER,\r\n    B_PLACE.NAME AS PLACE_OF_BIRTH,\r\n    BIRTHS.TIME AS DATE_OF_BIRTH,\r\n    D_PLACE.NAME AS PLACE_OF_DEATH,\r\n    DEATHS.TIME AS DATE_OF_DEATH\r\nFROM\r\n    PERSON P,\r\n    PERSON DAD,\r\n    PERSON MOM,\r\n    MOTHER_OF,\r\n    FATHER_OF,\r\n    BIRTHS,\r\n    DEATHS,\r\n    PLACE B_PLACE,\r\n    PLACE D_PLACE,\r\n    GENDERS\r\nWHERE   P.GENDER = GENDERS.ABBR\r\nAND     FATHER_OF.FATHER_ID = DAD.ID (+)\r\nAND     MOTHER_OF.MOTHER_ID = MOM.ID (+)\r\nAND     P.ID = FATHER_OF.CHILD_ID (+)\r\nAND     P.ID = MOTHER_OF.CHILD_ID (+)\r\nAND     P.ID = BIRTHS.PERSON_ID (+)\r\nAND     P.ID = DEATHS.PERSON_ID (+)\r\nAND     BIRTHS.PLACE_ID = B_PLACE.ID (+)\r\nAND     DEATHS.PLACE_ID = D_PLACE.ID (+)\r\n```"}}