Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook



The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic

Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.

If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.

Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.

Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

How many Tables are needed

  • Filter
  • Time
  • Show
Clear All
new posts

  • How many Tables are needed

    I am getting confused trying to create tables for a database tracking :

    1) vendors

    3) Products

    4) product specifications

    There are multiple vendors , no one vendor makes all of the products. My fear is having too many tables or putting too much information in a table.

    so far I have:

    1) tblProdCategory ( product category)
    2) thlProdUPC ( Product UPC, ProdName, Prodsize, Description)
    3) tblProdSpec ( ProdUPC, ShelfLife, SellUnit, casesPerPallet, KgPer Case)
    4) tblVendors ( VendorName, VendorAddress, VendorCity, Vendor Postal)

    Not sure where to d\show products supplied by a given vendor

  • #2
    Re: How many Tables are needed

    Originally posted by clemkonan View Post
    Not sure where to d\show products supplied by a given vendor
    tblVendors [1:M] thlProdUPC - assuming that products are unique to vendor.

    If not:

    tblVendors [1:M] LinkingTable(vendor_id, product_id) [1:1] thlProdUPC
    AlphaBase Solutions, LLC


    • #3
      Re: How many Tables are needed

      I would take a step back (or half a step). Before continuing with your table design get a better understanding of your data. Put the various bits of data into boxes or entities. Ask your self all kinds of questions about these entities and write them down, including the answers. You will end up going through this process a number of times revising your questions and answers as you go. Often answers to one question will lead to more questions. When you think you have your answers then the tables and their structures will be more clear.

      For example one of your entities is Vendor. What do they do(specifically in relation to the data you want to track).
      An answer may be something like: A vendor supplies a product to my company. Another question: How many products can a vendor supply; one, many? Is it possible to have a vendor in the database that has not yet supplied any products?

      The answers to these questions have obviously given rise to another entity called product. And also the relationship between Vendor and Product. Another question on the this relationship is; can a product be supplied by more than one vendor.

      If it turns out that a vendor can supply many products and a product can be supplied by many vendors you have a many to many relationship. Here is where your table design will start to look different from your entities. Alpha, along with most if not all database products, can not represent such a relationship directly so a join table is employed. This join table would be the link between Vendor and Product and would at the very least contain the primary key from each table.

      Looking at some of the fields you suggest for the products, specifically the specification data. I would be asking what this data is really referring to and what is it dependent on. Are there going to be multiple specifications for each product? Like, is there a possibility that a product will have more than one shelf life. Is it dependent on the product? If so then it probably only has one value and could go directly in the product table. CasesperPallet and KgperCase can often be dependent on the Vendor's shipping and production systems making these values dependent on both the Product and Vendor so these values might need to go in the Vendor/Product join table.

      Without knowing more specifically the business rules of your data it is difficult to suggest specific table structures. But then once you start asking these kinds of questions of your data I am sure it will start to become more clear to you as well.

      Hopefully I did not confuse the issue more.

      EDIT: I see Peter uses a few less words than I do. :)
      Last edited by Tim Kiebert; 02-12-2009, 12:52 AM.
      Tim Kiebert
      Eagle Creek Citrus
      A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.


      • #4
        Re: How many Tables are needed

        Great advise I will go through the exercise. In short:

        1) A vendor can supply multiple products
        2) It would be advantageous to include a vendor ( prospective vendor) who is currently not shipping any products.
        3) A product as defined by its UPC number shares some unique features but if its the same product class ( oops got me!) the specification would be 99% identical for example 2% milk in 200ml, 500ml ,1 L is still 2% milk.
        4) The oops acknowledges your caution I was thinking product class = milk but I also have chocolate milk! a totally different animal different specification

        2 quick questions whats a joint table is this two separate tables forming a set? and when do I assign a primary key? I can save a table and Alpha five does not ask for one.



        • #5
          Re: How many Tables are needed

          Originally posted by clemkonan View Post
          2 quick questions whats a joint table is this two separate tables forming a set? and when do I assign a primary key? I can save a table and Alpha five does not ask for one.
          You have to create the primary key yourself. My rule of thumb is to name it after the table - e.g. Vendor_Id, Product_Id, Spec_Id.

          Make sure to keep field & index names to 10-characters or less.

          Two or more joined tables is a "set" in Alpha.

          Note to Tim: In a previous life I was a loudmouth; I would never shut up. Now I try to practice KISS (Keep it Short & Simple).
          AlphaBase Solutions, LLC


          • #6
            Re: How many Tables are needed

            KISS (Keep it Short & Simple).
            And here I had always thought this was universally an acronym for Keep it Simple Stupid!! Maybe it is and Peter is just euphemistically being nice? :p
            It is only when we forget all our learning that we begin to know.
            It's not what you look at that matters, it's what you see.
            Henry David Thoreau


            • #7
              Re: How many Tables are needed

              Originally posted by MikeC View Post
              And here I had always thought this was universally an acronym for Keep it Simple Stupid!! Maybe it is and Peter is just euphemistically being nice?
              Neither you nor Tim are stupid. But I used to be a motor mouth. These days my wife gets mad at me for not conversing.
              AlphaBase Solutions, LLC