Skip to content

update readme #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ This project contains the database schema and related files for the BMB applicat
├── outputs.tf
├── terraform.tfvars
└── scripts/
├── create_tables.sql
├── insert_data.sql
└── update_schema.sql
├── create_table_script.sql
```

## Dependencies
Expand All @@ -38,13 +36,7 @@ terraform apply

```mermaid
erDiagram
Customers {
char(36) Id
varchar(11) Cpf
varchar(100) Name
varchar(100) Email
}


Products {
char(36) Id
varchar(100) Name
Expand Down Expand Up @@ -83,12 +75,31 @@ terraform apply
decimal(10) Amount
}

Customers ||--o{ Orders : "has"
Orders ||--|{ OrderItems : "contains"
Products ||--o{ OrderItems : "included in"
Orders ||--o| Payments : "paid with"
```

## No more Customers table
The Customers table was removed from the schema as we've integrated Amazon Cognito for user management. This leverages a robust, existing solution for the generic subdomain of user/customer management.

## Why MySql?
I've decided to use MySQL as the database for the fast-food ordering system following the reasons below:

* **Simplicity:**
* Easy installation, configuration, and management, ideal for both the development team and the production environment.
* Familiar and widely used SQL syntax, simplifying query writing and maintenance.
* **Performance:**
* High performance for **TRANSACTIONAL OPERATIONS**, ensuring fast processing of orders and payments, even during peak hours.
* Efficient query optimization and indexing features for quick response times.
* **Reliability:**
* Data integrity features and ACID properties (Atomicity, Consistency, Isolation, Durability) guarantee information consistency and security.
* **Cost-effectiveness:**
* Open-source solution with no licensing costs, making it an affordable option for the project.
* Extensive user community and comprehensive documentation readily available online.

* **Aurora Serverless**
- I've also chosed to use Aurora Serverless, so I can take advantage of all serverless features like no need fo managing database servers, updates, patching and of course availability andscalability
Comment on lines +101 to +102
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Good addition! Consider expanding and improving formatting.

The inclusion of information about Aurora Serverless is valuable. However, there are some areas for improvement:

  1. Fix typos: "chosed" should be "chosen", "andscalability" should be "and scalability".
  2. Use consistent formatting with the previous section (dashes for list items, proper indentation).
  3. Consider expanding on the benefits of Aurora Serverless, perhaps in a similar structure to the MySQL section.

Here's a suggested revision:

## Why Aurora Serverless?
I've chosen to use Aurora Serverless for the following reasons:

- **Reduced Management Overhead:**
  - No need for managing database servers, updates, or patching.
- **Scalability:**
  - Automatically scales capacity based on application needs.
- **Cost-Effectiveness:**
  - Pay only for the resources used, ideal for variable workloads.
- **High Availability:**
  - Built-in fault tolerance and self-healing capabilities.

This structure provides more detail and aligns better with the MySQL section, improving overall document consistency.

Tools
Markdownlint

102-102: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


103-103: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

## This repo on the infrastructure

![Architecture Diagram](aws-infra-phase-3.png)
![Architecture Diagram](aws-infra-phase-3.png)
8 changes: 0 additions & 8 deletions init/sql/customers_table.sql

This file was deleted.

10 changes: 0 additions & 10 deletions init/sql/schema.sql
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
use techchallengedb;

CREATE TABLE IF NOT EXISTS Customers
(
Id char(36) not null
primary key,
Cpf varchar(11) not null,
Name varchar(100) null,
Email varchar(100) null
);


CREATE TABLE IF NOT EXISTS Products
(
Id char(36) not null comment 'product id'
Expand Down
Loading