Re: Storing products in multiple, deeply nested category tables.

From: Sándor Daku <daku(dot)sandor(at)gmail(dot)com>
To: Kurt R Marquardt <marqkdsade(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Storing products in multiple, deeply nested category tables.
Date: 2016-03-23 12:29:20
Message-ID: CAKyoTgYBmSE6zcuYjj9gGLdZ7WrrfVtwNs0z_DGnW48w0CXCeA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 23 March 2016 at 12:37, Kurt R Marquardt <marqkdsade(at)gmail(dot)com> wrote:

> I apologize but I am truly a noob with Postgresql.
>
> I am using the following platform~
>
> Apache 2.4.18
> Postgresql 9.4.6-1
> PHP 7.0.4
> PHPPgAdmin 5.1
> Image Magic 6.9.2-0
> ModSecurity 2.9.0
> git 2.5.1
>
> I am developing an e-commerce site with a very dynamic vendor. They
> provide an XML datafeed to completely update inventory twice per day and
> update inventory status every 15 minutes. The first part of the file is a
> list of 200+ categories (all parent). I need to convert that to about eight
> deeply nested (five to six deep in some cases) categories. An example
> would be Men's>Accessories>Jewelry>Watches>Sport>Aviator. Almost all
> products fall into two categories and some five or six. What is the best
> way to set up the tables to support this? If I have six category fields in
> my catalogue file there would be a lot of empty fields. I am thinking
> about creating different "parent" tables but that would require more joins
> and I am trying to make this as efficient and fast as possible. Any
> suggestions would be greatly appreciated.
>
>
Somebody on this list has already recommended Bill Karwin's book, SQL
Antipatterns.
The Naive Trees chapter is almost exactly about your situation.

Regards,
Sándor

Ezt az e-mailt egy Avast védelemmel rendelkező, vírusmentes számítógépről
küldték.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message madler 2016-03-30 22:05:55 Where is the command line?
Previous Message Kurt R Marquardt 2016-03-23 11:37:18 Storing products in multiple, deeply nested category tables.