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 > table configuration advice also for me!
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
table configuration advice also for me!

Réponse
 
LinkBack Outils de la discussion
Vieux 17/04/2008, 18h06   #1
nintesa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut table configuration advice also for me!

Hello from Italy!

I'm going to create a php script that registers and reports stats for
20/30 externals sites (with about 2.000 daily visitors each one).

I need to configure the tables (mysql) where I would store visitors data.

I need to choose between these solutions:

a) two table visitors and visits whit a field site_id to distinguish
between monitorated sites visitors

b) two table for each site: site_1_visitors, site_1_visits,
site_2_visitors, site_2_visits etc...

What do you think about it?

Thanks!!
  Réponse avec citation
Vieux 17/04/2008, 18h11   #2
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: table configuration advice also for me!

On Thu, 17 Apr 2008 19:06:06 +0200, nintesa <nintesa@nomaaaaail.it> wrote:

> Hello from Italy!
>
> I'm going to create a php script that registers and reports stats for
> 20/30 externals sites (with about 2.000 daily visitors each one).
>
> I need to configure the tables (mysql) where I would store visitors data.
>
> I need to choose between these solutions:
>
> a) two table visitors and visits whit a field site_id to distinguish
> between monitorated sites visitors
>
> b) two table for each site: site_1_visitors, site_1_visits,
> site_2_visitors, site_2_visits etc...


Hmm, don't crosspost please.

(allthough this is a better group for it then comp.lang.php, in which I
answered your question)
--
Rik Wasmus
  Réponse avec citation
Vieux 17/04/2008, 18h25   #3
nintesa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: table configuration advice also for me!

Rik Wasmus ha scritto:
> On Thu, 17 Apr 2008 19:06:06 +0200, nintesa <nintesa@nomaaaaail.it> wrote:
>
>> Hello from Italy!
>>
>> I'm going to create a php script that registers and reports stats for
>> 20/30 externals sites (with about 2.000 daily visitors each one).
>>
>> I need to configure the tables (mysql) where I would store visitors data.
>>
>> I need to choose between these solutions:
>>
>> a) two table visitors and visits whit a field site_id to distinguish
>> between monitorated sites visitors
>>
>> b) two table for each site: site_1_visitors, site_1_visits,
>> site_2_visitors, site_2_visits etc...

>
> Hmm, don't crosspost please.
>
> (allthough this is a better group for it then comp.lang.php, in which I
> answered your question)


You're right! I before posted on php and then I remembered this group...
  Réponse avec citation
Vieux 17/04/2008, 18h26   #4
Erick T. Barkhuis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: table configuration advice also for me!

nintesa:
> Hello from Italy!
>

Hi from Germany

> I'm going to create a php script that registers and reports stats for
> 20/30 externals sites (with about 2.000 daily visitors each one).
>
> I need to configure the tables (mysql) where I would store visitors data.
> I need to choose between these solutions:
>
> a) two table visitors and visits whit a field site_id to distinguish
> between monitorated sites visitors
>
> b) two table for each site: site_1_visitors, site_1_visits,
> site_2_visitors, site_2_visits etc...


In my opinion, you have an ER diagram with at least three entities:
sites, visits and visitors. Because visitors can visit multiple sites,
and sites are visited by multiple visitors, it should look like:


SITE--1----n--VISIT--m----1--VISITOR

Since you don't mention any attributes, I assume for now, that this would
do. Depending on possible repetitive attributes, you'd need to normalize
further.


--
Erick
  Réponse avec citation
Vieux 17/04/2008, 21h29   #5
Paul Lautman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: table configuration advice also for me!

Rik Wasmus wrote:
> On Thu, 17 Apr 2008 19:06:06 +0200, nintesa <nintesa@nomaaaaail.it>
> wrote:
>> Hello from Italy!
>>
>> I'm going to create a php script that registers and reports stats for
>> 20/30 externals sites (with about 2.000 daily visitors each one).
>>
>> I need to configure the tables (mysql) where I would store visitors
>> data.
>> I need to choose between these solutions:
>>
>> a) two table visitors and visits whit a field site_id to distinguish
>> between monitorated sites visitors
>>
>> b) two table for each site: site_1_visitors, site_1_visits,
>> site_2_visitors, site_2_visits etc...

>
> Hmm, don't crosspost please.
>
> (allthough this is a better group for it then comp.lang.php, in which
> I answered your question)


He didn't cross post, he multi-posted, which is worse


  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 11h59.


Édité par : vBulletin® version 3.7.2
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
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12924 seconds with 13 queries