{"id":16680653,"url":"https://github.com/verdagio/graphtheory-2017-project","last_synced_at":"2026-04-27T00:31:29.837Z","repository":{"id":121638873,"uuid":"87177896","full_name":"Verdagio/GraphTheory-2017-Project","owner":"Verdagio","description":"3rd Year Under-graduate graph theory project using Neo4J","archived":false,"fork":false,"pushed_at":"2017-04-19T23:46:15.000Z","size":714,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-02T06:14:34.934Z","etag":null,"topics":["database","graph","neo4j","neo4j-database","theory"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Verdagio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-04T11:18:55.000Z","updated_at":"2017-04-04T11:19:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"c16c0fd5-3cb2-400c-a420-3bd731262764","html_url":"https://github.com/Verdagio/GraphTheory-2017-Project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Verdagio/GraphTheory-2017-Project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Verdagio%2FGraphTheory-2017-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Verdagio%2FGraphTheory-2017-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Verdagio%2FGraphTheory-2017-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Verdagio%2FGraphTheory-2017-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Verdagio","download_url":"https://codeload.github.com/Verdagio/GraphTheory-2017-Project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Verdagio%2FGraphTheory-2017-Project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32318417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","graph","neo4j","neo4j-database","theory"],"created_at":"2024-10-12T13:42:15.629Z","updated_at":"2026-04-27T00:31:29.821Z","avatar_url":"https://github.com/Verdagio.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphTheory-2017-Project\n3rd Year Under-graduate graph theory project using Neo4J\n\n## Introduction\n\nIn this project we we're tasked wih taking our timetable and putting it into a graph database.\nI decided to take the course as a whole and display the time table for all with clear segementation of years and what is in each year.\nBefore building the graph I decided that it would be best to record all data that would be required in a text file. \nFrom data mining I extracted modules, rooms, lecturers. I then filtered this data down to the relevant data required for the task, removing rooms, \u0026 lecturers and began to build my queries from this.\n\n#### What is Neo4J?\n\n\u003e Neo4j is a graph database management system developed by Neo Technology, Inc. \n\u003e Described by its developers as an ACID-compliant transactional database with native graph storage and processing, \n\u003e Neo4j is the most popular graph database according to db-engines.com. [Reference](https://en.wikipedia.org/wiki/Neo4j)\n\n## Structure\n\nWhen approaching the problem I took some time to draw out and plan how the data should be represented.\nI had come to 4 different con clusions on how I might approach the problem seen below.\n\n![123](http://imgur.com/5YqFuIo.png)\n![4](http://imgur.com/FkuX635.png)\n\nThe structure in which this graph db is broken up into are as follows:\n\n| Name | Type | Relationship | Receiver |\n| --- | --- | --- | --- |\n| Day | Node | Null | null |\n| Room | Node | Time | Day |\n| Module | Node | Lab, Lecture | Room |\n| Module | Node | In | Years |\n| Year | Node | null | null |\n| Course | Node | Has | Years |\n| Lecturer | Node | Teaches | Module |\n\nI ended up opting for the 4th option as this seemed to be the most logical, although there are many other viable routes I could have taken\nwhen building this database. \n\nThe structure in english is as follows: The course has multiple years which each have their modules that are taught by lecturers, the modules have labs \u0026 lectures in rooms at times of the day. \n###### (Course)-[Has]-\u003e(Year)\u003c-[In]-(Module)-[Lab / Lecture]-\u003e(Room)-[Time]-\u003e(Day).\n\nWith that structure in mind I began to datamine extracing only the most relevant information which I required to build the graph.\nOnce the dataminig was done I then began to research how to make nodes, relationships, labels, properties, etc.\nAfter some experimentation I was ready to begin building the graph. \n\nRather than jumping straight into the console I decided to build up all the queries into a text file which I could simply copy and paste into the console...\n\nThis also gave me the idea that with a simple script could be written to automate the process, while I did follow through on writing the script due to time constraints, I do think this would be a simple enough task essentially the script would read from a file and write to the console.\n\nThe text file which I spoke of is attached to this git repository named GraphTheoryProj.txt for your interest.\nHalf the point of writing this was that if there were any issues during the build of the database all queries were easily available for future use. \n\nSee the graph in it's final form here:\n![graph](http://imgur.com/xMscQFW.png)\n\n## Queries\n\nHere are a few queries which you can carry out:\n\nReturn Lectures on a Monday for all years:\n```\n match (a: Year)-[b]-(n)-[r: LECTURE]-(m)-[t: Time]-(d: Day) where d.day = 'Monday' return r,n,m,t,d,a,b\n```\n![lectures](http://imgur.com/rSWuXV2.png)\n\nReturn Labs on a Monday for all years:\n```\n match (a: Year)-[b]-(n)-[r: LAB]-(m)-[t: Time]-(d: Day) where d.day = 'Monday' return r,n,m,t,d,a,b\n```\n![labs](http://imgur.com/oO8gOrP.png)\n\nOr everything on Monday\n```\nmatch (a: Day {day: 'Monday'})-[]-(n)-[]-(m: Module)-[]-(y: Year) return m, n, a, y\n```\n![all](http://imgur.com/LqXUfdC.png)\n\nwhat if we want just the Year 2 on a day?\n```\n(a: Day {day: 'Monday'})-[]-(n)-[]-(m: Module) where m.year = 2 return m, n, a\n```\n![y3](http://imgur.com/6vGF6kv.png)\n\nOr year 4's whole week?\n```\nmatch (a: Day)-[]-(n)-[]-(m: Module) where m.year = 4 return m, n, a\n```\n![week](http://imgur.com/Jf50YiD.png)\n\nWe can carry out other queries such as what the lecturer teaches and to whom:\n```\nmatch (l: Lecturer)-[r]-(m)-[i: In]-(y) where l.name = 'INSERT NAME HERE' return l, r, m,y\n```\n![lecturer](http://imgur.com/rXd7FuY.png)\n\nThese are just some of the queries we can carry out. the naming convention of all the nodes are as follows\n```\n(: Course {title: 'example')\n(: Year {year: 0})\n(: Module {module: 'example', year: 0})\n(: Lecturer {name: 'example'})\n(: Room {room: 'example'})\n(: Day {day: 'example'})\n```\n## Conclusion\n\nWhile I do feel that I've only scraped the surface of what Neo4J can offer, I feel like I have learned quite a bit,\n\u0026 would reconsider the structure in which I have used in this prototype. Optimizing the existing database could take some time\nbut after just a few small changes made from the original design queries are made easier.\n\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverdagio%2Fgraphtheory-2017-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverdagio%2Fgraphtheory-2017-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverdagio%2Fgraphtheory-2017-project/lists"}