开发者

Non Relational Database , Key Value or flat table

开发者 https://www.devze.com 2023-01-18 02:07 出处:网络
My application needs configurable columns , and titles of these columns get configured in the begining, If relation database I would have created generic columns in table like CodeA, CodeB etc for thi

My application needs configurable columns , and titles of these columns get configured in the begining, If relation database I would have created generic columns in table like CodeA, CodeB etc for this need because it helps queering on these columns (Code A = 11 ) it also helps in displaying the values (if that columns stores code and value) but now I am using Non Rela开发者_如何学编程tional database Datastore (and I am new to it), should I follow the same old approach or I should use collection (Key Value pair) type of structure .

There will be lot of filters on these columns. Please suggest


What you've just described is one of the classic scenarios for a Key-Value database. The limitation here is that you will not have many of the set-based tools you're used to.

Most of the K-V databases are really good at loading one "record" or small set thereof. However, they don't tend to be any good at loading anything that may require a join. Given that you're using AppEngine, you probably appreciate this limitation. But it's worth stating.

As an important note, not all K-V database will allow you to "select by any column". Many K-V stores actually only allow for selection by a primary key. If you take a look at MongoDB, you'll find that you can query any column which sounds like a necessary feature.


I would suggest using key/value pairs where keys will act as your column names and value will be their data.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号