This repository includes files with plain SQL that can be used to recreate a database:
- Use schema.sql to create all tables.
- Use data.sql to populate tables with sample data.
- Check queries.sql for examples of queries that can be run on a newly created database. Important note: this file might include queries that make changes in the database (e.g., remove records). Use them responsibly!
The Vet Clinic has implemented a PostgreSQL-based database, which serves as a comprehensive and efficient system for managing various aspects of veterinary care. This database consists of multiple interconnected tables, specifically designed to store information related to owners, veterinarians, visits, and other relevant data. With this database, the vet clinic can effectively manage and organize important information for the care and treatment of animals.
Database
- [Database created based on real life example]
- [Database populated with sample data]
- [Queries to retrieve data from the database that simulate real life]
To get a local copy up and running, follow these steps.
In order to run this project you need:
PostgreSQL installed on your local machine.
You can download and install the latest version of PostgreSQL from the official website. Follow the installation instructions for your operating system.
Clone this repository to your desired folder:
cd my-folder
git clone git@github.com:mohamedSabry0/vet-clinic.git
- After installing PostgreSQL, create a new database:
createdb vet_clinic
- Then run the following command to create the tables:
psql -d vet_clinic -f schema.sql
- Finally, populate the tables with sample data:
psql -d vet_clinic -f data.sql
To run the project, execute the following command:
psql -d vet_clinic -f queries.sql
- You can also run the queries in the queries.sql file in the PostgreSQL shell.
- Feel free to add your own queries to the queries.sql file and test them.
π€ Mohamed Sabry
- GitHub: @mohamedSabry0
- Twitter: @mohsmh0
- LinkedIn: LinkedIn
- [Deploy a live demo]
- [Include more real world scenarios and practices]
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project it would be truly appreciated if you give it a βοΈ.
I am grateful for these resources as they were a reason that I obtained a glimpse of their abundance of knowledge:
- Microverse
- tutorialspoint postgreSQL
- PostgreSQL Documentation
- PostgreSQL Tutorial
- PostgreSQL Exercises
This project is MIT licensed.