我打算將一些RDBMS表移動到NoSQL環境。我有不同的模塊和相關表格,如下所示。從MySQL遷移到Couchbase服務器(NoSQL)
1. General
News table
Trainings table
Knowledge table
2. Application_x
Clicks table
Crashes table
注意:這是一個示例方案
在這種情況下,這是我如何定義的NoSql(Couchbase server
)結構。如果這是錯誤的,請糾正我。
遷移的目的主要是爲了搜索。
{
"General":[
"news" : [{
"id" : "123",
"title" : "test title"
},
{
"id" : "345",
"title" : "test title 2"
}],
"trainings" :[{
"id" : "1",
"name" : "training 1"
},
{
"id" : "2",
"name" : "training 2"
}],
"knowledge" :[{
"id" : "1",
"categ" : "programming"
},
{
"id" : "2",
"categ" : "management"
}]
],
"Application_x": [
"clicks" : [{
"userid" : "1",
"area" : "1850",
},
{
"userid" : "2",
"area" : "258",
}],
"crashes" :[{
"userid" : "1",
"severity" : "1",
},
{
"userid" : "2",
"severity" : "8",
}]
]
}
如果我的方法不正確,有人能糾正我嗎?
在此先感謝, Tismon Varghese。