Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7911477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:15:55+00:00 2026-06-03T13:15:55+00:00

I am working on a project which uses a table for storing all restaurant

  • 0

I am working on a project which uses a table for storing all restaurant data in same table.
There is a separate table for area containing area_id and area_name

There are six field which are source of problem to me.
They are:

delivery_area_1 , delivery_area_2, delivery_area_3
minimum_order_1, minimum_order_2 and minimum_order_3

delivery_area_1 field contain a coma(‘,’) separated list of all area_id ‘s in which the restaurant delivers at minimum order 1 and so on for delivery area 2 and 3.

When a user search by area_id and the result contains all the restaurants which deliver in that area_id and the corresponding minimum order is to be displayed in the result along with other details.

I propose to move this delivery area data to a separate mapping table which will contain:

restaurant_id, area_id and the minimum order.

But doing so will cause the number of entries in the mapping table to crosss 1000,000 for 20,000 restaurants. Currently there are 1000 restaurants but the number will increase rapidly from now on. Each restaurant delivers in about 30-80 areas.

Is this a good move? It would be a big decision. So please help me with the approach.

Is there a better way to simplify and optimize search ?

Its a PHP website.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:15:59+00:00Added an answer on June 3, 2026 at 1:15 pm

    short and simple: yes, change that (this is called database normalization).

    a million rows in a table just containing 3 colums isn’t a big deal. you could choose to add two tables instead of just one:

    minimum_order (restaurant_id, minimum_order_id, amount)
    
    delivery_area (restaurant_id, area_id, minimum_order_id)
    

    this will give you the advantage that is the amount for a group of areas changes, just the amount at minimum_order needs to be updated instead of multiple rows (one per area) at minimum_order.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a project which uses JUnit4 extensively throughout all the modules.
Working on a project which uses Jquery(1.6) Tabs, works all good but wondering if
I'm currently working on a project which uses many ajax requests to access data
I'm working on a project which uses user authentication. I'm facing a issue with
I have just begun working on a project which uses Mercurial as a version
I'm working on a project that uses pkg_crypto to protect users' personal information. There
I currently working on a project which uses Spree Cart and which has hence
I've been working on a project which uses SPNEGO to have Single Sign On
I'm working on a JVM project which uses ESRI components (COM based, wrapped with
I'm working on a maven project which uses seam 2.2.0, hibernate 3.5.0-CR-2 as JPA

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.