Skip to content
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

added db description #27

Open
wants to merge 2 commits into
base: stage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Binary file modified db/normalized/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 93 additions & 1 deletion db/normalized/relations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,95 @@
## user

Таблица Пользователей и его персональные данные ( логин, почта, пароль)

Связанные таблицы: trip, review

```
user:
{id} -> {login, email, password}
{login} -> {email, password}
{email} -> {login, password}

```


## trip
Таблица поездок и их данные( название, описание, город, дата начала и конца и тд)

Связанные таблицы: trips_place

```
trip:
{id}-> {name, description, city, start_date, end_date, private, user}

```


## city
Tаблица городов с текстовым названием города

Связанные таблицы: trip, place

```
city:
{id}->{name}

```


## place
Таблица достопримечательностей и их данные (название, описание, рейтинг, количество отзывов, город, адрес)

```
place:
{id}->{name, description, rating, numberOfReviews, address, city, phonenumber}
{name, city_id}->{name, description, rating, numberOfReviews, address, phonenumber}

```


## trips_place
Таблица-связка между достопримечательностями (place) и поездками (trip)

```
trips_place:
{id}->{trip_id, place_id}

```


## category
Таблица категорий с текстовым названием категории
Связанные таблицы: places_category

```
category:
{id}->{ name}

```


## places_category
Таблица-связка между категориями (category) и жостопримечательностями (places)

```
places_category:
{id}->{place_id, category_id}

```


## review
Таблица отзывов

```
review:
{id}->{user, place, rating, reviewText}
AnnHarvard marked this conversation as resolved.
Show resolved Hide resolved

```



### Cсылка на ER-диаграммы:
https://www.plantuml.com/plantuml/uml/ZLDXQy8m4FtUNz7FW_u34KMwKJQcj6vZdqBMt6gWJIMvwaJzxoj7ChhRMlI3v5xwxbxUInOEfSMkgICmgF4KlnHf7f-ZkF_TnLhH8abyNRULDdwzbyuTMwjyMLgG24f8ZAvHQBRAjk-ZpOniO8gyULgkqblOkf4LR2JkVAt0bLRlKRT1gvMeJHMONVC1TlsPmq73qNbKAcN1XQhi1MGgditk7-VpSE1TQ-2Po0ELUVgQfM-ZCZi7LcZUgPObC9I9j2HE87pXfC7BRVgmpgTDvfuMWj4OQKHVAH6grfu66zVuf_CsppQJAiR28Q__3ADhAPJ4m0EZXkNUwWDLp9l_RR_-abc8wQk5lRwRCkEXqDkvN9BaSlRt8g8Nu26Q6j4_-oha4M0Ma-UCR0wcql7yp050sGo0GZ0fV6C1HdLD_Gq0
https://www.plantuml.com/plantuml/uml/ZLF1QiCm3BtdAt8Uv0zAQIdP21jhIRgDdOmMQwaXSOgjj2jj_tsTiKUgTI4v14lsavxVasUMm53Nr15gKdI8NueqZuzHVFdkOYNz0XjGjL_NRQMqNs_1sdrhmh7I811A0HITer1naQtVUSKayR661eV0gwVv8Xs3LWrKk0BQ-5YYBOtQace3LmEaT1MGNVE1PlcPuqxXtleiI6dGXgYy4CXaF9dSFqwduSARLkEp0_TOvkbhbhxzIxEpQ8JYbMeeaMKPIUF82S8l6XHulauVblcmo5pJGZ0O1ztcLm9XrPf3R-CS_rPUvzbgX5dCdA3rdsPkDeK42ZZKiXzkZTgvY6jpK_Rp5Sr238yMNVYDyeoRuXxGwPGafwEVYyYz09zoNIFtPwU27o7DRBh2yCr-LtUzNa-V-Fdr4uLWLFZ63BNicleR
![Alt text](image.png)
Loading