Subject Re: [firebird-support] Database design question#2
Author Nick Upson
I'd use

Order table
OrderID (PK)
Date, Soldby etc.

OrderLines tabel
OrderLineID (PK)
OrderID (FK) (index, part 1 of 2)
LineNumber (index, part 2 of 2)
Quantity, etc.


The index may not be necessary depending upon your data, in particular
how many orderlines per order

On 25/01/2008, kogerbnz <kogerbnz@...> wrote:
> Hello
>
> I have yet another database design questions, that I hope you will
> help me with. How would I implement an order consisting of a number of
> order lines in a database.
> Here is my best shot.
>
> Order table
> OrderID (PK)
> Date, Soldby etc.
>
> OrderLines tabel
> OrderID (FK) (PK, part 1 of 2)
> LineNumber (PK, part 2 of 2)
> Quantity, etc.
>
> Is that a good design or is there a better design?