Re: Inserting into multiple tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tedd

Thanks for your response, perhaps I was completely missing this or my powers 
of expanation have gone out the window.

I have found a solution and I am going to put it in its own post.

Thanks again.

gary


"tedd" <tedd.sperling@xxxxxxxxx> wrote in message 
news:p0624080ac7e9123f4856@[192.168.1.102]...
> At 11:05 AM -0400 4/12/10, Gary wrote:
> -snip-
>>If normalization is so important, why is it that the INSERT INTO multiple
>>tables is not a standard command or procedure?.
>
> In my view, you are mixing apples and oranges.
>
> "Normalization" is simply cutting down on repetition. Inserting data into 
> multiple tables is a different critter -- it doesn't make "Normalization" 
> any better or worse.
>
> Just figure out what data you need to acquire, what tables you need to 
> store it in, and then what references you need to what tables/fields to 
> use it while reducing repetition.
>
> For example if you have a customer table, you don't need to add all the 
> customer data to each sales receipt (sales table) when you can simply 
> record the customer's ID.
>
> Likewise with the items that are sold, you don't need to include all the 
> items attributes in the sales receipt (sales table) when you can simply 
> record the items' ID.
>
> None of the above requires some special way to inserting data into 
> multiple tables -- you just record the sales.
>
> Sales table
>
> Sales ID --  Customer ID -- Item ID  -- and probably the date.
> 1234   -- 6789 --  101112131415  --  4/12/10
>
> Cheers,
>
> tedd
>
>
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 5022 (20100412) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 



__________ Information from ESET Smart Security, version of virus signature database 5023 (20100412) __________

The message was checked by ESET Smart Security.

http://www.eset.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux