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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:39:19+00:00 2026-05-21T15:39:19+00:00

This is something I should really know, but I haven’t done any db work

  • 0

This is something I should really know, but I haven’t done any db work for quite a while and just wanted some clarification on a structure for a simple mysql database.

The basic premise is a shopping cart – so we have catalogue, customer and orders.For now, the customer isn’t going to sign up, they will enter details every time.

My main struggle is how to structure the customer and order table as obviously it would be good to have these separate.

Is the best method just to have the customer table with an fkey to the order table, and the order table simply references the item in the catalogue with another fkey?

Any clarification is much appreciated.

  • 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-21T15:39:20+00:00Added an answer on May 21, 2026 at 3:39 pm

    You have 4 tables at the very basic level: users, basket, items, basket_items.

    Orders would work just like basket and basket_items so let’s keep it simple for now.

    A Record in basket_items is just a basket_id and an item_id – it’s a link table used for resolving this kind of many-to-many relationship (each basket has many items, each item can be in many baskets).

    The basket or orders table, as you say, just have a foreign key to the customers table – each order is by one, and only one customer.

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

Sidebar

Related Questions

I get the feeling this is probably something I should know but I can't
I'm not sure if this is something I should do in T-SQL or not,
It seems like there should be something shorter than this: private string LoadFromFile(string path)
This is something I've pseudo-solved many times and have never quite found a solution
This is something I've always wondered, and I can't find any mention of it
Something like var life= { users : { guys : function(){ this.SOMETHING.mameAndDestroy(this.girls); }, girls
This is something that I think would be very useful. Basically, I'd like there
This is something simple I came up with for this question . I'm not
This is something that I always find a bit hard to explain to others:
This was something originally discussed during a presentation given by Charles Brian Quinn of

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.