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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:37:26+00:00 2026-06-11T04:37:26+00:00

I am developing stock inventory for Bicycles. I stored Cycles cid,title, desc etc ,

  • 0

I am developing stock inventory for Bicycles.
I stored Cycles cid,title, desc etc, in CYCLE table, and another STOCK(sid,cid,qty) for storing stock.
Now i cam to know that Bicycles can have many colors(Black, Red, Orange etc.) AND sizes.
I am confused about storing Stock with respect to Size and Color.

I Modified the STOCK Table

STOCK(sid,cid,qty,color,size).

e.g.

 1,101,12,1,null for Red Color 
 1,101,12,2,null for Green Color

…… (6 records for same cycle with respect to color as there can be 6 colors)
PLUS
Size medium,Large,Small (3 records for same cycle with respect to size)
1,101,12,null,medium – for Medium size
1,101,12,null,Small – for Small size
1,101,12,null,Large – for Large size

Total 9 records for 1 Cycle product.

I have another design in mind for stock
STOCK(sid,cid,qty,red,green,blue,orange,cyan,yellow,medium,Large,Small)
and 1 single record in stock.
1,101,0,0,1,3,5,6,3,0,7

My question is,
Is this right way to maintain a stock, or i can improve.
If you can help to fine tune, i will greatly appreciate.

  • 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-11T04:37:28+00:00Added an answer on June 11, 2026 at 4:37 am

    Your design should be like this:

    Cycle table: only ‘properties’ of the cycle
    CID, COLOR, SIZE, PRICE etc

    You’ll set your size to “SMALL”, “MEDIUM” etc
    You’ll set your color to “RED”, “GREEN” etc

    Stock table: only maintain the quantity & related details
    ID, CID, QTY, DATE_OF_ARRIVAL_OF_SHIPMENT etc

    So now, each row in the Cycle table identifies a ‘type’ of cycle, and each row in the stock table identifies some cycles in stock.

    This is good because now, if you have to add another color / size, you only need to create another row in your table, not modify your structure. Also, now you can write simple queries for all your characteristics (e.g. how many cycles of red color across all sizes are in stock?)

    Hope this helps!

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

Sidebar

Related Questions

We are developing an inventory tracking system. Basically we've got an order table in
I'm developing an application that shows stock market information. In my application I use
Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and
I am developing a stock/e-commerce web application. We have been using a version of
I am developing an app that need to display information on the stock of
I have been put in charge of developing an inventory snapshot report that is
We're developing a system to track inventory at our field offices. At its core,
We are developing one anayltical tool of stock moddeling in .Net. The primary objective
I am developing an application that relies on stock market information. For the moment,
I am developing a stock ordering system in PHP/MySQL. Products can have multiple suppliers.

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.