Sunday, December 26, 2010

Learning basics of Date Effectivity in ADF

This post explains the basics of date-effectivity which include mainly the basic date-effective operations like Date 'Effective Search', 'Date Effective Create', 'Date Effective Update' and 'Date Effective Delete'. But, it'll be easier to explain the concepts with examples.

So, here for example, I'm taking the simple example of HR admin, who can search/create/update/correct jobs. Let us assume, each job has a name, code and other attributes like job level, if the job requires medical checkup required, minimum salary, maximum salary, etc. What makes the job is date effective is that the attributes of job may change over the time, but still we need to be able to search the jobs based on the attributes that were applicable previously or that will be applicable in future.

For instance, let us take a job with Name 'Java Associate' which was created on 01-01-2000. When the job was created, the minimum salary for the job (minSal) was 10000 and maximum salary (maxSal) was 15000. But, on 01-01-2005, the job was revised and the management decided to move their technology to ADF and changed the job name to 'ADF Associate'.On 01-01-2010, the same job was revised and salary ranges were updated to minSal 25000 and maxSal 40000. Again, the management decided to change all Associate jobs to Developer Jobs from 01-01-2012 onwards (i.e., the job name will be changed from 'ADF Associate' to 'ADF Developer') etc.,

Here, the requirement is that if the user knows the name of the job applicable in 2000, he should be able to search the job as of that date. Similarly, if the user wants to search as of the current date or future dates, he should be able to search as well. That means we shouldn't simply update the existing values of the attributes as it will update the existing values and the previous values would be lost! We need to keep different versions of the attributes for the same job. So, how will it be possible as to have the multiple records with same JobId? Here comes EffectiveStartDate and EffectiveEndDate. Actually, we need to have a composite key based on JobId, EffectiveStartDate and EffectiveEndDate(i.e., the combination of these 3 attributes should be unique).

So, the data in the above requirement can be shown in table as follows. Changed attributes for each date-effective update are highlighted in yellow.


If you see the above table, you'll notice that for any change in the Job attribute, we have new row with the corresponding EffectiveStartDate and EffectiveEndDate and there are no gaps in between. i.e., for any given date, only one record is applicable among multiple date-effective rows of a single Job record.

Now we'll see what date effectivity means in ADF for different operations on the records.
Date Effective Search:
For example, if we want to find the jobs whose name starts with 'ADF%' as of date 01-01-2006. Or, we want to find out the jobs which will be applicable after 01-01-2012. Or, we want to find the minSal and maxSal for a given job as of 01-01-2007. Here, the results would change changing the Effective Dates as each job would have different values for the same attribute for different effective dates. Date-effective search will make all these possible. Date-effective search is explained with an example here.

Date Effective Create:
For example, we want to create a job that will be applicable in future say from 01-01-2013. Or, I want to create record which should be applicable from the past say 12-12-1900. Or, I want to create a new job which should be effective from today. Date-effective create makes all of these possible.

Date Effective Update:
For example, we want to insert a new date-effective record for the job to represent a change in one of the attributes of the job. Say, I want to update the maxSal of the job with jobId 1001 to 20000 from 01-01-2008. This will insert a new record for the same job with EffectiveStartDate 01-01-2008 with maxSal 20000. Different date-effective update modes and the corresponding behavior has been explained here.

Date Effective Correct:
For example, I want to correct or change one or more of the attributes of one of the date-effective rows of a single job record. Date Effective Correct operation just corrects the existing data. It won't insert any new date-effective rows. You can find the example of DE correction mode here.

Date Effective Delete:
For example, we want to delete a single date-effective record out of multiple date-effective records of a job. For instance, we want to delete the job record [1001, 01-01-2005, 31-12-2009]. If the record is non-date effective, then deleting the row means deleting the entire record as there won't be multiple rows. But, in case of date-effective objects, if you want to delete entire record, you need to delete all date-effective rows of that record if any.

Now, you understand the basics of date-effectivity in ADF. If you need any clarification, please leave a comment.

29 comments:

  1. Sapiens IAS offers flexible and results-oriented Best Anthropology Coaching Coaching for UPSC and IAS students through an online and offline training program by well known IAS trainer Mr. Pradip Sarkar.

    Call: 8700922126 || 011-2875 6962 || 9718354962
    Email: sapiensias@gmail.com
    Address: 17A/44, W.E.A. 3rd Floor, Near Karol Bagh Metro Station (Pillar No. 99), New Delhi- 110005.

    Read More at: https://www.sapiensias.in/course/anthropology-online-classes-upsc/

    ReplyDelete
  2. Every biker, irrespective of the gender, dreams of going on a Manali bike trip once in their lifetime.While they long for an impeccable adventure, the truth comes into contact with a great deal of weaknesses. Having comprehended that bikers will undoubtedly discover a couple of boundaries on a rough scene like that of Leh and Manali, we've put in our earnest attempts to examine each data in this blog will enable them to experience any such challenges in transit.

    Read More: http://www.enfieldpoint.com/bike-rental-manali.htm

    ReplyDelete
  3. Wethecoders is one of the leading online assignment help services. wethecoders.com always take step towards your satisfaction. We work hard so that you can get good grades. Our prime motto is to help you to get good grades in your assignment, project and homework. Our team is professional and knowledgeable. We are here to help you 24/7. Try once to take the advantage of our services and we assure you that you will get surely the best result.

    http://www.wethecoders.com/database-project-help

    ReplyDelete
  4. Jim Corbett National Park Hotels

    The oldest national park in India, Jim Corbett National Park was established in 1936 to protect the endangered Bengal tiger. It is located in Nainital district of Uttarakhand and has been a haunt for tourists and wildlife lovers for a long time. There are several splendid luxury resorts so that one can relax and retreat amidst the natural beauty. The Jim Corbett National Park represents the first marked efforts for natural conservation in India.

    Welcome to The Hridayesh Resort - Spread in over 9 acres over looking the Majestic Kosi River, we offer you 58 exotic villas surrounded by thick mango groves and state of amenities like Multi Cuisine Restaurant, state of an art conference hall, Amaara – The Spa Center, Elixir – The Bar and much more. Be here for a rejuvenating experience in the Wilderness. Hridayesh Resort, is one of the best resort in Jim Corbett.

    Our resort in Jim Corbett, offers a perfect amalgamation of luxury and serenity. This is where each villa is tastefully designed to provide you an elegant stay and majestic views like Lush Gardens, Swimming Pool, River Fronts and more..

    Read More: https://www.thehridayeshresort.com

    ReplyDelete
  5. Best Website Design Agency for Educational Institute
    Create a Wonderfull Websites for you Coaching, Institute, School and more at Resonable Cost
    Reach: https://www.eliteseo.agency/website-design-for-educational-institute/


    Feel Free to Ask any Quary
    Know more: https://www.eliteseo.agency/
    Email: info@eliteseo.agency
    Call: 7634078909

    ReplyDelete
  6. Divorce Finance a financial planner can help you simplify financial data and helping you to educate yourself about money, build confidence, and help you take ...

    Read More: http://www.financialdivorce.com.au/

    ReplyDelete
  7. Water Treatment Expert Inc |Water Treatment Plant Delhi


    MECHANICAL WORKS. Wtexpert is having state of the art mechanical fabrication facility at dedicated sub. FACILITIES. Above units spread in areas of 8000 ...

    http://wtexpert.com/
    http://wtexpert.com/effluent-treatment-plant/
    http://wtexpert.com/sewage-treatment-plant/
    http://wtexpert.com/ultra-filtration-system/
    http://wtexpert.com/reverse-osmosis-plant/
    http://wtexpert.com/filtration-systems/

    ReplyDelete
  8. Best Website Design Agency for Educational Institute
    Create a Wonderfull Websites for you Coaching, Institute, School and more at Resonable Cost
    Reach: https://www.eliteseo.agency/website-design-for-educational-institute/


    Feel Free to Ask any Quary
    Know more: https://www.eliteseo.agency/
    Email: info@eliteseo.agency
    Call: 7634078909

    ReplyDelete
  9. Book your Dublin airport taxi with Easy Cab. Best and reliable Dublin airport service in your town. Experience and contented Dublin airport transfers.

    ReplyDelete
  10. Dublin Taxi - We have the pleasure to make available vehicles for the most varied types of events, always having in mind to satisfy the expectations of our clients according to the event in question. We have since luxury limousines up to cars for 8 persons – adults and children – to offer comfort and quality in our services.

    ReplyDelete
  11. Dublin Taxi - Easycab provides long distance taxi services to all major and small cities around Ireland. You can hire any type of taxi for your long distance journey, from saloons to coaches.

    ReplyDelete
  12. Private Hire Dublin Airport

    We provides best dublin taxi and shuttle services, such as getting our clients at airports, ports and train stations and giving support services at congresses, events and shows, besides organizing trips to the most varied destinations.

    A highlight of our activities is the City Tour – a dublin taxi service that takes our clients to any place inside or outside the city of Dublin, so they can get acquainted with what the city and the outskirts have the to offer at best.

    Besides the safety, quality and professionalism, we pride ourselves for the comfort we offer to our guests. We dedicate the upmost care to deliver to our clients the necessary well-being during their trip, counting with a modern fleet of vehicles to tend to their needs.

    Read More: https://www.easycab.ie

    ReplyDelete
  13. Elite SEO Agency is a reputed SEO Company in Melbourne, Australia offers it’s highly recommended strategic SEO services for local and national businesses, engaging Social Media Optimization and Marketing solution, effective PPC advertising campaigns, complete Digital Marketing solution and user-friendly web development and designing services to all range of businesses - small to mid sized.

    Contact now at +61-449650600 to get a Free SEO & Digital Marketing consultation with us!

    ReplyDelete
  14. Elite SEO Agency is a reputed SEO Company in Melbourne, Australia offers it’s highly recommended strategic SEO services for local and national businesses, engaging Social Media Optimization and Marketing solution, effective PPC advertising campaigns, complete Digital Marketing solution and user-friendly web development and designing services to all range of businesses - small to mid sized.

    Contact now at +61-449650600 to get a Free SEO & Digital Marketing consultation with us!

    ReplyDelete
  15. Elite SEO Agency is a reputed SEO Company in Melbourne, Australia offers it’s highly recommended strategic SEO services for local and national businesses, engaging Social Media Optimization and Marketing solution, effective PPC advertising campaigns, complete Digital Marketing solution and user-friendly web development and designing services to all range of businesses - small to mid sized.

    Contact now at +61-449650600 to get a Free SEO & Digital Marketing consultation with us!

    ReplyDelete
  16. Sapiens IAS offers flexible and results-oriented Best Anthropology Coaching Coaching for UPSC and IAS students through an online and offline training program by well known IAS trainer Mr. Pradip Sarkar.

    Call: 8700922126 || 011-2875 6962 || 9718354962
    Email: sapiensias@gmail.com
    Address: 17A/44, W.E.A. 3rd Floor, Near Karol Bagh Metro Station (Pillar No. 99), New Delhi- 110005.

    Read More at: https://www.sapiensias.in/course/anthropology/anthropology-optional-coaching/

    ReplyDelete
  17. Are you looking for Royal Enfield Travel in India? Enfield Tours India offers best Royal Enfield bike tours or
    Royal Enfield India Trip packages at industry lowest rates here in India.
    This is Popular moto touring agent and going to the mountains can be really enjoyable.
    The waterfalls, the forests the hills and the roads, all these are to be enjoyed and simply relished.
    Now call at +91 9716246989,

    http://www.enfieldtoursindia.com/

    ReplyDelete
  18. The augmented reality of Angry Birds AR Isle of Pigs (iOS) isn’t as unique as other augmented reality games. You have the freedom to walk around the stages.

    ReplyDelete
  19. Wealthy Affiliate Program is a social network with +300,000 bloggers and an exceptional training platform. It was founded back in 2005 by Kyle and Carson, becoming one of the most successful training programs as of today.

    ReplyDelete
  20. Canals, Tulips, Nightlife are some of the main attractions of the beautiful city of Amsterdam and the best time to visit Tulip Garden in Amsterdam is during mid-April till May.

    ReplyDelete
  21. Personal Injury Los Angeles: A Personal Injury lawyer must have some knowledge of back and neck injuries as a personal injury lawyer is constantly confronted by medical legal problems. Medic legal is something that involves both medicine and legal aspects of a case. As neck and bank injuries are by far the most common injuries, a personal injury lawyer must have knowledge of injuries to the neck and back.

    ReplyDelete
  22. Personal Injury Attorney Los Angeles - Sheena Rude, BA, MBA, JD, ESQ. Is a courageous, caring and knowledgeable lawyer in Los Angeles. She will help you deal with your unique situation dealing with the Superior Court of California.

    ReplyDelete
  23. Apple iPhone 11 Review - After earlier Apple devices have fallen behind Samsung, Google and Huawei’s likes, the iPhone 11 reflects a tremendous step forward for photography thanks to a fresh ultra-wide lens and a fresh night mode for better low-light results. Also, Apple has upped the ante with higher quality of video recording while providing outstanding battery life.

    ReplyDelete
  24. Cheap And Best International Flight Tickets - Book Cheap Emergency Flight Ticketsat the last minute without any processing or convenience fees only at Flight Price Online.

    ReplyDelete

Related Posts with Thumbnails