What will the best strategy to match overlapping date and time of two persons timings in no SQL database

64 views Asked by At

What will the best strategy to match date and time of two persons timings. Like one person is free from

15th june 2015 9:00 to 05: PM

16th june 2015 10:00 to 06: PM

17th june 2015 9:00 to 05: PM

and second person free timings are

15th june 2015 8:00 to 04:00 PM

16th june 2015 10:00 to 06:00 PM

17th june 2015 9:00 to 02:00 PM

how to save them in jdo at google app engine datastore so that it will take less time and read operations to query. currently i am using a method which is taking approx 1,500 read operations for one query. please help.

my jdo structure is

private String id;
private String name;
private userKey; (Foreign key from user table.)
private String designation;
private Set<Long> timing; // it has timing for 15 min interval [201506150800, 201506150815, 201506150830...]

while query i have to find which employee has overlapping timing with my timing. Like i am free from 7:00 9:00 on 15th June 2015 so i can book appointment with one of them.

0

There are 0 answers