{"id":24273156,"url":"https://github.com/errea/vet_clinic_database","last_synced_at":"2026-05-21T01:31:36.346Z","repository":{"id":46804859,"uuid":"409896871","full_name":"errea/vet_clinic_database","owner":"errea","description":"For this project you need special preparation. As the goal of this project is to solve some performance issue, first we need to introduce those issues. In order to do that, you will populate your database with a significant number of data.","archived":false,"fork":false,"pushed_at":"2021-09-24T15:22:57.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2023-03-04T15:38:53.902Z","etag":null,"topics":["data","data-analysis","data-structures","data-visualization","database"],"latest_commit_sha":null,"homepage":"","language":null,"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/errea.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}},"created_at":"2021-09-24T08:53:23.000Z","updated_at":"2021-09-24T15:23:00.000Z","dependencies_parsed_at":"2022-09-12T05:10:25.059Z","dependency_job_id":null,"html_url":"https://github.com/errea/vet_clinic_database","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errea%2Fvet_clinic_database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errea%2Fvet_clinic_database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errea%2Fvet_clinic_database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errea%2Fvet_clinic_database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/errea","download_url":"https://codeload.github.com/errea/vet_clinic_database/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234088348,"owners_count":18777926,"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":["data","data-analysis","data-structures","data-visualization","database"],"created_at":"2025-01-15T19:19:12.275Z","updated_at":"2025-09-24T13:31:56.859Z","avatar_url":"https://github.com/errea.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://img.shields.io/badge/Microverse-blueviolet)\n\n# Vet clinic database: database performance audit\n\n\u003e For this project you need special preparation. As the goal of this project is to solve some performance issue, first we need to introduce those issues. In order to do that, you will populate your database with a significant number of data. [Find project specifications here](https://github.com/microverseinc/curriculum-databases/blob/main/db-structure/vet_clinic_performance_audit.md)\n\n      \n\n\u003cdiv align=\"center\"\u003e\n\n[![View Code](https://img.shields.io/badge/View%20-Code-green)](https://github.com/errea/vet_clinic_database)\n[![Github Issues](https://img.shields.io/badge/GitHub-Issues-orange)](https://github.com/errea/vet_clinic_database/issues)\n[![GitHub Pull Requests](https://img.shields.io/badge/GitHub-Pull%20Requests-blue)](https://github.com/errea/vet_clinic_database/pull/1)\n\n\u003c/div\u003e\n\n## Project description\n\nThis project is about building a mobile web application to check a list of metrics (numeric values) that you will create making use of React and Redux and also making a call from an API.\n\n## Database Preparation\n\nPlease complete the following steps:\n\n1. Make sure that you have your database set up with the schema and data from your previous projects.\n2. Run the following query to add an extra column to the owners table:\n\n``` sql\n-- Add an email column to your owners table\nALTER TABLE owners ADD COLUMN email VARCHAR(120);\n\n```\n3. Run the following statements to add data to your database (executing them might take a few minutes):\n``` sql\n\n-- This will add 3.594.280 visits considering you have 10 animals, 4 vets, and it will use around ~87.000 timestamps (~4min approx.)\nINSERT INTO visits (animal_id, vet_id, date_of_visit) SELECT * FROM (SELECT id FROM animals) animal_ids, (SELECT id FROM vets) vets_ids, generate_series('1980-01-01'::timestamp, '2021-01-01', '4 hours') visit_timestamp;\n\n-- This will add 2.500.000 owners with full_name = 'Owner \u003cX\u003e' and email = 'owner_\u003cX\u003e@email.com' (~2min approx.)\ninsert into owners (full_name, email) select 'Owner ' || generate_series(1,2500000), 'owner_' || generate_series(1,2500000) || '@mail.com';\n\n```\n4. Depening on your machine speed, it might be enough or not. Check that by running `explain analyze SELECT COUNT(*) FROM visits where animal_id = 4`: - If you get Execution time: X ms and X \u003e= 1000: that should be enough, you can continue to the project requirements. - If you get Execution time: X ms and X \u003c 1000: please go back to point 3. and repeat until you get a value bigger than 1000ms.\n## Built with\n\n- PostgresSQL.\n\n- SQL queries.\n\n- Gitflow\n\n\n## Getting Started\n\nTo get a local copy up and running follow these simple example steps:\n\n- On the project, GitHub page, navigate to the [main page of the repository](https://github.com/errea/vet_clinic_database)\n\n- Copy the project URL as displayed on HTTPS tab\n\n- If you're running Windows Operating System, open your command prompt. On Linux, Open your terminal\n\n- Change the current working directory to the location where you want the cloned directory to be made. Leave as it is if the current location is where you want the project to be.\n\n- Type `git clone`, and then paste the URL you copied in Step 3.\u003cbr\u003e\n\n  `$ git clone https://github.com/errea/vet_clinic_database.git` \u003cem\u003ePress Enter key\u003c/em\u003e\u003cbr\u003e\n\n- Your local copy will be created.\n\n- Please note that you must have Git installed on your PC, this can be done [here](https://gist.github.com/derhuerst/1b15ff4652a867391f03)\n\n- After you get the project aiming to the desired directory, you need now to install dependencies by running npm install.\n\n## ✒️  Authors \u003ca name = \"author\"\u003e\u003c/a\u003e\n\n👤 **Eri**\n\n- Github: [@errea](https://github.com/errea)\n- Twitter: [@Erreakay](https://github.com/errea)\n- Linkedin: [Eri Okereafor](https://www.linkedin.com/in/eri-ngozi-okereafor/)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\n\nFeel free to check the [issues page](https://github.com/errea/vet_clinic_database/issues)\n## 👍 Show your support\n\n- Microverse: [@microverse](https://www.microverse.org/)\n\n## Acknowledgments\n\n- Microverse\n\n\n## 📝 License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrea%2Fvet_clinic_database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferrea%2Fvet_clinic_database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrea%2Fvet_clinic_database/lists"}