mierlp Posted December 10, 2015 Share Posted December 10, 2015 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/namesstored in the table ROOMS? Regards Peter Quote Link to comment Share on other sites More sharing options...
Ron Posted December 11, 2015 Share Posted December 11, 2015 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. Quote Link to comment Share on other sites More sharing options...
mierlp Posted December 12, 2015 Author Share Posted December 12, 2015 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 Quote Link to comment Share on other sites More sharing options...
Ron Posted December 14, 2015 Share Posted December 14, 2015 Hi Peter, sure - just PM me and I will see what I can do Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.