473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

a suggestion to configure a script

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 help 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!!
Jun 2 '08 #1
2 1057
On Thu, 17 Apr 2008 19:02:41 +0200, nintesa <ni*****@nomaaaaail.itwrote:
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 help 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?
This is a database question, which you should ask in database groups...

However: most flexible is a) (with offcourse an extra table 'sites'). Easy
to add & drop sites, and with the proper indexes it should be about as
quick. Duplication of similar tables like in b) is almost never a viable
solution.
--
Rik Wasmus
Jun 2 '08 #2
Rik Wasmus wrote:
On Thu, 17 Apr 2008 19:02:41 +0200, nintesa <ni*****@nomaaaaail.itwrote:
>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 help 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?

This is a database question, which you should ask in database groups...

However: most flexible is a) (with offcourse an extra table 'sites').
Easy to add & drop sites, and with the proper indexes it should be about
as quick. Duplication of similar tables like in b) is almost never a
viable solution.
As a database professional - I would concur. b) gets to be very messy
when trying to manage as in the fact that you must always modify your
code AND your database every time you add/drop a site. Option a) is a
lot more manageable.
Jun 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Garrett Albright | last post by:
Trying to compile PHP 5 beta 4, and not having much fun... % ./configure --with-apxs --with-mod_charset --with-zlib --with-bz2 --with-curl --with-gd --with-mhash --with-pspell...
0
by: Roy Shaw | last post by:
When configuring PHP5 (5.0.3) to use the mysqli libraries I get a "No such file or directory" from the configure script. My goal is to get PHP5 running with mysql 4.1.09 with both the mysql and...
0
by: Christopher De Vries | last post by:
The predominant operating system in my workplace is Solaris, with a bit of Linux and MacOS X thrown in. As such people expect to install new software with the sequence: ../configure make make...
16
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my...
5
by: news | last post by:
I have a new situation I'm facing and could use a suggestion or two, as I don't seem to be able to think in the abstract very well. We have a local server which holds all of our image files. We...
0
by: Samuel M. Smith | last post by:
I am trying to build python2.4.2 on an arm 9 running Debian 3 Sarge when I run ./configure it fails with ../configure checking MACHDEP... linux2 checking EXTRAPLATDIR... checking for...
1
by: Markus Wollny | last post by:
Hi! I am trying to build PostgreSQL 7.4.3 with Java enabled; I've got Apache Ant version 1.5 and j2sdk1.4.1_05 installed: Verifiying ant: # which javac /usr/java/j2sdk1.4.1_05/bin/javac #...
6
by: Kissingfish | last post by:
Hi there.. I'm trying to configure a quote form for my website.. I want to have different fields, for example radio buttons, check boxes and drop-down menus, and depending on what you select, a...
3
by: cosmo_general | last post by:
Hi Folks, I just downloaded precompiled Python for Windows, and it runs. Now I have got the command line coding. However, I can't run my python scripts. My python script, foo.py, is located in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.