I'm designing a nosql database with hbase and phoenix, and i was thinking of 
making a composite primary key in this form.

HbaseRowKey (path_id,sensor_id,date) and C.Value ( Column Family).

my path_id will be composed like this : R1#P1#C1#B2.

and i was thinking with a SQL request without knowning R1 and P1 and C1 can i 
get all Rows with path_id containing B2 with a substring ? will it be very 
costly in Phoenix ?
To be more specific this is an iot project and we have use cases like this :

Root ---> Project 1 --> Cluster 1 ---> Cluser 2 -->  Building 1 -->  Sensor 1
Root ---> Project 2-->  Building 1 -->  Sensor 1
Root ---> Building 3 -->  Sensor 1
Root ---> Floor 3 -->  Sensor 1

I May have growing new type of nodes, that's why I want something flexible in 
my composite primary Key , R1 will be the root id, P1 the project with ID 1 etc 
..

So I have requests like getting all sensors data of building with ID 1  with 
this kind of conception do you think it's a costly method ?

I have thought of neo4j but I like the easy of use of phoenix with SQL, also 
it's free of use and open source .

Thank you for your help

Reply via email to