Non relational database A company called TastyArrivals has asked you to design a data...
50.1K
Verified Solution
Question
Finance
Non relational database
A company called TastyArrivals has asked you to design a data store. Tasty Arrivals is an online portal for delivery of food to customers. They want to store information about Customers (ordering food) and about restaurants. The customers usual information is stored (i.e., name, address, contact details, etc) together with their preferences for different cuisines (English, Chinese, Indian, Middle eastern etc.). The restaurants information to be stored is about the name of the restaurant, address, areas in which they deliver food, contact details, type of cuisine they offer and menu details (food items with IDs, name, prices, other details such as vegetarian, gluten free, hot etc.). Customers order their food by usually searching the restaurants delivering the food in their locality and based on their preference about certain cuisine. The order information needs customer information such as their name, address and contact details together with the food items they have ordered from a certain restaurant. 1. Using given information design the documents using JSON notation, mainly for holding customers information and restaurant information. 2. Provide us details about your decision whether the customers and restaurants information are going in two different collections or same collection. Also, state whether you are opting for Normalized or denormalized structures, justifying your design choice. 3. Create a database called Tasty Arrivals and create your collection(s) that can hold documents containing customer and restaurant information. 4. Decide what fields should be used for creating index and create at least two indices on appropriate fields. (Hint: go through the description above to see what are the search criteria to index your fields) 5. Apply following find queries: a. Finds all documents b. Finds documents that satisfy any one search condition (restaurant based on locality only). C. Finds documents that satisfy more than one search conditions using and operator (restaurant based on locality and preferred cuisine). 6. Apply a sort query in descending order on customer names. 7. Update price field of any one food item. 8. Drop the index on any one of the fields that you have created in Question 3. A company called TastyArrivals has asked you to design a data store. Tasty Arrivals is an online portal for delivery of food to customers. They want to store information about Customers (ordering food) and about restaurants. The customers usual information is stored (i.e., name, address, contact details, etc) together with their preferences for different cuisines (English, Chinese, Indian, Middle eastern etc.). The restaurants information to be stored is about the name of the restaurant, address, areas in which they deliver food, contact details, type of cuisine they offer and menu details (food items with IDs, name, prices, other details such as vegetarian, gluten free, hot etc.). Customers order their food by usually searching the restaurants delivering the food in their locality and based on their preference about certain cuisine. The order information needs customer information such as their name, address and contact details together with the food items they have ordered from a certain restaurant. 1. Using given information design the documents using JSON notation, mainly for holding customers information and restaurant information. 2. Provide us details about your decision whether the customers and restaurants information are going in two different collections or same collection. Also, state whether you are opting for Normalized or denormalized structures, justifying your design choice. 3. Create a database called Tasty Arrivals and create your collection(s) that can hold documents containing customer and restaurant information. 4. Decide what fields should be used for creating index and create at least two indices on appropriate fields. (Hint: go through the description above to see what are the search criteria to index your fields) 5. Apply following find queries: a. Finds all documents b. Finds documents that satisfy any one search condition (restaurant based on locality only). C. Finds documents that satisfy more than one search conditions using and operator (restaurant based on locality and preferred cuisine). 6. Apply a sort query in descending order on customer names. 7. Update price field of any one food item. 8. Drop the index on any one of the fields that you have created in Question 3Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
- Unlimited Question Access with detailed Answers
- Zin AI - 3 Million Words
- 10 Dall-E 3 Images
- 20 Plot Generations
- Conversation with Dialogue Memory
- No Ads, Ever!
- Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Other questions asked by students
StudyZin's Question Purchase
1 Answer
$0.99
(Save $1 )
One time Pay
- No Ads
- Answer to 1 Question
- Get free Zin AI - 50 Thousand Words per Month
Best
Unlimited
$4.99*
(Save $5 )
Billed Monthly
- No Ads
- Answers to Unlimited Questions
- Get free Zin AI - 3 Million Words per Month
*First month only
Free
$0
- Get this answer for free!
- Sign up now to unlock the answer instantly
You can see the logs in the Dashboard.