Browse Source

Add more example entries, Complete queries

master
Apostolos Fanakis 6 years ago
parent
commit
733fcb7464
  1. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_diet.sql
  2. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_diet_prohibits_ingredient.sql
  3. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_drink.sql
  4. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_drink_has_ingredient.sql
  5. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_food.sql
  6. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_food_has_ingredient.sql
  7. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_ingredient.sql
  8. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_permission.sql
  9. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_restaurant.sql
  10. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_role.sql
  11. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_role_has_permission.sql
  12. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_user.sql
  13. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_user_follows_diet.sql
  14. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_user_prohibits_ingredient.sql
  15. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_user_rates_drink.sql
  16. 2
      Database implementation/dumps/Project Folder/flavours_without_borders_user_rates_food.sql
  17. 4
      Database implementation/dumps/Project Folder/flavours_without_borders_user_rates_restaurant.sql
  18. 4
      Database implementation/dumps/Self Contained/dump.sql
  19. 6
      Database implementation/queries/query_10.sql

2
Database implementation/dumps/Project Folder/flavours_without_borders_diet.sql

@ -53,4 +53,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:51
-- Dump completed on 2018-12-21 13:49:51

2
Database implementation/dumps/Project Folder/flavours_without_borders_diet_prohibits_ingredient.sql

@ -53,4 +53,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:55
-- Dump completed on 2018-12-21 13:49:55

2
Database implementation/dumps/Project Folder/flavours_without_borders_drink.sql

@ -57,4 +57,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:50
-- Dump completed on 2018-12-21 13:49:50

2
Database implementation/dumps/Project Folder/flavours_without_borders_drink_has_ingredient.sql

@ -53,4 +53,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:48
-- Dump completed on 2018-12-21 13:49:48

2
Database implementation/dumps/Project Folder/flavours_without_borders_food.sql

@ -57,4 +57,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:49
-- Dump completed on 2018-12-21 13:49:50

2
Database implementation/dumps/Project Folder/flavours_without_borders_food_has_ingredient.sql

@ -53,4 +53,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:34:01
-- Dump completed on 2018-12-21 13:50:01

2
Database implementation/dumps/Project Folder/flavours_without_borders_ingredient.sql

@ -51,4 +51,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:34:02
-- Dump completed on 2018-12-21 13:50:02

2
Database implementation/dumps/Project Folder/flavours_without_borders_permission.sql

@ -51,4 +51,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:49
-- Dump completed on 2018-12-21 13:49:49

2
Database implementation/dumps/Project Folder/flavours_without_borders_restaurant.sql

@ -60,4 +60,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:56
-- Dump completed on 2018-12-21 13:49:56

2
Database implementation/dumps/Project Folder/flavours_without_borders_role.sql

@ -52,4 +52,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:34:00
-- Dump completed on 2018-12-21 13:50:00

2
Database implementation/dumps/Project Folder/flavours_without_borders_role_has_permission.sql

@ -53,4 +53,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:34:00
-- Dump completed on 2018-12-21 13:50:00

2
Database implementation/dumps/Project Folder/flavours_without_borders_user.sql

@ -58,4 +58,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:53
-- Dump completed on 2018-12-21 13:49:53

2
Database implementation/dumps/Project Folder/flavours_without_borders_user_follows_diet.sql

@ -53,4 +53,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:58
-- Dump completed on 2018-12-21 13:49:58

2
Database implementation/dumps/Project Folder/flavours_without_borders_user_prohibits_ingredient.sql

@ -53,4 +53,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:59
-- Dump completed on 2018-12-21 13:49:59

2
Database implementation/dumps/Project Folder/flavours_without_borders_user_rates_drink.sql

@ -57,4 +57,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:54
-- Dump completed on 2018-12-21 13:49:54

2
Database implementation/dumps/Project Folder/flavours_without_borders_user_rates_food.sql

@ -57,4 +57,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:52
-- Dump completed on 2018-12-21 13:49:52

4
Database implementation/dumps/Project Folder/flavours_without_borders_user_rates_restaurant.sql

@ -47,7 +47,7 @@ CREATE TABLE `user_rates_restaurant` (
LOCK TABLES `user_rates_restaurant` WRITE;
/*!40000 ALTER TABLE `user_rates_restaurant` DISABLE KEYS */;
INSERT INTO `user_rates_restaurant` VALUES (215,4330,18,5,'2018-10-02','Χορταστικό φαΐ!','hard'),(215,6211,NULL,4,'2018-04-04','','hard'),(356,4330,NULL,4,'2018-09-16',NULL,NULL),(24788,1356,NULL,5,'2018-06-08','Φιλικότατο προσωπικό!','moderate'),(24788,4330,2,3,'2018-01-04','Λίγες επιλογές για διαβητικούς.',NULL);
INSERT INTO `user_rates_restaurant` VALUES (7,15,2,2,'2017-06-01','Χάλι μαύρο',NULL),(7,7365,NULL,3,'2018-02-21','Μέτριο.',NULL),(9,15,NULL,3,'2016-05-08','Δεν χόρτασα','easy'),(215,4330,18,5,'2018-10-02','Χορταστικό φαΐ!','hard'),(215,6211,NULL,4,'2018-04-04','','hard'),(356,4330,NULL,4,'2018-09-16',NULL,NULL),(666,7365,NULL,3,'2018-04-16',NULL,'easy'),(8756,15,18,2,'2017-09-11',NULL,'moderate'),(24788,1356,NULL,5,'2018-06-08','Φιλικότατο προσωπικό!','moderate'),(24788,4330,2,3,'2018-01-04','Λίγες επιλογές για διαβητικούς.',NULL);
/*!40000 ALTER TABLE `user_rates_restaurant` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -60,4 +60,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:33:57
-- Dump completed on 2018-12-21 13:49:57

4
Database implementation/dumps/Self Contained/dump.sql

@ -502,7 +502,7 @@ CREATE TABLE `user_rates_restaurant` (
LOCK TABLES `user_rates_restaurant` WRITE;
/*!40000 ALTER TABLE `user_rates_restaurant` DISABLE KEYS */;
INSERT INTO `user_rates_restaurant` VALUES (215,4330,18,5,'2018-10-02','Χορταστικό φαΐ!','hard'),(215,6211,NULL,4,'2018-04-04','','hard'),(356,4330,NULL,4,'2018-09-16',NULL,NULL),(24788,1356,NULL,5,'2018-06-08','Φιλικότατο προσωπικό!','moderate'),(24788,4330,2,3,'2018-01-04','Λίγες επιλογές για διαβητικούς.',NULL);
INSERT INTO `user_rates_restaurant` VALUES (7,15,2,2,'2017-06-01','Χάλι μαύρο',NULL),(7,7365,NULL,3,'2018-02-21','Μέτριο.',NULL),(9,15,NULL,3,'2016-05-08','Δεν χόρτασα','easy'),(215,4330,18,5,'2018-10-02','Χορταστικό φαΐ!','hard'),(215,6211,NULL,4,'2018-04-04','','hard'),(356,4330,NULL,4,'2018-09-16',NULL,NULL),(666,7365,NULL,3,'2018-04-16',NULL,'easy'),(8756,15,18,2,'2017-09-11',NULL,'moderate'),(24788,1356,NULL,5,'2018-06-08','Φιλικότατο προσωπικό!','moderate'),(24788,4330,2,3,'2018-01-04','Λίγες επιλογές για διαβητικούς.',NULL);
/*!40000 ALTER TABLE `user_rates_restaurant` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -515,4 +515,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-12-21 13:32:09
-- Dump completed on 2018-12-21 13:51:00

6
Database implementation/queries/query_10.sql

@ -0,0 +1,6 @@
SELECT restaurant.restaurant_id, AVG(user_rates_restaurant.rating_grade) AS 'Average rating'
FROM flavours_without_borders.restaurant
JOIN flavours_without_borders.user_rates_restaurant
ON restaurant.restaurant_id = user_rates_restaurant.restaurant_id
WHERE restaurant_name = "McDonald's"
GROUP BY restaurant_id
Loading…
Cancel
Save