Hi, fairly new to databases in general but I think a graph database might
be the right type to go with. I would HUGELY appreciate any feedback even
it's only how to handle a specific issue I have.
At the casino I work for we have a list of names and to the right is
columns representing blocks of 20 minutes where each employee should be at
that point in time. Due to the dynamic nature of the workplace conditions
this schedule is maintained in real time, the bulk of updates are done in
20 minute intervals for the next 20 minute block coming up.
This can be time consuming and with all the information to juggle is quite
prone to human error with large staff counts. Would love to go digital for
error checking and assistive queries. This needs to be archived however,
with paper this was easy, I'm not sure how to approach this, would a single
graph database(with backups) be the right way to go?
Here is some basic data to work with before we factor in scheduling/time.
Employee
- ID Number
- Name
- Skills (Blackjack, Baccarat, Roulette, etc)
Table
- ID Number
- Skill/Type (Can only be one skill)
With this data would I have an Employee and a Table node that have "isA"
relationship edges mapping to actual employees or tables?
I imagine with the skills for the two types I would be best with a Skill
node and establish relationships like so?: Blackjack->isA->Skill,
Employee->hasSkill->Blackjack, Table->typeIs->Blackjack?
*TIME*
I find difficulty when I want this database to now work with a timeline.
I've come across the following suggestions for connecting nodes with time:
- Unix Epoch seems to be a common recommendation?
- Connecting nodes to a year/month/day graph?
- Lucene timeline? (I don't know much about this or how to work with it,
have seen some mention it)
And some cases with how time and data relate:
- Staff have varied days and start/end times from week to week, this
could be shift node with properties
{shiftStart,shiftEnd,actualStart,actualEnd}, staff may arrive late or get
sick during shift. Would this be the right way to link each shift to an
employee? Employee(node)->Shifts(groupNode)->Shift(node)
- Tables and Staff may have skill data modified, with archived data this
could be an issue, I think the solution is to have time property on the
relationship to the skill?
- We open and close tables throughout the day, each table has open/close
times for each day, this could change in a month depending on what
management wants, in addition the times are not strict, for various reasons
a manager may open or close tables during the shift. The open/closed status
of a table node may only be relevant for queries during the shift, which
confuses me as I'd want this for queries but for archiving with time it
might not make sense?
*POSSIBLE QUERIES*
*Note: Staff that are on shift are either on a break or on the floor
(assigned to a table), Skills have a major or minor type based on
difficulty to learn*
- What staff have been on the floor for 80 minutes or more? (They are
due for a break)
- What open tables can I assign this employee to based on their skillset?
- I need an employee that has Baccarat skill but is not already been
assigned to a Baccarat table.
- What employee(s) was on this table during this period of time?
- Where was this employee at this point in time?
- Who is on shift right now?
- How many staff on shift can deal Blackjack?
- How many staff have 3 major skills?
- What staff have had the Baccarat skill for at least 3 months?
These queries could also be sorted by alphabetical order or time, skill
etc. It's with queries that I have trouble deciding when to use a node or
add a property to a node. For an Employee they have a name and ID number,
if I wanted to find an employee by their ID number would it be better to
have that as a node of it's own? It would be more direct right, instead of
going through all employees for that unique ID number.
Based on all this information would a graph database be the right kind to
go with? Any tips for how to structure/model the data would be appreciated
especially when dealing with time. More than happy to be directed to
read/view an article/video or be provided with the right terms/keywords
that would help me figure this out. Cheers :)
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.