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 > Best way to model Many-to-Many relationship?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Best way to model Many-to-Many relationship?

Réponse
 
LinkBack Outils de la discussion
Vieux 05/11/2007, 15h09   #1
howa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Best way to model Many-to-Many relationship?

For example, to model user's favorite food, in normal sense, using a
relationship table would be the answer, e.g. <UserId, FoodId>

The bad thing is: the table might grown very quickly if you have a lot
of users, e.g. consider 100K Users, each user love 100 foods on
average, so there will be 10M rows already. In long term, I am not
sure if the MySQL table reach certain limit then the performance start
to degrade,

in MySQL way, it said:

http://dev.mysql.com/doc/refman/5.0/en/features.html
Handles large databases. We use MySQL Server with databases that
contain 50 million records. ..

So 10M is quite close to 50M in fact, I am not sure if there is a
better method to represent m2m relationship in DB/MySQL.

  Réponse avec citation
Vieux 05/11/2007, 20h57   #2
Paul Lautman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Best way to model Many-to-Many relationship?

howa wrote:
> So 10M is quite close to 50M in fact

No it's not.

1 is quite close to 5, only 4 away
10 is fairly close to 50, only 40 away

10M is however 40M away from 50M. Not close at all IMO.





  Réponse avec citation
Vieux 05/11/2007, 22h14   #3
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Best way to model Many-to-Many relationship?

On Nov 5, 9:09 am, howa <howac...@gmail.com> wrote:
> For example, to model user's favorite food, in normal sense, using a
> relationship table would be the answer, e.g. <UserId, FoodId>
>
> The bad thing is: the table might grown very quickly if you have a lot
> of users, e.g. consider 100K Users, each user love 100 foods on
> average, so there will be 10M rows already. In long term, I am not
> sure if the MySQL table reach certain limit then the performance start
> to degrade,
>
> in MySQL way, it said:
>
> http://dev.mysql.com/doc/refman/5.0/en/features.html
> Handles large databases. We use MySQL Server with databases that
> contain 50 million records. ..
>
> So 10M is quite close to 50M in fact, I am not sure if there is a
> better method to represent m2m relationship in DB/MySQL.


There really isn't an alternative for representing a many-to-many
relationship.

  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 01h38.


É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,10910 seconds with 11 queries