0

I am trying to create a calendar application that can support multiple calendars, for instance Indian, Nepali, Russian etc. Users can enable or disable the calendars according to their needs.

I have an idea in mind to make the English calendar as a base and create a mapping table for additional calendars. But I am not quite sure what is the efficient way to design database schema. Can you provide me the best way for designing the relevant database schema?

Since each calendar has different national holidays as well I want to support for it as well.

My work so far

My entity-relationship diagram so far:

calendar

...where:

  • base_calendar: Stores the English date
  • additional_calendar: English equivalent date (for example in BS)

Source: git.

  • Well Nepali and Hindi calendar are based on Hindu calendar which is based on moon movements around the earth whereas English and Russian are based on earth revolutions around the sun. Also Hindu calendar has normally 30 to 31 days per month.I want to make calendar like in Google Calendar . – Ashish Kafle Mar 28 at 5:28
  • If so create base raw calendars for each type of chronology, then attach separate calendars to proper base ones. – Akina Mar 28 at 5:40
  • Well I have thought about it but I think making english calendar as a base could help to make it more dynamic. Is there any articles you have in mind which would help me for better designing the database? – Ashish Kafle Mar 28 at 5:46
  • I do not recommend you to make any partial calendar as a base one. If base is raw you need only add some info to obtain separate calendar from it, whereas when partial calendar is a base one you need both add and remove individual differences to obtain another partial one. – Akina Mar 28 at 6:05
  • DB scheme should be a later step of design. You have to start from some unified calendar representation. Each calendar have some starting point and some periodic units - day/week/month etc. Each calendar have the concept of date - the certain point in the time. The second step is the conversion between calendars - you should be able to convert the date from one calendar into another. What is the Hindu date for english 3/28/2019? When you get the proper representation you'll be ready to think about DB scheme. – Kondybas Mar 28 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.