{"action":"created","issue":{"url":"https://api.github.com/repos/infolab-csail/wikithingsdb/issues/9","labels_url":"https://api.github.com/repos/infolab-csail/wikithingsdb/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/infolab-csail/wikithingsdb/issues/9/comments","events_url":"https://api.github.com/repos/infolab-csail/wikithingsdb/issues/9/events","html_url":"https://github.com/infolab-csail/wikithingsdb/pull/9","id":105112306,"number":9,"title":"Uses join statements to fetch all relationships from DB","user":{"login":"michaelsilver","id":5913522,"avatar_url":"https://avatars.githubusercontent.com/u/5913522?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsilver","html_url":"https://github.com/michaelsilver","followers_url":"https://api.github.com/users/michaelsilver/followers","following_url":"https://api.github.com/users/michaelsilver/following{/other_user}","gists_url":"https://api.github.com/users/michaelsilver/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsilver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsilver/subscriptions","organizations_url":"https://api.github.com/users/michaelsilver/orgs","repos_url":"https://api.github.com/users/michaelsilver/repos","events_url":"https://api.github.com/users/michaelsilver/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsilver/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/infolab-csail/wikithingsdb/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"alvaromorales","id":2496170,"avatar_url":"https://avatars.githubusercontent.com/u/2496170?v=3","gravatar_id":"","url":"https://api.github.com/users/alvaromorales","html_url":"https://github.com/alvaromorales","followers_url":"https://api.github.com/users/alvaromorales/followers","following_url":"https://api.github.com/users/alvaromorales/following{/other_user}","gists_url":"https://api.github.com/users/alvaromorales/gists{/gist_id}","starred_url":"https://api.github.com/users/alvaromorales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvaromorales/subscriptions","organizations_url":"https://api.github.com/users/alvaromorales/orgs","repos_url":"https://api.github.com/users/alvaromorales/repos","events_url":"https://api.github.com/users/alvaromorales/events{/privacy}","received_events_url":"https://api.github.com/users/alvaromorales/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-09-06T19:19:13Z","updated_at":"2015-09-07T00:33:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/infolab-csail/wikithingsdb/pulls/9","html_url":"https://github.com/infolab-csail/wikithingsdb/pull/9","diff_url":"https://github.com/infolab-csail/wikithingsdb/pull/9.diff","patch_url":"https://github.com/infolab-csail/wikithingsdb/pull/9.patch"},"body":"Closes #7 \r\n\r\nThis is almost ready, but before merging I want to discuss:\r\n* **Whether there is a way to filter case-insensitively**. I tried [using `func.lower`](http://stackoverflow.com/a/16573690) without any success. Any ideas? OR perhaps more generally, should WikiThingsDB be doing the work of removing underscores, separating concatenated DbpediaHypernymsAsTheyAreWritten, or should all queries & results stick to exactly as the data is stored in the DB (e.g. Bill Clinton's article is `Bill_Clinton`)? What do you think?\r\n* As of now, the `fetch` library assumes you are on the machine with the DB (Malta). What is the best way to create a username/password for MySQL so that other machines can connect?\r\n\r\nAlso, I discovered by trial-and-error that it appears article ==> redirects is a one-to-many relationship as oppose to many-to-many as I originally thought, so it is only interesting to do `redirects_of_article()` and not `articles_of_redirect()`. Ex:\r\n```Python\r\n>>> from wikithingsdb import fetch\r\n>>> fetch.redirects_of_article(\"Bill_Clinton\")\r\n['BillClinton', 'William_Jefferson_Clinton', 'President_Clinton', 'William_Jefferson_Blythe_IV', 'Bill_Blythe_IV', 'Clinton_Gore_Administration', \"Buddy_(Clinton's_dog)\", 'Bill_clinton', 'William_Jefferson_Blythe_III', 'President_Bill_Clinton', 'Bull_Clinton', 'Clinton,_Bill', 'Virginia_Dell_Cassidy', 'Virginia_Cassidy_Blythe', 'William_clinton', 'Virginia_Clinton_Kelly', '42nd_President_of_the_United_States', 'Bill_Jefferson_Clinton', 'William_J._Clinton', 'Billl_Clinton', 'Bill_Clinton\\\\', \"Bill_Clinton's_Post_Presidency\", \"Bill_Clinton's_Post-Presidency\", 'Klin-ton', 'Bill_J._Clinton', 'William_Jefferson_\"Bill\"_Clinton', 'Virginia_Clinton', 'William_Blythe_III', 'William_J._Blythe', 'William_J._Blythe_III', 'Bil_Clinton', 'WilliamJeffersonClinton', 'William_J_Clinton', \"Bill_Clinton's_sex_scandals\", 'Billy_Clinton', 'Willam_Jefferson_Blythe_III', 'William_\"Bill\"_Clinton', 'Billll_Clinton', 'Bill_Klinton', 'William_Clinton', 'William_Clinton', 'William_Jefferson_Clinton', 'Willy_Clinton', 'William_Jefferson_(Bill)_Clinton', 'Bubba_Clinton', 'MTV_president', 'MTV_President', 'The_MTV_President', 'Virginia_Kelly', 'Clintonesque', 'US_President_Bill_Clinton']\r\n```"},"comment":{"url":"https://api.github.com/repos/infolab-csail/wikithingsdb/issues/comments/138140519","html_url":"https://github.com/infolab-csail/wikithingsdb/pull/9#issuecomment-138140519","issue_url":"https://api.github.com/repos/infolab-csail/wikithingsdb/issues/9","id":138140519,"user":{"login":"alvaromorales","id":2496170,"avatar_url":"https://avatars.githubusercontent.com/u/2496170?v=3","gravatar_id":"","url":"https://api.github.com/users/alvaromorales","html_url":"https://github.com/alvaromorales","followers_url":"https://api.github.com/users/alvaromorales/followers","following_url":"https://api.github.com/users/alvaromorales/following{/other_user}","gists_url":"https://api.github.com/users/alvaromorales/gists{/gist_id}","starred_url":"https://api.github.com/users/alvaromorales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvaromorales/subscriptions","organizations_url":"https://api.github.com/users/alvaromorales/orgs","repos_url":"https://api.github.com/users/alvaromorales/repos","events_url":"https://api.github.com/users/alvaromorales/events{/privacy}","received_events_url":"https://api.github.com/users/alvaromorales/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T00:33:35Z","updated_at":"2015-09-07T00:33:35Z","body":"#### 1. Case insensitivity\r\n\r\nTo answer this, I'm making two assumptions:\r\n\r\n* We'll use WikiThingsDB to produce the Wikipedia symbols and synonyms files for Omnibase\r\n* Omnibase is case-sensitive and keeps the true casing of its symbols (@sfelshin, can you confirm this?)\r\n\r\nIf so, I think WikiThingsDB should only **normalize symbols** (e.g. replace underscores, split camelcase). It should not filter case-insensitively.\r\n\r\nCase insensitive searches are hard in a relational db. You either have to issue a slow `LIKE` query or have a mirror table with all rows in lowercase.\r\n\r\nIf the users of WikiThingsDB (e.g. Omnibase) know the true casing of symbols, then we should not run into retrieval issues. The ugly, unnormalized representation of symbols (`thing_with_underscores`) should only be internal to WikiThingsDB. Omnibase should see normalized symbols (`Barack Obama` instead of `Barack_Obama`).\r\n\r\n#### 2. Connecting to MySQL on malta\r\n\r\nMySQL on malta is running on localhost, which means it cannot accept connections from remote hosts. We need to have a MySQL instance running on `0.0.0.0`. I think WikiThingsDB is a great candidate to run on a virtual machine on OpenStack.\r\n\r\nDo you have instructions on how to bootstrap the DB? (how to load pages and redirect)\r\n\r\n[However, this is a matter of getting WikiThingsDB production-ready -- we can keep testing and developing on malta]."}}