Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eduardosancho/vet-clinic
Database for a veterinarian clinic, contains info on animals, owners, employees and visits.
https://github.com/eduardosancho/vet-clinic
Last synced: 3 days ago
JSON representation
Database for a veterinarian clinic, contains info on animals, owners, employees and visits.
- Host: GitHub
- URL: https://github.com/eduardosancho/vet-clinic
- Owner: eduardosancho
- Created: 2022-03-22T05:01:53.000Z (almost 3 years ago)
- Default Branch: development
- Last Pushed: 2022-04-21T07:07:05.000Z (over 2 years ago)
- Last Synced: 2025-01-09T04:32:25.063Z (5 days ago)
- Language: PLpgSQL
- Size: 409 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vet Clinic
![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white)
This project contains the SQL commands to create a table called *animals*, populate it with sample items and filter depending on multiple parameters.
___Try it out___![ER diagram](screenshots/vet-clinic.png)
## Requirements
PostgreSQL must be installed :(- [MacOS Install Guide](https://www.postgresql.org/download/macosx/)
- [Linux Install Guide](https://www.postgresql.org/download/linux/debian/)
## Getting StartedClone this repository by running:
`git clone https://github.com/eduardosancho/vet-clinic.git`This repository includes files with plain SQL that can be used to recreate a database:
1. Run this in your bash terminal to gain access to postgres command line
~~~ bash
$ psql postgres
~~~2. Create a new database with any name ('vet-clinic' is suggested), and connect to that database.
~~~ postgres
# CREATE DATABASE ;
# \c
~~~3. Use [schema.sql](./schema.sql) to create all tables. Copy and paste the content of this file into the postgres command line. That should create the tables in your database.
Now verify it. The following command displays all tables in your database:
~~~ postgres
# \d
~~~4. Use [data.sql](./data.sql) to populate tables with sample data. Copy and paste the content of this file into the postgres command line. That should create the tables in your database.
Now verify it. The following command displays all content in your selected table:
~~~ postgres
# SELECT * FROM ;
~~~5. Check [queries.sql](./queries.sql) for examples of queries that can be run on a newly created database. Copy and paste the content of this file into the postgres command line. That should create the display an enormous list of queries that I prepared. It's recommended to run them individually for better understanding.
**Important note: this file might include queries that make changes in the database (e.g., remove records). Use them responsibly!**### And that's pretty much all. Feel free to experiment!
## 👤 Author
| Social | Username |
| ------------ | ---------------------------------------------------- |
**GitHub** | [@eduardosancho](https://github.com/eduardosancho)
**Twitter** | [@sanchitoblog](https://twitter.com/sanchitoblog)
**LinkedIn** | [Eduardo Sancho Solano](https://www.linkedin.com/in/eduardo-sancho-solano/)## 🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](../../issues/).
## Show your support
Give a ⭐️ if you like this project!
## Acknowledgments
- [Tutorials Point](https://www.tutorialspoint.com/postgresql/postgresql_create_table.htm)
## 📝 License
This project is [MIT](./MIT.md) licensed.