You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

189 lines
4.3 KiB

\section{Σχέσεις}
\subsection{Restaurant}
\rEntTable{restaurant}
{restaurant\_id & ΑΚΕΡΑΙΟΣ \\
restaurant\_name & ΟΝΟΜΑ \\
restaurant\_category & ΕΙΔΟΣ\_ΚΑΤΑΣΤΗΜΑΤΟΣ \\
restaurant\_longitude & ΣΥΝΤΕΤΑΓΜΕΝΕΣ \\
restaurant\_latitude & ΣΥΝΤΕΤΑΓΜΕΝΕΣ \\
restaurant\_opening & ΩΡΑ \\
restaurant\_closing & ΩΡΑ \\
%restaurant\_rating & ΜΕΣΗ\_ΒΑΘΜΟΛΟΓΙΑ \\
%restaurant\_reviews\_number & ΑΚΕΡΑΙΟΣ \\
restaurant\_is\_approved & ΤΟΥ\_ΜΠΟΥΛ}
{restaurant\_id}
{1}
{user\_id → user}
{restaurant}
\subsection{Food}
\rEntTable{food}
{food\_id & ΑΚΕΡΑΙΟΣ\\
food\_name & ΟΝΟΜΑ\\
food\_description & ΠΕΡΙΓΡΑΦΗ\\
food\_calories & ΑΚΕΡΑΙΟΣ \\
%food\_rating & ΑΞΙΟΛΟΓΗΣΗ\\
%food\_reviews\_number & ΑΚΕΡΑΙΟΣ \\
%food\_portion\_size & ΜΕΓΕΘΟΣ ΜΕΡΙΔΑΣ \\
food\_is\_approved & ΤΟΥ\_ΜΠΟΥΛ}
{food\_id}
{1}
{restaurant\_id → restaurant}
{food}
\subsection{Drink}
\rEntTable{drink}
{drink\_id & ΑΚΕΡΑΙΟΣ \\
drink\_name & ΟΝΟΜΑ \\
drink\_description & ΠΕΡΙΓΡΑΦΗ \\
%drink\_rating & ΑΞΙΟΛΟΓΗΣΗ \\
%drink\_reviews\_number & ΑΚΕΡΑΙΟΣ \\
%drink\_portion\_size & ΜΕΓΕΘΟΣ ΜΕΡΙΔΑΣ \\
drink\_is\_approved & ΤΟΥ\_ΜΠΟΥΛ}
{drink\_id}
{1}
{restaurant\_id → restaurant}
{drink}
\subsection{Ingredient}
\rEntTable{ingredient}
{ingredient\_name & ΟΝΟΜΑ \\
ingredient\_has\_alcohol & ΤΟΥ\_ΜΠΟΥΛ}
{ingredient\_name}
{1}
{-}
{ingredient}
\subsection{User}
\rEntTable{user}
{user\_id & ΑΚΕΡΑΙΟΣ \\
user\_email & EMAIL \\
user\_username & ΟΝΟΜΑ \\
%user\_number\_of\_reviews & ΑΚΕΡΑΙΟΣ \\
user\_hashed\_password & HASHED\_PASSWORD\\
user\_salt & SALT}
{user\_id}
{1}
{role\_id → role}
{user}
\subsection{Diet}
\rEntTable{diet}
{diet\_id & ΑΚΕΡΑΙΟΣ \\
diet\_name & ΟΝΟΜΑ \\
diet\_description & ΠΕΡΙΓΡΑΦΗ \\
diet\_is\_approved & ΤΟΥ\_ΜΠΟΥΛ}
{diet\_id}
{1}
{-}
{diet}
\subsection{Role}
\rEntTable{role}
{role\_id & ΑΚΕΡΑΙΟΣ \\
role\_name & ΟΝΟΜΑ \\
role\_description & ΠΕΡΙΓΡΑΦΗ}
{role\_id}
{1}
{-}
{role}
\subsection{Permission}
\rEntTable{permission}
{permission\_id & ΑΚΕΡΑΙΟΣ \\
permission\_description & ΠΕΡΙΓΡΑΦΗ}
{permission\_id}
{1}
{-}
{permission}
\subsection{Food has Ingredient}
\rEntTable{food\_has\_ingredient}
{- & -}
{food\_id \& ingredient\_name}
{2}
{food\_id → food \\
& ingredient\_name → ingredient}
{foodHasIngredient}
\subsection{Drink has Ingredient}
\rEntTable{drink\_has\_ingredient}
{- & -}
{drink\_id \& ingredient\_name}
{2}
{drink\_id → drink \\
& ingredient\_name → ingredient}
{drinkHasIngredient}
\subsection{User prohibits Ingredient}
\rEntTable{user\_prohibits\_ingredient}
{- & -}
{user\_id \& ingredient\_name}
{2}
{user\_id → user \\
& ingredient\_name → ingredient}
{userProhibitsIngredient}
\subsection{User follows Diet}
\rEntTable{user\_follows\_diet}
{- & -}
{user\_id \& diet\_id}
{2}
{user\_id → user \\
& diet\_id → diet}
{userFollowsDiet}
\subsection{User rates Food}
\rEntTable{user\_rates\_food}
{rating\_grade & ΑΞΙΟΛΟΓΗΣΗ \\
rating\_date & ΗΜΕΡΟΜΗΝΙΑ \\
rating\_text & ΠΕΡΙΓΡΑΦΗ \\
rating\_portion\_size & ΜΕΓΕΘΟΣ ΜΕΡΙΔΑΣ}
{user\_id \& food\_id}
{2}
{user\_id → user \\
& food\_id → food}
{userRatesFood}
\subsection{User rates Drink}
\rEntTable{user\_rates\_drink}
{rating\_grade & ΑΞΙΟΛΟΓΗΣΗ\\
rating\_date & ΗΜΕΡΟΜΗΝΙΑ\\
rating\_text & ΠΕΡΙΓΡΑΦΗ \\
rating\_portion\_size & ΜΕΓΕΘΟΣ ΜΕΡΙΔΑΣ}
{user\_id \& drink\_id}
{2}
{user\_id → user \\
& drink\_id → drink}
{userRatesDrink}
\subsection{User rates Restaurant}
\rEntTable{user\_rates\_restaurant}
{rating\_grade & ΑΞΙΟΛΟΓΗΣΗ \\
rating\_text & ΗΜΕΡΟΜΗΝΙΑ \\
rating\_date & ΠΕΡΙΓΡΑΦΗ}
{user\_id \& restaurant\_id}
{3}
{user\_id → user \\
& restaurant\_id → restaurant\\
& diet\_id → diet}
{userRatesRestaurant}
\subsection{Diet prohibits Ingredient}
\rEntTable{diet\_prohibits\_ingredient}
{- & -}
{diet\_id \& ingredient\_name}
{2}
{diet\_id → diet \\
& ingredient\_name → ingredient}
{dietProhibitsIngredient}
\subsection{Role has Permission}
\rEntTable{role\_has\_permission}
{- & -}
{role\_id \& permission\_id}
{2}
{role\_id → role \\
& permission\_id → permission}
{roleHasPermission}