An open API service indexing awesome lists of open source software.

https://github.com/getssh/vet-clinic-database


https://github.com/getssh/vet-clinic-database

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# 📗 Table of Contents

- [� Table of Contents](#-table-of-contents)
- [vet-clinic-database ](#vet-clinic-database-)
- [🛠 Built With ](#-built-with-)
- [💻 Getting Started ](#-getting-started-)
- [👥 Author(s) ](#-authors-)
- [🔭 Future Features ](#-future-features-)
- [🤝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)
- [🙏 Acknowledgments ](#-acknowledgments-)
- [📝 License ](#-license-)


# vet-clinic-database

**vet-clinic-database** is a database which is reletional database created with postgreSQL. It create animal database and store the data in diffrent tables and fetch the data when required with the necessary queries.

## 🛠 Built With

- ### Tech Stack



  • PostgreSQL

- ### Key Features
- **[Create animals database]**
- **[Create Table with animal data]**
- **[Get data from the database]**

(back to top)

## 💻 Getting Started

To get a local copy of this project up and running, follow these steps.

- ### Prerequisites

- You need to have `PostgreSQL` installed, you can follow the [PostgreSQL Tutorial](https://www.postgresqltutorial.com/) to install it on your machine.

- ### Setup
Clone this repository to your desired folder:
```sh
git clone https://github.com/getssh/vet-clinic-database
cd vet-clinic-database
```
- ### Run
Start your `PostgreSQL` CLI:
```sh
psql postgres
```
`PostgreSQL` will show the `prompt`:
```postgresql
postgres=#
```
Now you can start typing `SQL` sentences. Happy querying!
- ### Usage
This repository includes files with plain SQL that can be used to recreate a database:
- Use [schema.sql](./schema.sql) to create all tables.
```sql
CREATE DATABASE vet_clinic;
```
```sql
CREATE TABLE animals (
id INT GENERATED ALWAYS AS IDENTITY,
name VARCHAR(50),
date_of_birth DATE,
escape_attempts INT,
neutered BOOLEAN,
weight_kg DECIMAL,
PRIMARY KEY(id)
);
```
- Use [data.sql](./data.sql) to populate tables with sample data.
```sql
INSERT INTO animals(name, date_of_birth, escape_attempts, neutered, weight_kg)
VALUES ('Agumon', '02/03/2020', 0, true, 10.23);
```
- Check [queries.sql](./queries.sql) for examples of queries that can be run on a newly created database.
```sql
SELECT * from animals WHERE name LIKE '%mon';
```
⚠️ _*Important note: this file might include queries that make changes in the database (e.g., remove records). Use them responsibly!*_

(back to top)

## 👥 Author(s)

👨‍💻 **Getayawkal Tamrat**

- GitHub: [@getssh](https://github.com/getssh)
- Twitter: [@GetayawkalT](https://twitter.com/GetayawkalT)
- LinkedIn: [@getayawkal-tamrat](https://www.linkedin.com/in/getayawkal-tamrat/)

(back to top)

## 🔭 Future Features

- [ ] **Add more data to the database**
- [ ] **Write complex schema and quires**
- [ ] **Work with multiple tables**

(back to top)

## 🤝 Contributing

Contributions, issues, typos, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/getssh/vet-clinic-database/issues/).

(back to top)

## ⭐️ Show your support

If you like the project please give it a start

(back to top)

## 🙏 Acknowledgments

- I would like to thank my mentors and follow students and coding partners

(back to top)

## 📝 License

This project is [MIT](./MIT.md) licensed.

(back to top)