MySQL database design questions
Posted: Tue Jun 29, 2004 8:45 am
Hello,
I'm setting up a database and was wondering about how to optimise the design of the tables. For example, I have a user database that has about 8 key user parametres and another, say, 24 parameters that are less important (preferences, etc).
From a speed and disk space point-of-view, is there any significant difference between putting all the user parametres into one 30-column table as opposed to having 2 or 3 tables (only one of which will be indexed) with about 8 to 15 columns each?
In a similar vein, I'm also in doubt as to whether it's better having 3 separate databases: Users (private), Users' Own Data (nominally private but data gathered for anonymous global statistics) and Places (public), or just lumping them all into one big database. (The total number of tables is about 26, with an average number of 12 columns per table).
Also, does anyone know if there are freely available tables (sql or simple csv format) that list geographical data (states, regions, towns, etc, with or without map coordinates)?.
Many thanks.
David.
(PS: Sorry for the simpleton questions, but I'm new to PHP and MySQL).
I'm setting up a database and was wondering about how to optimise the design of the tables. For example, I have a user database that has about 8 key user parametres and another, say, 24 parameters that are less important (preferences, etc).
From a speed and disk space point-of-view, is there any significant difference between putting all the user parametres into one 30-column table as opposed to having 2 or 3 tables (only one of which will be indexed) with about 8 to 15 columns each?
In a similar vein, I'm also in doubt as to whether it's better having 3 separate databases: Users (private), Users' Own Data (nominally private but data gathered for anonymous global statistics) and Places (public), or just lumping them all into one big database. (The total number of tables is about 26, with an average number of 12 columns per table).
Also, does anyone know if there are freely available tables (sql or simple csv format) that list geographical data (states, regions, towns, etc, with or without map coordinates)?.
Many thanks.
David.
(PS: Sorry for the simpleton questions, but I'm new to PHP and MySQL).