AlaSQL / alasql

AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
http://alasql.org
MIT License
7.01k stars 649 forks source link

AlaSQL and OrientDB: Time series and Chase #193

Open wuxianliang opened 9 years ago

wuxianliang commented 9 years ago

Multi-Model at Front End

We usually store the data of stocks in tables, so there are many tables for different time scales and different terms. When we explore the meaning of the data, clearly we did not do "JOIN" in our brains, and we need to "visualize" the data for thinking and converting the "thinking" to query statements.

Data (tables) --> Events / Status (tree) --> Causality (graphs)

Tables are good for computer, trees and graphs are good for human brains. So we need multi-model not only for performance but also for simplicity in mind.

OrientDB has a use case of time series in documents http://orientdb.com/docs/last/orientdb.wiki/Time-series-use-case.html There is a presentation, even better http://www.slideshare.net/LuigiDellAquila/orientdb-time-representation

@luigidellaquila Would you like to update the documents with more details of query statements about Time Series and Chase? It would be definitely helpful to develop AlaSQL for compatibility with OrientDB.

wuxianliang commented 9 years ago

I start to code a project for analyzing Chinese Stock Market. I will update more details for helping.

agershun commented 9 years ago

Thank you! I will read and think...

luigidellaquila commented 9 years ago

Hi @wuxianliang

thank you for your interest in OrientDB and in my presentations! Unfortunately I do not have an archive of examples for this, so I have to collect them. I'll be back shortly (I hope) with something ;-)

Luigi

wuxianliang commented 9 years ago

@luigidellaquila Thank you very much!

wuxianliang commented 9 years ago

@luigidellaquila @Ivca Please give me a hand! How to define concrete linkmap after "CREATE PROPERTY Year.month LINKMAP Month" in studio and SQL? I have found many people (newbies) asked this question for years, but never found a complete answer with SQLs. The use case of Time series is far more difficult to follow. It costs me a whole day to struggle. If one day I understand the whole story, I will write another one.

luigidellaquila commented 9 years ago

Hi Xianliang,

to create concrete linkmaps you can use UPDATE PUT statement like following

UPDATE Year PUT month = "1", #15:0 UPDATE Year PUT month = "2", #15:1

assuming that #15:0 refers to the month of January of that year, #15:1 to February and so on.

2015-05-31 19:07 GMT+02:00 Xianliang Wu notifications@github.com:

@luigidellaquila https://github.com/luigidellaquila @Ivca https://github.com/Ivca Please give me a hand! How to define concrete linkmap after "CREATE PROPERTY Year.month LINKMAP Month" in studio and SQL? I have found many people (newbies) asked this question for years, but never found a complete answer with SQLs. The use case of Time series is far more difficult to follow. It costs me a whole day to struggle. If one day I understand the whole story, I will write another one.

— Reply to this email directly or view it on GitHub https://github.com/agershun/alasql/issues/193#issuecomment-107224807.

wuxianliang commented 9 years ago

Thank you very much! I will write something on this topic.

mathiasrw commented 9 years ago

Hi @wuxianliang did you ever write anything about this topic?

wuxianliang commented 9 years ago

Hi @mathiasrw No, I have not yet. But I am trying to this month or just produce a demo and wait to see other's writing, there is a contributor in Google forum who know this topic very well. https://groups.google.com/forum/#!topic/orient-database/FKlMBdxmwZ8

mathiasrw commented 9 years ago

:+1: