Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 3rd, 2007, 05:16 PM
Registered User
Join Date: Jul 2007
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

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

Thanx for your support!!!

Old July 4th, 2007, 12:54 AM
Friend of Wrox
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts

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...

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

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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.