Skip to content

Database for a veterinarian clinic, contains info on animals, owners, employees and visits.

Notifications You must be signed in to change notification settings

eduardosancho/vet-clinic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vet Clinic

Postgres

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


Requirements

PostgreSQL must be installed :(

Getting Started

Clone 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
$ psql postgres
  1. Create a new database with any name ('vet-clinic' is suggested), and connect to that database.
# CREATE DATABASE <database_name>;
# \c <database_name>
  1. Use 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:
# \d
  1. Use 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:
# SELECT * FROM <table_name>;
  1. Check 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
Twitter @sanchitoblog
LinkedIn Eduardo Sancho Solano

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

📝 License

This project is MIT licensed.

About

Database for a veterinarian clinic, contains info on animals, owners, employees and visits.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published