I'm new to graph databases (specifically OrientDB) and it looks really great but there are a lot of ways to skin the cat.
*>> I'd like to understand the best implementation method for implementing a simple example of logging query hits to a database and organizing the data by months.* *PROBLEM:* 1. store query string hits with the monthly count 2. quick update for the current month/year/string 3. query the whole thing any way imaginable In the RDBMS world this is one table with lots of table scanning, slightly improved with some smart indexing. As the record count get huge (which it would quickly) then this guy gets slow. *POSSIBLE GRAPH DATABASE IMPLEMENTATIONS* (in no particular order) 1. Unique Hash <https://lh3.googleusercontent.com/-j0OmA7dmUfM/VVj3mf_KbWI/AAAAAAAAAEA/Tq1SR9UmTgs/s1600/ODBQuestionEx3.jpg> *CREATE INDEX idxWebSearchLog ON WebSearchLog (Year, Month, str) > UNIQUE_HASH_INDEX* > [This is pretty much what the SQL guy in me would do. But wouldn't it be super quick to find records in a hash table, e.g. O(1) so updates would be smoking? Some queries will require table scans O(n) but that's the same as SQL.] 2. Pure Graph <https://lh3.googleusercontent.com/-0OZlinR2Zi4/VVj3vcbM8JI/AAAAAAAAAEI/N4POf_DTJ7k/s1600/ODBQuestionEx2.jpg> [It seems that updates would be quick because I can traverse rather quickly so that I'm only scanning smaller problem sets and I can also get to any data I need relatively quickly.] *** I will update with the correct query when I learn how to write it.* 3. LinkMap (as shown on OrientDB Wiki - 'Time Series Use Case' <http://orientdb.com/docs/last/orientdb.wiki/Time-series-use-case.html>) <https://lh3.googleusercontent.com/-MLbBMo4ZhGM/VVj3-Z9nepI/AAAAAAAAAEQ/bYrQzHGaCzA/s1600/ODBQuestionEx1.jpg> [It seems that this could be an improvement on #2 but how so? What if I wanted to evaluate the month by month popularity of the query "apples"? That would be slow, right?] > create class Yearcreate class Monthcreate class LogEntry > create property Year.month linkmap Monthcreate property Month.str linkmap > LogEntry > > select month[2].str["apples"] from Year where year = "2014" > ??? > > *>> My question is to (a) tell me the best option and (b) correct and/or explain how these examples preform CRUD operations and (c) use this example to explain more details about how OrientDB works internally.* *OR point me to somewhere that I can read about this --- the source code isn't really answering these questions and neither does the getting started book that's for sale.* -- --- You received this message because you are subscribed to the Google Groups "OrientDB" 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/d/optout.
