Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 3rd, 2007, 05:16 PM
Registered User
 
Join Date: Jul 2007
Location: popayan, , Colombia.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default need help to create my country calendar dimension

I Need help to create my Country-specific date dimension:

I have a dimension table which contains :

Date Key (FK)
Country Key (PK)
Country Name
Civil Holiday Flag
Civil Holiday Name
Religious Holiday Flag
Religious Holiday Name
Workday

I need guidance to populate this dimension; i dont know how can i get this information?

Thanx for your support!!!

Reply With Quote
  #2 (permalink)  
Old July 4th, 2007, 12:54 AM
Friend of Wrox
Points: 1,536, Level: 15
Points: 1,536, Level: 15 Points: 1,536, Level: 15 Points: 1,536, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2006
Location: , MI, USA.
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

The table isn't normalized (lot's and lot's of nulls in holiday columns)...

The Country Name should be in a different table.

Civil and Religious Holiday's should NOT have their own columns... they are holidays. What would you do if they suddenly threw Bank Holidays at you?

Workday should not have a separate column.

If you want to normalize it and, perhaps, make it easier to update when new requirements appear, you may want to try something like this...

Date
CountryID
DayTypeID (0 for Weekend, 1 for WorkDay, others for holidays and those names would be in a DayType table including the 0 and 1 entries for DayTypeID.)

Of course, this is a lookup table and you just might want to keep it denormalized for speed... denormalization just for the sake of speed isn't normally the best idea in the world, but I don't think it'll kill you here (well, except for the wasted space :D ).

--Jeff Moden
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
create calendar from spreadsheet data iacon Excel VBA 1 February 10th, 2011 01:53 PM
Pull up or Create Record on Calendar Click Maverick10gk Pro VB Databases 10 April 26th, 2007 02:23 PM
How to create event in Calendar smartacrobat ASP.NET 2.0 Basics 0 January 4th, 2007 02:54 AM
Date Dimension mtullock SQL Server 2000 5 August 31st, 2006 09:33 AM
One dimension array. Wenggo C# 5 August 18th, 2006 02:39 AM



All times are GMT -4. The time now is 03:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.