Results 1 to 3 of 3
Feb 6, 2006, 14:44 #1
MySQL Database Design - Questions on optimization
I am creating a database schema for a site we are currently working on. In the past, I have mainly used Access databases (I know, shame on me - they were easy!). I am now making the transition to MySQL, and attempint to tidy up my database creation practices in the meantime.
My first question:
I have a table for users setup as such
.....rest of physical info
....rest of site specific info
Would it be better to create two tables, one with physical info, that will not be displayed, one with site info, that likely will be used each time or would it be just as fast to simply create to recordsets, to fetch differing records from the same table, or will it make any difference at all?
My second question:
We are going to be creating the site using CSS. At the moment, the CSS is to be stored inside a database in records designated with "Scheme" numbers. Using this model, the page will be loaded, get the username and their Scheme number, then the scheme table will be accessed and it's values plugged into an inline style sheet.
My suggested model would be to store the schemes in a flat txt file (*.css) and simply pull in that file via an include. (ie, username is loaded, scheme is selected, css insert tags is written witht he location of the current style sheet (ie, Scheme4.css).
Does anybody have any thoughts on which one would be faster, or am I looking at 6 of one and a half dozen of the other?
Feb 6, 2006, 14:49 #2
- Join Date
- Jul 2002
- Toronto, Canada
- 53 Post(s)
- 2 Thread(s)
Feb 6, 2006, 15:26 #3
You are correct. I inadvertantly used "include" when I meant to use link. To clarify, we will either be using inline style sheets or linking to an external style sheet. If they are inline, they will be stored in a database. If they are stored externally they will be (obviously) *.css files. (ie, if I can find a method that allows an easy creation of css attributes and writes it to a text file) .
<link href="common/css_Scheme1.css" rel="stylesheet" type="text/css">
To re-state, I am questioning where it would be a performance hit to have the style sheet written out form a recordset at the beginning of everypage - will this effect the display of the page? I am in the middle of develpoing a page to test this, but if anybody has any input I would appreciate it.
Last edited by snowcrash; Feb 7, 2006 at 14:12.