PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > GURU: conception needed
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
GURU: conception needed

Réponse
 
LinkBack Outils de la discussion
Vieux 02/10/2007, 07h45   #1
Bob Bedford
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut GURU: conception needed

Hi,

I've to create a commercial website wich will have a central table to manage
all articles. Each article must be on a certain type and will have its own
specification. So when entering values for a certain type then I've to show
the specific fields controls to entere the values or search them.

example:
I sell musical instruments.
- guitars
- pianos
- trumpets
.....
Guitars has some specific features that are different from pianos and also
differents from trumpets.
So when I add a new guitar I've to show the specific features. When I add a
new piano the feature to select are different.
The problem is that I don't know how to manage such specific features
dynamically. I mean I may create a table for guitars, a table for
pianos....but this won't be very interesting since there is about 300
different kind of instruments in the shop and creating 300 tables for this
won't be very interesting. I've no idea on where to start and how to do so.
The idea of having an unique table for articles is for searching and
managing purpose as searching on 300 items table..... So it should greately
simplify the website and also it will be able to manage any kind of object,
whatever the number of different kind would be present on the shop. Also
searching guitars will be different from searching pianos and so on....and
only 1 search engine should be provided to search all kind of objects with
the specific fields.
So for what I may guess there will be a table for articles and a table with
article kind specifications but I don't know if it will be enough and how to
create them.

Thanks for ing.

Bob


  Réponse avec citation
Vieux 02/10/2007, 23h09   #2
Evan Keel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: conception needed


"Bob Bedford" <bob@bedford.com> wrote in message
news:4701e92c$0$3807$5402220f@news.sunrise.ch...
> Hi,
>
> I've to create a commercial website wich will have a central table to

manage
> all articles. Each article must be on a certain type and will have its own
> specification. So when entering values for a certain type then I've to

show
> the specific fields controls to entere the values or search them.
>
> example:
> I sell musical instruments.
> - guitars
> - pianos
> - trumpets
> ....
> Guitars has some specific features that are different from pianos and also
> differents from trumpets.
> So when I add a new guitar I've to show the specific features. When I add

a
> new piano the feature to select are different.
> The problem is that I don't know how to manage such specific features
> dynamically. I mean I may create a table for guitars, a table for
> pianos....but this won't be very interesting since there is about 300
> different kind of instruments in the shop and creating 300 tables for this
> won't be very interesting. I've no idea on where to start and how to do

so.
> The idea of having an unique table for articles is for searching and
> managing purpose as searching on 300 items table..... So it should

greately
> simplify the website and also it will be able to manage any kind of

object,
> whatever the number of different kind would be present on the shop. Also
> searching guitars will be different from searching pianos and so on....and
> only 1 search engine should be provided to search all kind of objects with
> the specific fields.
> So for what I may guess there will be a table for articles and a table

with
> article kind specifications but I don't know if it will be enough and how

to
> create them.
>
> Thanks for ing.
>
> Bob
>

Hi Bob,

You are dealing with a classic Supertype/Subtype relationship. It models
reality fairly well. The Supertype table contains columns that are common to
all articles such as price, category, and date created. The Subtype table
has columns that are specific to a particular Category. What is great about
this model is that is very easy to add a new Subtype. Also, Subtypes will
have few if any nulls, which is always a positive. Sometimes an approach
that models the real world is better than an approach that is "more
interesting". Let the front end determine the search criteria.

Evan


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h44.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08400 seconds with 10 queries