You are here: Re: Shop online « PHP Programming Language « IT news, forums, messages
Re: Shop online

Posted by Kenneth Downs on 02/15/07 20:10

Daniele wrote:

> Hi
> I want to build a shop from scratch,
> i'm laying down all the possible problem i can find during the way.
> how can i structure the database to be able to add unlimited properties
> or attribute to different kind of product ?
> like if i sell a t-shirt i will hate to chose size and colour
> if i sell a plate probable the model and the colour
> i'm looking into other open source shop like oscommerce and the
> structure of the database is really to big for my knowledge so i cant
> really understand it.
> i now that i neet to divide all in table as much i can but how?
> thanks
> D

There are two answers to the database structure question.

One school of thought, to which I belong, says that your best short-term,
mid-term, and long-term solution is to build a database whose tables
reflect the actual information you are trying to store. To take this path,
you need to read up on Normalization.

If you take the route of building proper databases, you do run into a
significant problem with updates to the structures, which don't go the same
way as modifying code. This drives some people to what I can only call
half-wit schemes, such as the infamous Entity-Attribute-Value error. In
this scheme you build one table with columns Entity, Attribute, Value (and
key, but that's not part of the name). You never have to restructure
anything because you only have one table. You also have to re-invent SQL
because you've thrown that out, you kiss performance goodbye, and basically
you spend the rest of your life trying to recode everything you threw away
by using only one table.

In the end you need a tool that can help you maintain code and data
together. I have my own solution to this, mentioned in an [ANNOUNCE]
posting earlier today, as do countless other people and organizations.







--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация