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 3319732
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:51:34+00:00 2026-05-17T22:51:34+00:00

Stores Table : a table to store information about different stores StoreId Name PlaceCode

  • 0

Stores Table : a table to store information about different stores

StoreId     Name       PlaceCode  
--------    --------   --------     
1           Addidas     AB1         
2           Nike        KS3         
3           Puma        LS6         
4           Nike        AS2         
5           Nike        WR4

Areas Table

AreaId   Area
------   -------
1        DownTown
2        UpTwon

StoresArea Table :
Edit

StoreId   AreaId
-------   -------
1         1
2         2
3         2
4         1
5         2

Nike for example has more than a branch for it’s store
so my idea was to have more than a record with name attribute “nike” but the other attributes will contain the information about the branch.

I used the StoresArea Table to create a many-to-many relationship but I think it can be achieved with a one-to-many relation…and it’s confusing, so I was hoping for a good advice so it could help me follow a good practice!

I created a class named store, to hold the information about each store..but i want to add an additional variable and I think it will be an array, this variable will hold information about all the branches of a given store.

I think this information will be:
1 – the branch’s PlaceCode
2 – Id so I could provide a url using querystring to access all the other branches ?StoreId=Id
3 – the branch’s area
to go straight to the point, i want the detailed page of any given store to have a field called branches, which will display the Branch’s Area + the PlaceCode of all the other available branches. E.g “Branches : Downtown: AS2” and the Downtown word will be clickable to link to the branch!

I know It’s not clear enough! but I hope you’ll get it
sure, you can ask about any further details or questions make the picture more clear!

  • 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-05-17T22:51:34+00:00Added an answer on May 17, 2026 at 10:51 pm

    Kashef,

    Every store is only in a single region, correct? If so, create a store table with a foreign key relationship to the region table (i.e., RegionID in the store table).

    If different stores are part of the same brand/company, create a company table and set up a foriegn key to the store table.

    The setup would look like

    Region Table —> Stores <—- Company

    Is that the situation you have? If so, let me know and I’ll talk about the classes.

    Erick

    Edited based on comments

    In that case, what you really need a many-to-many relationship between Regions and Stores, with a distinct primary key (i.e., not RegionID + StoreID).

    Region Table —> RegionTable <— Stores <—- Company

    This will allow you to have multiple stores in a single region. However, it also allows multiple regions for a single store! You might be able to work around this with a constraint that ensures that each store only has a single region.

    Does this make sense?

    Erick

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

Sidebar

Related Questions

First of all, let's define a few tables: Users table will store information about
I have a database table called Posts which stores all the information regarding an
I need to create a database table to store different changelog/auditing (when something was
I have a basic property bag table that stores attributes about my primary table
I have a table that stores all the volunteers, and each volunteer will be
I need a table to store the state of a financial transaction. The state
I'm trying to define a table to store student grades for a online report
How can I store a hash table with separate chaining in a file on
I have a table (venues) that stores all the possible venues a volunteer can
I need to store phone numbers in a table. Please suggest which datatype should

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.