Re: How Set Up This Table

2010-01-04 Thread Victor Subervi
On Mon, Jan 4, 2010 at 10:40 AM, Arthur Fuller wrote: > The ProductPackages table is what is known as an associate table, and is > used to implement a many-to-many relationship. You only need it if a given > product can be in multiple packages. If not, then you can eliminate the > associative tabl

Re: How Set Up This Table

2010-01-04 Thread Arthur Fuller
The ProductPackages table is what is known as an associate table, and is used to implement a many-to-many relationship. You only need it if a given product can be in multiple packages. If not, then you can eliminate the associative table and just add a PackageID column to the Products table. There

Re: How Set Up This Table

2010-01-02 Thread Victor Subervi
On Sat, Jan 2, 2010 at 11:20 AM, Arthur Fuller wrote: > Hi Victor. > > I think that the first thing you need to consider is whether a product can > be in more than one package, and second is whether a package can be in > another package. Also, I don't know why you need to auto-generate in either >

Re: How Set Up This Table

2010-01-02 Thread Victor Subervi
On Sat, Jan 2, 2010 at 12:03 PM, prabhat kumar wrote: > primary key Oh! PK is primary key! > a compound key is a key that consists of 2 or more attributes that uniquely > identify an entity occurrence. Thanks. V

Re: How Set Up This Table

2010-01-02 Thread prabhat kumar
primary key is a candidate key to uniquely identify each row in a table. A unique key or primary key comprises a single column or set of columns. No two distinct rows in a table can have the same value (or combination of values) in those columns. Depending on its design, a table may have arbitraril

Re: How Set Up This Table

2010-01-02 Thread Victor Subervi
On Sat, Jan 2, 2010 at 11:20 AM, Arthur Fuller wrote: > Hi Victor. > > I think that the first thing you need to consider is whether a product can > be in more than one package, and second is whether a package can be in > another package. Also, I don't know why you need to auto-generate in either >

Re: How Set Up This Table

2010-01-02 Thread Arthur Fuller
Hi Victor. I think that the first thing you need to consider is whether a product can be in more than one package, and second is whether a package can be in another package. Also, I don't know why you need to auto-generate in either case. It's pretty simple DDL. Case 1: product can only be in one

How Set Up This Table

2010-01-01 Thread Victor Subervi
Hi; I have a table with products for a store to sell. I need to autogenerate from code a table or series of tables into which I can enter (and from which I can retrieve) the ID numbers of products which I am going to associate together and their package price. Product associations will vary, in tha