Jump to content

Recommended Posts

Posted

Hi,

 

I'm building my Event Management System from scratch and would like to use the Calendarpanel for some planning/sheduling

 

Question :

 

1. What's the best database design to store the appointment into a database. I need to make appointments for the
    several rooms in the buildingI have now :

  • ID (autoinc)
  • StartDate (Date)
  • StartTime (Time)
  • EndDate (date)
  • EndTime (Time)
  • Subject (string)
  • RoomID (is calender id i think in example)
  • AllDay (?)

    Or is it better to use a DateTime/TimeStamp field for Start and End date ?

    Then i need a seperate table called 'Room' which contains the rooms. This table looks like:
  • RoomID (autoinc)
  • Name (string)
  • Capacity (int)

 

2. In the example the UniCalendarPanel.Calendar property contains several calendars. Is it possible to use the records/names
stored in the table ROOMS?

 

Regards Peter

 

 

Posted

Hi Peter,

 

You are asking a very good question.

 

I have developed a scheduler system based on MySQL, and it has been running for 10 years,

and this year I ported it to Unigui.

 

The thing is that you have to work with two, if not three different date/time systems:

 

1. The pascal format

2. The database format, in my case MySQL

3. In my case also the Javascript format

 

*Of course* these are all quite different, and what got me pulling whatever little hair I had left,

was the fact that JS has issues with summertime correction, making it virtually impossible

to use JS absolute datetime format for historical dates without having a database of offsets,

whereas using relative JS datetime is perfectly ok.

 

I had to use JS time format because the calendar component did not allow x columns for a single day,

only a single column, so I had to write my own calendar in pure JS. I think this issue should be

resolved first: will the built in calendar component really fulfill your needs? For instance I

needed various state symbols, and could not figure out how to embed that in that calendar.

 

But in the previous version, without JS, I remember that I had issues with interpreting time,

and somehow ended up with storing time as a 5 character string, and date as MySQL "Date".

 

I do not remember the problems on the top of my head, but I had to avoid both Datetime

and Timestamp, to make things work the way I wanted.

post-980-0-40819400-1449871516_thumb.png

Posted

Hi,

 

Thanks for sharing you're information. I'll think i just start somewhere whith the

develop proces and see how far i can come but what i need is not so complex

as you build...looks good.

 

Maybe i will knock on you're door for some additional info if that's

not a problem?.

 

Regards Peter

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...