Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-30-2004, 11:07 PM   #1 (permalink)
creed
Registered User
 
Join Date: Aug 2004
Posts: 23
creed is on a distinguished road
denormalized tables?! WTF?!

Ok I've got a Q for anyone that knows some SQL

I was aksed at an interview recently to explain how I would break apart a denormalized table into normalized tables and then create a query that simulates the denormalized table. Of coruse I didnt get the job because I said that I had absolteuly no clue what the hell denormalized meant. So after doing some reading and being jsut as confused as to how this is done and havign a migraine to boot, I was wodnering if anyone had an idea as what the heck this is, and if it can even be done?
creed is offline   Reply With Quote
Old 08-31-2004, 07:03 AM   #2 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Denormalized == stupid design and bad data. ok, that's my interpretation. Depending on the application requirements it might be a good idea to denormalize some of the data for various reasons.

snip from the below perl link:
Quote:
The process of rationalizing your data into tables to avoid data redundancy is known as normalization. The corollary operation is known as denormalization and can be desirable in certain situations.
Yeah, I didn't know what the specific buzzword meant either until I googled it. Although they should have at least elaborated a bit with a scenario.

http://www.winnetmag.com/SQLServer/A...987/22987.html

http://www.hk8.org/old_web/linux/dbi/ch03_01.htm
idx is offline   Reply With Quote
Old 08-31-2004, 08:00 AM   #3 (permalink)
creed
Registered User
 
Join Date: Aug 2004
Posts: 23
creed is on a distinguished road
thanks for the links. I've decided that since I dotn know what the heck this is, I need to learn how to do it, and more importantly, why the **** you'd do this. Unfortuantely it seems to be harder to find then i figured.

From what I was told, this is somethign thats' normally asked when going for jobs that involve anythign more complex than select/update/delete statements....news to me
creed is offline   Reply With Quote
Old 08-31-2004, 05:58 PM   #4 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
technobard is on a distinguished road
Quote:
Originally posted by creed
From what I was told, this is somethign thats' normally asked when going for jobs that involve anythign more complex than select/update/delete statements....news to me
That depends on the organization. Places that take their data more seriously tend to have someone dedicated to data modeling or they'll have the DBAs do it. Lumping it in with development is never a good sign (in my admittedly biased opinion).
technobard is offline   Reply With Quote
Old 08-31-2004, 06:52 PM   #5 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,151
Belisarius is on a distinguished road
I think (brain trying to recall my DB class from 2 years ago) normalization is reducing the redudancy of data (being 4 levels of normalization if I recall). If you wanted to denormailze, I'd think a couple sloppy joins would do it.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 09-01-2004, 07:19 AM   #6 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
technobard is on a distinguished road
A lot of what you'll see in articles (and there are a lot of them out there) is a discussion of five normal forms. So fifth normal form is touted as an ideal. In practice, most data modelers strive for third normal form. Some people go further and do something called Boyce-Codd Normal Form which falls between third and fourth normal forms. Without writing detailed examples, normalization is not something that can be explained easily and a good google will turn up all you need to get a feel for it anyway.

Beware of anyone insisting that the physical design must be in fifth normal form. This person has no place in the real world and has never actually seen it. For this group, and I have known a couple, the model is more important than the problem it is supposed to solve.

By the way, I mentioned "physical design". If anyone is serious about learning more about this area and data modeling in general, make sure you understand the difference between logical and physical design. This question comes up a lot in job interviews, at least when data modeling is part of the job.
technobard is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating temporary tables in Access creed Everything SQL ( MySQL, MSSQL, DB2, Postgre, Oracle, etc...) 0 08-23-2004 02:17 PM
wtf? sarah31 PHP 4 08-17-2004 12:03 PM
Something with tables. Matt HTML, XML, Javascript, AJAX 7 03-25-2003 06:44 AM
sql question .. joining 3 tables sde PHP 8 03-03-2003 01:12 PM
Preformatted MySQL tables bdl PHP 1 02-17-2003 07:59 PM


All times are GMT -8. The time now is 10:13 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting