home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!portal!cup.portal.com!DVaz
- From: DVaz@cup.portal.com (David D Vazquez)
- Newsgroups: comp.databases
- Subject: Re: MANY-TO-MANY mess in Paradox!!!
- Message-ID: <69972@cup.portal.com>
- Date: Sat, 21 Nov 92 13:58:09 PST
- Organization: The Portal System (TM)
- References: <Bxzoqw.6xo@ccu.umanitoba.ca>
- Lines: 58
-
- >
- >Is it just me or does every one is unhappy withg Paradox's way of handling
- >many-to-many links. I always end up with extra tables and lots of redundant
- >information. In a typical scenerio (sp?), a product can be supllied by
- >many vendors and a vendor can suplly many products. When it comes to
- >displaying either side of this info, paradox suggests extra tables and their
- >use in the "form" display/generation. It, however, doesnot suggest an
- >answer to following problem....
- >
- >say, from an input screen I am entering info about new products or new
- >suppliers. If its products, it can have a variable number of vendors and
- >if it is a vendor, there could be a variable # of products for it. How can
- >I design an input screen/form that has linked tables on it and handeles
- >multiple entries for a given field. I mean I can use Products as master
- >form and use vendors as linked embeded form. Now when ever I enter a new
- >product, I am not sure how many vendors for this product there will be.
- >Could be 0,1, or 10000!!! How can I design an input screen and then table
- >which would handle this situation????
- >
-
- Many to many relationships should always be resolved. This feat is ac-
- complished by use of an intersection table. In your example above, the
- final database could look like this after the many to many is resolved:
-
- VENDORS
- Name A10*
- Location A15
-
- PRODUCTS
- Name A20*
- Manufacturer A30
- MSRP $
-
- INVENTORY (you'll have to shrink this down to 8 chars for DOS)
- Vendor Name A10*
- Prod. Name A20*
- Quantity N
-
- INVENTORY is the intersection table.
-
- For the input screen, you could use VENDORS as the master, embed INVENTORY,
- and use PAL to popup a form that you can enter new products on. This method
- is good because it would be a waste of space to keep track of products that
- no vendor has in its inventory. When a vendor starts supplying a *new* product
- ,
- you could add it to the product list, then the product will be available when
- other vendors add it to their inventory.
-
- If you decide to make PRODUCTS the master and embed INVENTORY, you'll have to
- reverse the order of INVENTORY's key.
-
- >Thanks very much for help.
- >
- >Malik
- >ummalik@ccu.umanitoba.ca
-
- You're welcome
- -Dave. "dvaz@cup.portal.com"
-