- ๐ About the Project
- ๐ป Getting Started
- ๐ฅ Authors
- ๐ญ Future Features
- ๐ค Contributing
- โญ๏ธ Show your support
- โ FAQ
- ๐ License
This project involves creating a relational database for a vet clinic. The database will store information about animals, such as their names, birthdates, escape attempts, neutering status, weight, and species. You will be using SQL to define the structure of the database, insert sample data, and perform various queries to extract useful information.
The project is built using SQL for database management.
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!
Follow these steps to understand and work on the project:
The project is built using the following technologies:
- Server: Express.js - A fast and minimalist web framework for Node.js.
- Database: PostgreSQL - A powerful, open-source relational database system.
Feel free to modify or expand the tech stack as needed for your project's requirements.
- [SQL Database Management: Create, structure, and manage a relational database using SQL commands.]
- [Data Manipulation: Insert, update, and delete data within the database using SQL statements.]
- [Querying Data: Perform various types of SQL queries to extract meaningful information from the database.]
- Clone this repository to your local machine:
git clone https://github.com/PabloBona/vet-clinic-db
- Set up a PostgreSQL database named
vet_clinic
.
The schema.sql
file includes SQL commands to create the animals
table with the following columns:
id
: A unique identifier for each animal.name
: The name of the animal.date_of_birth
: The birthdate of the animal.escape_attempts
: The number of escape attempts made by the animal.neutered
: A boolean indicating if the animal is neutered.weight_kg
: The weight of the animal in kilograms.species
: The species of the animal.
You can execute the schema.sql
file to create the table structure by running:
psql -d vet_clinic -a -f schema.sql
Make sure you have PostgreSQL installed and configured on your machine before running the command.
Feel free to modify the column descriptions and structure according to your project's needs.
Please note that the database schema and structure provided are based on your project's requirements and can be adjusted as necessary.
The data.sql file contains SQL commands to insert sample data into the animals table. You can use these commands to populate the table with information about different animals.
The queries.sql file contains SQL queries to answer various questions about the data stored in the animals table. These queries cover topics like filtering animals based on conditions, retrieving specific information, and calculating aggregate values.
After running the queries, you can take screenshots of the results to showcase your work.
๐ค Pablo Bonasera
- GitHub: @Pablobona
๐ค lRebornsl
- GitHub: @lRebornsl
- Twitter: @RebornsDev
- LinkedIn: Anthony Vรกsquez
- [ x ] [User Authentication: Implement user authentication and authorization to allow different users to access and manage animal records with appropriate permissions.]
- [ x ] [Appointment Scheduling: Create a feature that enables users to schedule appointments for animals, such as check-ups, vaccinations, and surgeries.]
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project or if it helped you, please give a โญ๏ธ. I'd really appreciate it!
I would like to thank Microverse and all my peers and colleagues at Microverse for giving me the opportunity to work on this project.
-
[How do I set up the PostgreSQL database for this project?]
- Clone the repository to your local machine
- Create a new PostgreSQL database named "vet_clinic".
- Execute the SQL commands in the "schema.sql" file to create the necessary table structure.
- Populate the database with sample data by executing the SQL commands in the "data.sql" file.
-
[How can I run the queries provided in the "queries.sql" file?]
- To run the queries provided in the "queries.sql" file, you can use a PostgreSQL client or interface, such as psql command-line tool or a graphical tool like pgAdmin. Connect to your "vet_clinic" database and execute the queries in the file to retrieve the desired information from the database.
This project is MIT licensed.