久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='ZISvk'></bdo><ul id='ZISvk'></ul>
<legend id='ZISvk'><style id='ZISvk'><dir id='ZISvk'><q id='ZISvk'></q></dir></style></legend>

    1. <tfoot id='ZISvk'></tfoot>
      <i id='ZISvk'><tr id='ZISvk'><dt id='ZISvk'><q id='ZISvk'><span id='ZISvk'><b id='ZISvk'><form id='ZISvk'><ins id='ZISvk'></ins><ul id='ZISvk'></ul><sub id='ZISvk'></sub></form><legend id='ZISvk'></legend><bdo id='ZISvk'><pre id='ZISvk'><center id='ZISvk'></center></pre></bdo></b><th id='ZISvk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZISvk'><tfoot id='ZISvk'></tfoot><dl id='ZISvk'><fieldset id='ZISvk'></fieldset></dl></div>

      <small id='ZISvk'></small><noframes id='ZISvk'>

      1. 是否有任何用于 NoSQL 數(shù)據(jù)庫架構(gòu)遷移的工具?

        Are there any tools for schema migration for NoSQL databases?(是否有任何用于 NoSQL 數(shù)據(jù)庫架構(gòu)遷移的工具?)
        <i id='OCXMH'><tr id='OCXMH'><dt id='OCXMH'><q id='OCXMH'><span id='OCXMH'><b id='OCXMH'><form id='OCXMH'><ins id='OCXMH'></ins><ul id='OCXMH'></ul><sub id='OCXMH'></sub></form><legend id='OCXMH'></legend><bdo id='OCXMH'><pre id='OCXMH'><center id='OCXMH'></center></pre></bdo></b><th id='OCXMH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='OCXMH'><tfoot id='OCXMH'></tfoot><dl id='OCXMH'><fieldset id='OCXMH'></fieldset></dl></div>

        1. <legend id='OCXMH'><style id='OCXMH'><dir id='OCXMH'><q id='OCXMH'></q></dir></style></legend>
            <bdo id='OCXMH'></bdo><ul id='OCXMH'></ul>

              <tfoot id='OCXMH'></tfoot>
                  <tbody id='OCXMH'></tbody>

                <small id='OCXMH'></small><noframes id='OCXMH'>

                • 本文介紹了是否有任何用于 NoSQL 數(shù)據(jù)庫架構(gòu)遷移的工具?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在尋找一種為 MongoDB 或 CouchDB 等數(shù)據(jù)庫自動(dòng)遷移架構(gòu)的方法.

                  I'm looking a way to automate schema migration for such databases like MongoDB or CouchDB.

                  這個(gè)工具最好是用python寫的,其他任何語言都可以.

                  Preferably, this instument should be written in python, but any other language is ok.

                  推薦答案

                  由于 nosql 數(shù)據(jù)庫可以包含大量數(shù)據(jù),因此您無法在常規(guī) rdbms 中遷移它.實(shí)際上,一旦您的數(shù)據(jù)超過某個(gè)大小閾值,您就無法為 rdbms 執(zhí)行此操作.讓您的網(wǎng)站停工一天以將字段添加到現(xiàn)有表是不切實(shí)際的,因此使用 rdbms 您最終會做丑陋的補(bǔ)丁,例如僅為該字段添加新表并進(jìn)行連接以獲取數(shù)據(jù).在 nosql 世界中你可以做幾件事.

                  Since a nosql database can contain huge amounts of data you can not migrate it in the regular rdbms sence. Actually you can't do it for rdbms as well as soon as your data passes some size threshold. It is impractical to bring your site down for a day to add a field to an existing table, and so with rdbms you end up doing ugly patches like adding new tables just for the field and doing joins to get to the data. In nosql world you can do several things.

                  • 正如其他人建議的那樣,您可以編寫代碼,以便處理可能架構(gòu)的不同版本".這通常比看起來更簡單.許多類型的模式更改對代碼來說都是微不足道的.例如,如果您想向架構(gòu)中添加一個(gè)新字段,您只需將其添加到所有新記錄中,所有舊記錄上它都將為空(您不會收到字段不存在"錯(cuò)誤或任何內(nèi)容;).如果您需要舊記錄中的字段的默認(rèn)"值,則在代碼中太簡單了.
                  • 另一個(gè)選項(xiàng),實(shí)際上唯一明智的選擇是在字段重命名和結(jié)構(gòu)更改等非平凡的架構(gòu)更改中存儲 schema_version 在每個(gè)記錄中,并使用代碼將數(shù)據(jù)從任何版本遷移到 上的下一個(gè)版本閱讀.即,如果您當(dāng)前的架構(gòu)版本是 10,并且您從數(shù)據(jù)庫中讀取版本為 7 的記錄,那么您的數(shù)據(jù)庫層應(yīng)該調(diào)用 migrate_8、migrate_9 和 migrate_10.這樣訪問的數(shù)據(jù)會逐漸遷移到新版本.如果它沒有被訪問,那么誰在乎它是哪個(gè)版本;)
                  • As others suggested you can write your code so that it will handle different 'versions' of the possible schema. this is usually simpler then it looks. Many kinds of schema changes are trivial to code around. for example if you want to add a new field to the schema, you just add it to all new records and it will be empty on the all old records (you will not get "field doesn't exist" errors or anything ;). if you need a 'default' value for the field in the old records it is too trivially done in code.
                  • Another option and actually the only sane option going forward with non-trivial schema changes like field renames and structural changes is to store schema_version in EACH record, and to have code to migrate data from any version to the next on READ. i.e. if your current schema version is 10 and you read a record from the database with the version of 7, then your db layer should call migrate_8, migrate_9, and migrate_10. This way the data that is accessed will be gradually migrated to the new version. and if it is not accessed, then who cares which version is it;)

                  這篇關(guān)于是否有任何用于 NoSQL 數(shù)據(jù)庫架構(gòu)遷移的工具?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個(gè)模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點(diǎn)包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復(fù)導(dǎo)入頂級名稱的情況下構(gòu)造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發(fā)帶有已編譯動(dòng)態(tài)共享庫的 Python 包)
                      <tbody id='zVt7d'></tbody>
                      <i id='zVt7d'><tr id='zVt7d'><dt id='zVt7d'><q id='zVt7d'><span id='zVt7d'><b id='zVt7d'><form id='zVt7d'><ins id='zVt7d'></ins><ul id='zVt7d'></ul><sub id='zVt7d'></sub></form><legend id='zVt7d'></legend><bdo id='zVt7d'><pre id='zVt7d'><center id='zVt7d'></center></pre></bdo></b><th id='zVt7d'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zVt7d'><tfoot id='zVt7d'></tfoot><dl id='zVt7d'><fieldset id='zVt7d'></fieldset></dl></div>

                      <tfoot id='zVt7d'></tfoot>

                      <small id='zVt7d'></small><noframes id='zVt7d'>

                          <bdo id='zVt7d'></bdo><ul id='zVt7d'></ul>
                          1. <legend id='zVt7d'><style id='zVt7d'><dir id='zVt7d'><q id='zVt7d'></q></dir></style></legend>
                            主站蜘蛛池模板: 国产欧美日韩一区 | 国产精品视频在线观看 | 久久久久久久久国产精品 | 超碰97免费 | 精品欧美一区二区三区精品久久 | 在线第一页 | 欧美一区二不卡视频 | 欧美精品成人一区二区三区四区 | 精品视频一区二区三区 | 亚洲精品黄色 | 亚洲自拍偷拍视频 | 欧美日一区二区 | 久久成人国产 | 欧美日韩在线视频一区 | 精品国产欧美一区二区 | 夜夜精品浪潮av一区二区三区 | 国产亚洲精品久久午夜玫瑰园 | 在线国产欧美 | 国产欧美精品一区二区 | 国产精品黄色 | 亚洲女优在线播放 | 久久专区| 国产精品国产成人国产三级 | 日韩不卡视频在线观看 | av影音资源| 国内精品久久久久 | 精品久久1 | 国产视频一二三区 | 天天躁人人躁人人躁狂躁 | 丝袜 亚洲 欧美 日韩 综合 | 亚洲小视频在线观看 | 久久精品久久精品久久精品 | 日本一区二区三区免费观看 | 91 久久 | 亚洲精品乱码久久久久久黑人 | 欧美日韩高清免费 | 91视频在线 | 91天堂 | 96国产精品久久久久aⅴ四区 | 女人牲交视频一级毛片 | 亚洲精品久 |