| Author |
Topic  |
|
X-Factor
Constraint Violating Yak Guru
392 Posts |
Posted - 01/13/2005 : 11:32:21
|
quote: If you don't believe me, come work with me for a few months.
Got any jobs going in the States then? I'll bring my C. J. Date book. |
Edited by - X-Factor on 01/13/2005 11:33:34 |
 |
|
|
Stoad
Freaky Yak Linguist
*
1983 Posts |
Posted - 01/15/2005 : 16:12:53
|
Normalization is a good thing but the common sense is always better:
select langid, shortmonths from master..syslanguages
langid shortmonths
------ ----------------------------------------------------------
0 Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
1 Jan,Feb,Mar,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez
2 janv,fevr,mars,avr,mai,juin,juil,aout,sept,oct,nov,dec
3 01,02,03,04,05,06,07,08,09,10,11,12
4 jan,feb,mar,apr,maj,jun,jul,aug,sep,okt,nov,dec
5 Ene,Feb,Mar,Abr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic
6 gen,feb,mar,apr,mag,giu,lug,ago,set,ott,nov,dic
7 jan,feb,mrt,apr,mei,jun,jul,aug,sep,okt,nov,dec
8 jan,feb,mar,apr,mai,jun,jul,aug,sep,okt,nov,des
9 jan,fev,mar,abr,mai,jun,jul,ago,set,out,nov,dez
10 tammi,helmi,maalis,huhti,touko,kesa,heina,elo,syys,loka,marras,joulu
11 jan,feb,mar,apr,maj,jun,jul,aug,sep,okt,nov,dec
12 I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII
13 jan,febr,marc,apr,maj,jun,jul,aug,szept,okt,nov,dec
14 I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII
15 Ian,Feb,Mar,Apr,Mai,Iun,Iul,Aug,Sep,Oct,Nov,Dec
16 sij,vel,ozu,tra,svi,lip,srp,kol,ruj,lis,stu,pro
17 I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII
18 jan,feb,mar,apr,maj,jun,jul,avg,sept,okt,nov,dec
19 ???,???,???,???,???,????,????,???,???,???,???,???
20 ÿíóàðè,ôåâðóàðè,ìàðò,àïðèë,ìàé,þíè,þëè,àâãóñò,ñåïòåìâðè,îêòîìâðè,íîåìâðè,äåêåìâðè
21 ÿíâ,ôåâ,ìàð,àïð,ìàé,èþí,èþë,àâã,ñåí,îêò,íîÿ,äåê
22 Oca,Sub,Mar,Nis,May,Haz,Tem,Agu,Eyl,Eki,Kas,Ara
23 Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec |
 |
|
|
Stoad
Freaky Yak Linguist
*
1983 Posts |
Posted - 01/16/2005 : 07:11:31
|
Just in case, for those who didn't notice:
table syslanguages demonstrates violation of 1NF.
And what then? Should I start laughing at this terrible fact?
|
 |
|
|
nr
SQLTeam MVY
United Kingdom
12543 Posts |
Posted - 01/16/2005 : 07:48:42
|
You think sql server is always written using best practices? Look at some of the system SPs - I'll admit they tend to be a lot better than in 6.5 (where they looked like a lot were written by trainees) but there are still oddities. A lot have been cleared up by users pointing out problems.
You also have to look at useage - maybe that data is needed in that form and is derived from normalised data and saved like this for performance (if it is a permanent table).
========================================== Cursors are useful if you don't know sql. DTS can be used in a similar way. Beer is not cold and it isn't fizzy. |
 |
|
|
ehorn
Flowing Fount of Yak Knowledge
USA
1629 Posts |
Posted - 01/16/2005 : 08:05:18
|
Be watchful Stoad - This observation just may make front page in the February issue of dbdebunk.  |
 |
|
|
Stoad
Freaky Yak Linguist
*
1983 Posts |
Posted - 01/16/2005 : 09:24:10
|
lol, nr, I am a humble programmer and can say nothing on this and personally I count S.S. as a product of VERY HIGH QUALITY. Also, be sure, I ALWAYS & STRONGLY prefer to do my best for normalizing my tables.
ehorn;
aha :) we'll see. |
 |
|
|
X-Factor
Constraint Violating Yak Guru
392 Posts |
Posted - 01/16/2005 : 15:56:12
|
quote: table syslanguages demonstrates violation of 1NF
Can you explain why?
C.J.Date writes that a table is in first normal form if every column has a value. This appears to be the case. |
 |
|
|
X-Factor
Constraint Violating Yak Guru
392 Posts |
|
|
X-Factor
Constraint Violating Yak Guru
392 Posts |
Posted - 01/16/2005 : 16:34:42
|
| Oh its a CSV, silly me! |
 |
|
|
Stoad
Freaky Yak Linguist
*
1983 Posts |
Posted - 01/16/2005 : 18:29:10
|
>if every column has a value
has A value! Not valueS!
I can't think of string Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
other than of list of valueS. The string itself (as whole) appears quite meaningless for me.
|
 |
|
|
Stoad
Freaky Yak Linguist
*
1983 Posts |
Posted - 01/16/2005 : 19:29:49
|
btw, I checked it and my wild guess proved to be right:
select @@language select month('31 ZZZ 2006') select shortmonths from master..syslanguages where langid=22
--------- Turkce
--------- 1
shortmonths ---------------------------------------------------- ZZZ,Sub,Mar,Nis,May,Haz,Tem,Agu,Eyl,Eki,Kas,Ara
|
 |
|
|
X-Factor
Constraint Violating Yak Guru
392 Posts |
Posted - 01/17/2005 : 06:55:12
|
quote: >if every column has a value
has A value! Not valueS!
Yes that makes sense. Thanks! |
 |
|
|
Stoad
Freaky Yak Linguist
*
1983 Posts |
Posted - 01/21/2005 : 03:14:24
|
Note how gently BOL puts it: Reasonable normalization. Does it mean there is Non-Reasonable normalization?
Quote: Normalizing a logical database design involves using formal methods to separate the data into multiple, related tables. A greater number of narrow tables (with fewer columns) is characteristic of a normalized database. A few wide tables (with more columns) is characteristic of an unnormalized database.
Reasonable normalization will often improve performance. When useful indexes are available, the Microsoft® SQL Server™ query optimizer is efficient at selecting rapid, efficient joins between tables.
Some of the benefits of normalization include: 1. Faster sorting and index creation. 2. A larger number of clustered indexes. 3. Narrower and more compact indexes. 4. Fewer indexes per table, which improves the performance of INSERT, UPDATE, and DELETE statements. 5. Fewer NULL values and less opportunity for inconsistency, which increase database compactness.
As normalization increases, so will the number and complexity of joins required to retrieve data. Too many complex relational joins between too many tables can hinder performance. Reasonable normalization often includes few regularly executed queries that use joins involving more than four tables.
|
 |
|
|
Stoad
Freaky Yak Linguist
*
1983 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
Topic  |
|
|
|