From 962747f5b2f0c546f4287476e7a56e0d13a1d1af Mon Sep 17 00:00:00 2001 From: jonathanmunamire Date: Mon, 16 Jan 2023 19:51:13 +0200 Subject: [PATCH 1/3] Create Table --- data.sql | 7 ++++--- queries.sql | 9 ++++++++- schema.sql | 9 +++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/data.sql b/data.sql index c31ec67..407f9f1 100644 --- a/data.sql +++ b/data.sql @@ -1,5 +1,6 @@ /* Populate database with sample data. */ -INSERT INTO animals (name) VALUES ('Luna'); -INSERT INTO animals (name) VALUES ('Daisy'); -INSERT INTO animals (name) VALUES ('Charlie'); +INSERT INTO animals (id, name, date_of_birth, escape_attempts, neutered, weight_kg) VALUES (1, 'Agumon', '2020-02-03', 0, true, 10.23); +INSERT INTO animals (id, name, date_of_birth, escape_attempts, neutered, weight_kg) VALUES (2, 'Gabumon', '2018-11-15', 2, true, 8); +INSERT INTO animals (id, name, date_of_birth, escape_attempts, neutered, weight_kg) VALUES (3, 'Pikachu', '2021-01-07', 1, false, 15.04); +INSERT INTO animals (id, name, date_of_birth, escape_attempts, neutered, weight_kg) VALUES (4, 'Devimon', '2017-05-12', 5, true, 11); diff --git a/queries.sql b/queries.sql index 9624b62..07cb784 100644 --- a/queries.sql +++ b/queries.sql @@ -1,3 +1,10 @@ /*Queries that provide answers to the questions from all projects.*/ -SELECT * from animals WHERE name = 'Luna'; +SELECT * FROM animals WHERE name ilike '%mon%'; +SELECT * FROM animals WHERE date_of_birth BETWEEN '2016-01-01' AND '2019-12-31'; +SELECT name FROM animals WHERE neutered = true AND escape_attempts < 3; +SELECT date_of_birth FROM animals WHERE name IN ('Agumon', 'Pikachu'); +SELECT name, escape_attempts FROM animals WHERE weight_kg > 10.5; +SELECT * FROM animals WHERE neutered = true; +SELECT * FROM animals WHERE name != 'Gabumon'; +SELECT * FROM animals WHERE weight_kg BETWEEN 10.3 AND 17.4; \ No newline at end of file diff --git a/schema.sql b/schema.sql index bddf2cd..6440dcd 100644 --- a/schema.sql +++ b/schema.sql @@ -1,5 +1,10 @@ /* Database schema to keep the structure of entire database. */ CREATE TABLE animals ( - name varchar(100) -); + id INT, + name CHAR(20), + date_of_birth DATE, + escape_attempts INT, + neutered BOOLEAN, + weight_kg DECIMAL +); \ No newline at end of file From ed72926c51cb6a373d9c13d097ee9ce4ae933732 Mon Sep 17 00:00:00 2001 From: jonathanmunamire Date: Mon, 16 Jan 2023 21:00:34 +0200 Subject: [PATCH 2/3] Update Readme File --- README.md | 198 ++++++------------------------------------------------ 1 file changed, 20 insertions(+), 178 deletions(-) diff --git a/README.md b/README.md index a6f1a68..08967c3 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,11 @@ -# curriculum-databases-projects-template - -> This template should be used for database related projects at Microverse. -> Generate your own repository, update this README and edit all files content while working on projects. You should not be adding any new files unless asked otherwise. - - -## Getting Started - -This repository includes files with plain SQL that can be used to recreate a database: - -- Use [schema.sql](./schema.sql) to create all tables. -- Use [data.sql](./data.sql) to populate tables with sample data. -- Check [queries.sql](./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!** - - + logo +
+ @@ -63,36 +33,18 @@ After you're finished please remove all the comments and instructions! -# 📖 [your_project_name] - -> Describe your project in 1 or 2 sentences. +# 📖 Vet-Clinic -**[your_project__name]** is a... +**VetClinic** is a database project ## 🛠 Built With -### Tech Stack - -> Describe the tech stack and include only the relevant sections that apply to your project. +### SQL
Client -
- -
- Server - -
- -
-Database -
@@ -100,8 +52,6 @@ After you're finished please remove all the comments and instructions! ### Key Features -> Describe between 1-3 key features of the application. - - **[key_feature_1]** - **[key_feature_2]** - **[key_feature_3]** @@ -112,93 +62,27 @@ After you're finished please remove all the comments and instructions! ## 🚀 Live Demo -> Add a link to your deployed project. - -- [Live Demo Link](https://yourdeployedapplicationlink.com) +- [Live Demo Link]

(back to top)

-## 💻 Getting Started - -> Describe how a new developer could make use of your project. - -To get a local copy up and running, follow these steps. - -### Prerequisites - -In order to run this project you need: +## Getting Started - +- Use [schema.sql](./schema.sql) to create all tables. +- Use [data.sql](./data.sql) to populate tables with sample data. +- Check [queries.sql](./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!** ### Setup Clone this repository to your desired folder: - - -### Install - -Install this project with: - - - -### Usage - -To run the project, execute the following command: - - - -### Run tests - -To run tests, run the following command: - - - -### Deployment - -You can deploy this project using: - -

(back to top)

@@ -206,31 +90,11 @@ Example: ## 👥 Authors -> Mention all of the collaborators of this project. +👤 **Author** -👤 **Author1** - -- GitHub: [@githubhandle](https://github.com/githubhandle) -- Twitter: [@twitterhandle](https://twitter.com/twitterhandle) -- LinkedIn: [LinkedIn](https://linkedin.com/in/linkedinhandle) - -👤 **Author2** - -- GitHub: [@githubhandle](https://github.com/githubhandle) -- Twitter: [@twitterhandle](https://twitter.com/twitterhandle) -- LinkedIn: [LinkedIn](https://linkedin.com/in/linkedinhandle) - -

(back to top)

- - - -## 🔭 Future Features - -> Describe 1 - 3 features you will add to the project. - -- [ ] **[new_feature_1]** -- [ ] **[new_feature_2]** -- [ ] **[new_feature_3]** +- GitHub: [@jonathanmunamire](https://github.com/jonathanmunamire) +- Twitter: [@amanimunamire](https://twitter.com/amanimunamire) +- LinkedIn: [Jonathan Munamire](https://www.linkedin.com/in/jonathanmunamire/)

(back to top)

@@ -248,9 +112,7 @@ Feel free to check the [issues page](../../issues/). ## ⭐️ Show your support -> Write a message to encourage readers to support your project - -If you like this project... +If you like this project, you can give me a ⭐️

(back to top)

@@ -258,26 +120,6 @@ If you like this project... ## 🙏 Acknowledgments -> Give credit to everyone who inspired your codebase. - -I would like to thank... - -

(back to top)

- - - -## ❓ FAQ - -> Add at least 2 questions new developers would ask when they decide to use your project. - -- **[Question_1]** - - - [Answer_1] - -- **[Question_2]** - - - [Answer_2] -

(back to top)

From fe6fcf7f20aa780474b4f31c54890810bbf372c8 Mon Sep 17 00:00:00 2001 From: jonathanmunamire Date: Mon, 16 Jan 2023 21:05:13 +0200 Subject: [PATCH 3/3] Remove Icon --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 08967c3..14f3508 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,5 @@ -
- - logo -
- -
- # 📗 Table of Contents