Hmm. If we're talking pure DB theory, then the whole point is to apply the DRY principle as much as possible. At the point you have multiple copies of the same data, unless your programmers are perfect (and they aren't, I promise), you *will* have stale data. Better to have only one place to update things.

Some other questions/thoughts that come to mind:
- Will it ever be possible for a company to have more than one contact
  email address?
- Do you /really/ want to store the user's password in your DB?  Look
  towards salts and SHA/MD5 sums.
- If you have more than a few people with the same company, are you at
  all worried about disk space?
- Disk contention is often the bottleneck, if your DB can't fit entirely
  in main memory.  Having less places to update means better disk
  access.
- Usage patterns, as you described, are also a concern.  Logging in is
  an issue as is accessing other data.  What's the ratio of
  currently-logging-in-users to other data requests?  No need to pull
  the entire data row if you're not going to use most of the disk pages.
- Will you have mainly INSERT queries, mainly SELECT, UPDATE,
  DELETE, a combination?  DB's and engines are better suited to
  different types of workloads.
- Are you worried about integrity of your data?  How many foreign
  key constraints will you want?

These all tie in together, and generally beg the question of *your* usage patterns. If this is a project of any import, I can almost guarantee that what you think will happen will not align with what actually happens. With that in mind, having the agility of multiple tables with correct data (read: use foreign key constraints) will likely behoove you.

You might want to take a look at some articles on normalization and schema design. Wikipedia is a good starting pace.

Kevin

At 12:30p -0500 on 18 Jan 2008, Alex K wrote:
Well the basic information, company description and personalized
options will be selected many times (whenever a user submits a query).
It will basically be show on the result page of the search engine.

The user's login / password well is used to login, then the user may
update the company basic information, description and personalized
options. These updates may happen sporadically though. Once every 3
minutes these fields are selected again in order to update the search
engine index.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to