Ask Experts Questions for FREE Help !
Ask
    hsappleton's Avatar
    hsappleton Posts: 3, Reputation: 1
    New Member
     
    #1

    Dec 15, 2008, 07:56 PM
    How to organize data so a programmer can access
    Hi
    I need to develop a software/DLL that give user prior notice of an upcoming holiday events in whatever country/locality they are located in.

    Bear in mind the following issues,
    There are:

    a) approx 195 countries/states in the world
    b) on average each country has about 10-15 holidays per year
    c) the name of the event/holiday
    d) there are 365 days in a year (of course you know that already)


    Now, I am not a programmer. My task will be to gather this information (manually typing them) and provide my programmer this data in an electronic format(spreadsheet,database,textfile or whatever). The programmer should access this data to write the program for me(possibly in VSNET,Java or PHP)

    I guess the programmer will take care of non-conformity and calender types(gregorian, julian, islamic, hindu, hebrew and chinese). For now, just assume that the holidays are statics days, (ex Christmas celebrated on 25th no matter what day it falls on) and holidays that fall on weekends, but celebrated on the next/previous weekday


    But just in case I lost you above, just remember that I only need to know how to organize/structure the data into a datafile that a programmer can access. Thank you.
    KISS's Avatar
    KISS Posts: 12,510, Reputation: 839
    Uber Member
     
    #2

    Dec 15, 2008, 11:15 PM

    As I see it, you have a matrix by day and country, so that's a 365 x 195 matrix that's 1 bit wide. That database could be built every year by the programmer. All that tells you is that there is a Holiday to deal with. You don't care what country at this point.

    This database has to be created yearly by the programmer with knowledge of leap year and the calendar.

    You need a calendar database to build the event database.

    So, you have a list of calendars and countries
    e.g.

    Calendar on the Y axis
    countries on the X axis (just a list)

    Gregorian US,country B, country B, country C
    xxx, China

    The you need a country/holiday database with an exception table.
    December 25, (celebrated on that day), day of year (Note 1)
    President's day (Celebrated on the Monday... ), day of year (Note 1)

    In esscence the data-base get's built each time the year changes, knowing exceptions.

    Note 1 says it's initially unknown, but when the database if built, xmas might fall on day 300 and that would be marked in the event to deal with data.

    So, then it becomes
    Is it Jan 1, 2008? Yes - build data-base once
    What day (1-365) of the year is it?
    Do I have an event? Yes, no
    What country am I in?
    Binary search the calendar data to find the holiday. At this point your searching for a number between (1-365).


    Within each country you have a calendar and a holiday. That can be a list. You also have an exception code.


    The 1-365 is an illustration, but it's probably better to use something like Excel's date system, so that dates can be added etc.

    Suppose you had a Holiday that said once every 60 days. That's an exception and coded as such.

    You really have a lot of smaller data bases that's used to build the event matrix.

    The info that you did not state is how the notification might happen. X days before (easy). The Sunday before the event might be difficult.

    The 1-365 is simplistic and probably should not be used. It really needs to be tied into the date function.

    Examples that could probably be coded are things like the anniversary of Haley's comet. It goes in everybody's callendar. What about "Secretaries day" etc. So the database might have a level associated with it like.
    National Holiday
    Celestial observance
    You can do Holiday and Holiday observed. You have Washington's and Lincoln's birthday, but you observe it on President's day.

    Like levels of error messages like warning, severe, catastophic. A warning is "Mother's day", severe is "Washington's B-day", catastrophic is "President's day"

    Think like:
    What would I like this database to do if I had all the money and time in the world. Now think, "What do I need now"

    It's not a simplistic problem and you know that.

    You need to compile a list in the "language" of the calendar used with a "How calculated" mode by country.

    The data-base will be built yearly into a 1 bit event matrix so your not searching every time.

    You then know there is an event; then you know the country; Then binary search for the day since it's in order by day. You have to deal with a few days before and after too.

    Once you have a list by country, holiday and "how calculated"; that should be able to be used to create an event database.

    Not an easy task.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Two users sharing access data at same time [ 2 Answers ]

Can a access database be worked on at the same time with more than one person working on it

How to access data after lightning strike? [ 5 Answers ]

After a lightning strike, my brother's computer has been left unusable. He took it to a computer repair shop who said the motherboard is probably faulty and they gave him a quote to repair it. However, the computer is 4 years old and he'd been wanting to get a new one anyway. So rather than...

Central Heating Programmer [ 1 Answers ]

I have an ST6400C Programmer which I think is malfunctioning. Quite simply, the heating will not come on unless it coincides with the time that the hot water is on. Thus, as our hot water goes off at 8pm, we cannot heat the house unless I manually override the hot water settings, and swith the hot...


View more questions Search