![]() | |
#11
| |||
| |||
|
|
"Bob Badour" <bbadour (AT) golden (DOT) net> wrote in message news:UYLKa.588$Sp2.78550140 (AT) mantis (DOT) golden.net... "Peter Koch Larsen" <pkl (AT) mailme (DOT) dk> wrote in message news:61c84197.0306261140.6454f73c (AT) posting (DOT) google.com... "Bob Badour" <bbadour (AT) golden (DOT) net> wrote in message news:<FPrKa.542$5O7.72062052 (AT) mantis (DOT) golden.net>... [snip] Back to the scheduling problem you propose, what granularity of schedule did you envision? I notice all the times are even hours. Is that just incidental? Or do you propose a calendar to schedule events on an hourly basis? Ideally, my belief is that the granularity should be arbitrarily small - this will make the solution applicable for other jinds of schedules as well. If you do choose a specific interval this should be allowed, but in that case I would expect some explanation as to why this specific interval was chosen. For the rest of your post allow me to return later. I don't think it makes sense to schedule rooms to the nanosecond. To the quarter-hour is probably as great a granularity as anyone would ever really use in practice and to the minute should provide a safe enough margin of over engineering. Ideally, the database layer should be able to handle any reasonable granularity and let the front end restrict it to whatever the policies are. |
#12
| |||
| |||
|
|
Bob Badour wrote: I think using types for this purpose is a slight overkill. It would be easy to add a 'day of week' and a 'day of week in month' column into materialised calendar and just use them in selection criterias. This would complicate queries too much. If one wants to see the events on thursday, one would have to query three or more columns instead of querying a single interval column. OK, maybe I am a bit to used to thinking in SQL. How would your solution look like, using types? Lauri |
#13
| |||
| |||
|
|
"Isaac Blank" <izblank (AT) yahoo (DOT) com> wrote "Bob Badour" <bbadour (AT) golden (DOT) net> wrote in message news:UYLKa.588$Sp2.78550140 (AT) mantis (DOT) golden.net... "Peter Koch Larsen" <pkl (AT) mailme (DOT) dk> wrote in message news:61c84197.0306261140.6454f73c (AT) posting (DOT) google.com... Ideally, my belief is that the granularity should be arbitrarily small - this will make the solution applicable for other jinds of schedules as well. If you do choose a specific interval this should be allowed, but in that case I would expect some explanation as to why this specific interval was chosen. I don't think it makes sense to schedule rooms to the nanosecond. To the quarter-hour is probably as great a granularity as anyone would ever really use in practice and to the minute should provide a safe enough margin of over engineering. Ideally, the database layer should be able to handle any reasonable granularity and let the front end restrict it to whatever the policies are. I explained above why 1 minute granularity is reasonable for scheduling rooms. Why do you think the dbms should ignore systemic constraints allowing applications to enforce them instead? That seems to contradict almost every principle of good database management. |
#14
| |||
| |||
|
|
"Bob Badour" <bbadour (AT) golden (DOT) net> wrote in message news:cd3b3cf.0306280919.7a6ab963 (AT) posting (DOT) google.com... "Isaac Blank" <izblank (AT) yahoo (DOT) com> wrote in message news:<HSZKa.761$Ks2.68590664 (AT) newssvr15 (DOT) news.prodigy.com>... "Bob Badour" <bbadour (AT) golden (DOT) net> wrote in message news:UYLKa.588$Sp2.78550140 (AT) mantis (DOT) golden.net... "Peter Koch Larsen" <pkl (AT) mailme (DOT) dk> wrote in message news:61c84197.0306261140.6454f73c (AT) posting (DOT) google.com... Ideally, my belief is that the granularity should be arbitrarily small - this will make the solution applicable for other jinds of schedules as well. If you do choose a specific interval this should be allowed, but in that case I would expect some explanation as to why this specific interval was chosen. I don't think it makes sense to schedule rooms to the nanosecond. To the quarter-hour is probably as great a granularity as anyone would ever really use in practice and to the minute should provide a safe enough margin of over engineering. Ideally, the database layer should be able to handle any reasonable granularity and let the front end restrict it to whatever the policies are. I explained above why 1 minute granularity is reasonable for scheduling rooms. Why do you think the dbms should ignore systemic constraints allowing applications to enforce them instead? That seems to contradict almost every principle of good database management. For one thing, Peter's reasoning does have its merit - you could easily re-use the same desiign and code for another scheduling application. |
|
Also, imposing this limitation would probably make the database design and code more complex than it should be. |
|
I can easily come up with a simple and fast database design using native SQL types for timestamps, but enforcing the granularity by means of appropriate database schema and constarints will be a little bit challenging. |
![]() |
| Thread Tools | |
| Display Modes | |
| |