Skip to content

getssh/vet-clinic-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📗 Table of Contents


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 to install it on your machine.
  • Setup

    Clone this repository to your desired folder:

    git clone https://github.com/getssh/vet-clinic-database
    cd vet-clinic-database
  • Run

    Start your PostgreSQL CLI:

    psql postgres

    PostgreSQL will show the prompt:

    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 to create all tables.
      CREATE DATABASE vet_clinic;
      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 to populate tables with sample data.
      INSERT INTO animals(name, date_of_birth, escape_attempts, neutered, weight_kg)
        VALUES ('Agumon', '02/03/2020', 0, true, 10.23);
    • Check queries.sql for examples of queries that can be run on a newly created database.
      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

(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.

(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 licensed.

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors