Added database erd eerd and infrastucture docs

This commit is contained in:
SebasKoedam
2024-05-14 11:32:32 +02:00
parent 955c05ae40
commit db78a11747
7 changed files with 191 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -1 +1,15 @@
# EERD
# EERD
EERD stands for Extended Entity Relationship Diagram, which is an extended version of the Entity Relationship Diagram (ERD). An EERD is often used to visualize the structure and relationships between entities in a database.
In an EERD, different symbols are used to represent the different elements of a database. Two important symbols are the Primary Key (PK) and the Foreign Key (FK).
Primary Key (PK): A Primary Key is a unique identifier for an entity in a database. It is used to identify and distinguish rows in a table. In an EERD, a PK is usually indicated with an underscored attribute or a special symbol, such as a Key icon.
Foreign Key (FK): A Foreign Key is an attribute in a table that refers to the Primary Key of another table. It is used to define relationships between tables. In an EERD, an FK is usually indicated with a dotted line pointing to the PK of another entity.
Here is an example to clarify the concept of PK and FK:
Suppose we have a database with two tables: "Orders" and "Customers". The "Orders" table has a PK called "order_id", while the "Customers" table has a PK called "customer_id". To define the relationship between these two tables, we can add an FK called "customer_id" to the "Orders" table, which refers to the PK "customer_id" in the "Customers" table. This allows us to link the orders of each customer to the correct customer information.
![EERD](../assets/EERD.png)

View File

@@ -1 +1,16 @@
# ERD
# ERD
Entity Relationship Diagram (ERD)
To design a relational database, you first create an Entity Relationship Diagram. In this, you model the data that the user wants to store, without looking at the technical implementation. The following concepts play a role in an ERD:
* Entity: a type of "thing" about which the user wants to store data, for example a user, an order, or a student.
* Attribute: properties of an entity. For a user, this could be: username, email, and password.
* Relationships: connection between entities, for example the fact that one customer can place multiple orders.
* Instances: an example of an entity, for example the order with order number 239741.
* 1-to-many (1: N): one instance can belong to multiple instances of another entity. For example: a customer can place multiple orders, but an order belongs to only one customer.
* many-to-many (N: M): one instance can belong to multiple instances of another entity, but the reverse is also true. For example: an order can contain multiple products and conversely a product can appear on multiple orders.
* 1-to-1 (1:1): one instance belongs to a maximum of one instance of another entity. For example: an employee can have one lease car and a lease car is from one employee.
![ERD](../assets/ERD.png)

View File

@@ -1 +1,19 @@
# Infrastructure
# Infrastructure
The infrastructure of the database is composed of the following components:
- User
- Pepper
- Interface
- Robot
- Raspberry Pi
- Database
- MariaDB
- Server
- Apache
- phpMyAdmin
- Node.js
User interacts with Pepper through the interface. The interface sends the user input to the robot. The robot processes the input (java) and sends the output (xml) back to the interface. The interface displays the output to the user. The Raspberry Pi hosts the server and database. The database stores the data and the server hosts the website. The server runs Apache, phpMyAdmin, and Node.js. The interface makes a request to the server (HTTP GET) to retrieve the data in the database. The server processes the request (HTTP GET) and retrieves (SQL) the data from the database. The interface displays the data to the user.
![Application Architecture Diagram](../diagrams/assets/appDiagram.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 114 KiB

File diff suppressed because one or more lines are too long