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

  • SEARCH
  • Home
  • 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 6873473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:04:23+00:00 2026-05-27T04:04:23+00:00

I am trying to understand database normalization, in particular 3NF. I am building a

  • 0

I am trying to understand database normalization, in particular 3NF.

I am building a shop database and in trying to normalize to 3NF have come up with the structure below.

The structure below assumes

  • There may be multiple categories per product
  • There is only ever one storage_location & manufacturer per product
  • There may be unlimited extra_fields

Can anybody tell me if I am on the right track, is the below structure in 3NF, or close?

Products
----------------
pid (pk)
title
desc
price
weight_base
weight_additional
note
quantity
manufacturer_id (fk)
storage_location_id (fk)

Categories
-----------------
category_id (pk)
category_name
parent_id
description

Product_categories
-----------------
pid (pk)
category_id (pk)

Manufacturers
-------------------
manufacturer_id (pk)
name
description

Storage_locations
---------------------

storage_location_id (pk)
storage_ref
storage_note

Product_extra_field_values
-----------------------------------

PID (pk)
extra_id (fk)
value

Product_extra_fields
--------------------------------

extra_id (pk)
label

Two main things I am unsure about:

  1. Is it correct to use a composite key for Product_categories to accommodate for multiple identical PIDs in the table?

  2. Is it correct to simply add a foreign key to the primary Products table for manufacturer and storage_location because they will only occur once per product record? Or should specific manufacturer and storage_location id be removed from primary Products table and new tables be created like this:

    Product_storage_locations
    ----------------------------------
    PID (pk)
    storage_location_id (pk) 
    
  • 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-27T04:04:23+00:00Added an answer on May 27, 2026 at 4:04 am

    Yes, what you have looks correct to me. What you’ve done with putting product storage location and manufacturer in the Products table is absolutely correct. If you put it in a separate table (down the bottom), you’ll just be creating more work for yourself with all the joins you’ll have to do later.

    The only reason you would split that out into a new Product_storage_locations table is if a product could be in multiple locations (which, according to what you’ve said, is not the case). However, in the case of products and categories, that is what you want to do – and that’s what you’ve done with the Product_categories table; and is absolutely the right thing to do.

    The only thing I’m not sure about in your design is how you’ve done extra fields. Without more information about your intent, it’s hard to say whether what you’ve done is right or not. It looks to me, though, that what you have is a particular type of field which may apply to many products; but whereby each of those products may have a different value for that field. If that is your intent, then that design looks fine.

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

Sidebar

Related Questions

I don't know much about database optimization, but I'm trying to understand this case.
I'm trying to decide on the best strategy for accessing the database. I understand
Just trying to understand that - I have never used it before. How is
I’m new to object oriented database designs and I’m trying to understand how I
im trying to understand the process of creating tables in ruby-on-rails 3. i have
I am trying to understand the ACID property of database transction: how they are
I'm trying to understand the reasoning behind why Spring Roo places database.properties in META-INF/spring,
I am trying to understand a potential performance issue with our database (SQL 2008)
Trying to understand databases better in general, and sqlite3 in particular: Are views in
I'm trying to understand the performance of database indexes in terms of Big-O notation.

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.