{"id":18534875,"url":"https://github.com/gregorykogan/mephi-databases","last_synced_at":"2026-05-10T05:37:37.614Z","repository":{"id":259745034,"uuid":"879304033","full_name":"GregoryKogan/mephi-databases","owner":"GregoryKogan","description":"Laboratory work on the database course at MEPhI.","archived":false,"fork":false,"pushed_at":"2024-12-20T17:50:47.000Z","size":6563,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T00:15:02.359Z","etag":null,"topics":["database","go","golang","gorm","gorm-orm","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GregoryKogan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-10-27T15:00:27.000Z","updated_at":"2024-12-20T17:50:51.000Z","dependencies_parsed_at":"2025-05-15T00:25:04.879Z","dependency_job_id":null,"html_url":"https://github.com/GregoryKogan/mephi-databases","commit_stats":null,"previous_names":["gregorykogan/mephi-databases"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GregoryKogan/mephi-databases","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fmephi-databases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fmephi-databases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fmephi-databases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fmephi-databases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GregoryKogan","download_url":"https://codeload.github.com/GregoryKogan/mephi-databases/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fmephi-databases/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260453743,"owners_count":23011576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","go","golang","gorm","gorm-orm","postgresql","sql"],"created_at":"2024-11-06T19:17:34.879Z","updated_at":"2026-05-10T05:37:37.567Z","avatar_url":"https://github.com/GregoryKogan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mephi-databases\n\nLaboratory work on the database course at MEPhI.  \nTopic: Trello\n\nThis project is built in Go, uses [GORM](https://gorm.io/) as an ORM for PostgreSQL and [gofakeit](https://github.com/brianvoe/gofakeit) package to seed the database.\n\n**Checkout the [queries.md](queries.md) file for possible queries to run.**\n\n\u003cdetails\u003e\n  \u003csummary\u003eEntity-relationship diagram\u003c/summary\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=https://github.com/user-attachments/assets/a238f8bc-5cea-41d4-b81b-e7b5e1c949cd width=50% /\u003e\n  \u003c/p\u003e\n\u003c/details\u003e\n\n## Run\n\nThe project is dockerized. To run it, you need to have Docker installed on your machine.  \nIf you want to run seeder, you need to pass `--profile seed` to the `docker-compose` command.\n\n```bash\ndocker compose --profile seed up --build\n```\n\nAfter the seeder has finished its work, you can run the project without the `--profile seed` flag, because the database will already be populated.\n\n```bash\ndocker-compose up --build\n```\n\n### Configuration\n\nProjects's configuration is stored in the `config.yml` file.  \nDefault configuration:\n\n```yaml\nseeder:\n  load_batch_size: 2000\n  create_batch_size: 5000\n  entities: # Number of entities to create\n    users: 10000\n    # Average ratios of entities\n    # Notice that labels and board members are the most numerous entities (30 times more than users)\n    # Overall, the number of entities is 161 times more than the number of users\n    # For example, if you have 10.000 users, you will have 1.610.000 entities in total\n    boards_per_user: 3 # 3x users\n    lists_per_board: 3 # 9x users\n    cards_per_list: 2 # 18x users\n    labels_per_board: 10 # 30x users\n    comments_per_card: 0.5 # 9x users\n    attachments_per_card: 0.333 # 6x users\n    board_members_per_board: 10 # 30x users\n    card_labels_per_card: 1.5 # 27x users\n    card_assignees_per_card: 1.5 # 27x users\n```\n\n### Benchmark\n\nOn my machine (M1Pro MBP 14\"), the seeder creates 10k users and 16.1M entities in roughly 40 seconds (with the default configuration).  \n`pgdata` volume is about 2.7GB.\n\n## PgAdmin\n\nPgAdmin will be available at `http://localhost:5050`.\n\nCredentials to connect to the database:\n\n```plaintext\nHost name/address: database\nPort: 5432\nUsername: mephi\nPassword: mephi\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=https://github.com/user-attachments/assets/a5863b47-0bed-446a-bddd-651acd1dd367 width=50% /\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorykogan%2Fmephi-databases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorykogan%2Fmephi-databases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorykogan%2Fmephi-databases/lists"}