~~ DATABASE INFO! ~~
Database details
~~ TABLE INFO! ~~
Customer table info
Bikes table info
Rentals table info
~~ TABLE DATA! ~~
Customers Data
Bikes Data
Rental Data
~~ WORKING! ~~
BIke_Rental.mp4
Here is a simple flow chart:
graph TD;
START-->RENT;
START-->RETURN;
START-->EXIT;
RENT-->AVAILABLE_BIKES;
AVAILABLE_BIKES-->PHONE_NUMBER
PHONE_NUMBER-->FOUND;
FOUND-->START;
PHONE_NUMBER-->NOT_FOUND;
NOT_FOUND-->CREATE_NEW_ID;
CREATE_NEW_ID-->START;
RETURN-->PHONE-NUMBER;
PHONE-NUMBER-->RETURN_RENTAL_ID;
RETURN_RENTAL_ID-->START;
Here is a ER Diagram:
erDiagram
BIKES ||--o| RENTALS: available_bikes
BIKES {
int bike_id PK
VARCHAR(50) type
int size
boolean available
}
CUSTOMERS ||--o| RENTALS: to_customer
CUSTOMERS {
int cumstomer_id PK
VARCHAR(15) phone
VARCHAR(40) name
}
RENTALS{
int customer_id PK,FK
int bike_id PK,FK
date date_rented
date date_returned
}
BIKE_RENTAL_SHOP only one to zero or more BIKES: rents