Apps POJOs ORM SQL / ResultSet JDBC RDBMS Storage Layer
Apps POJOs ORM SQL / ResultSet JDBC RDBMS Storage Layer
Apps POJOs ORM SQL / ResultSet JDBC RDBMS Storage Layer
Apps POJOs ORM SQL / ResultSet JDBC RDBMS Storage Layer
Apps POJOs ORM SQL / ResultSet JDBC RDBMS Storage Layer
Apps POJOs ORM SQL / ResultSet JDBC RDBMS Storage Layer
Apps POJOs ORM SQL / ResultSet JDBC RDBMS Storage Layer
Apps POJOs ORM SQL / ResultSet JDBC RDBMS $ $ Storage Layer $ Migration Approach $ Rewrite Approach
RDBMS MongoDB { } name: { last: "Dunham, first: Justin }, department : "Marketing", pets: [ dog, cat ], title : Manager", locationcode: NYC23, benefits : [ { type : "Health", plan : Plus" }, { type : "Dental", plan : "Standard, optin: true } ]
BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME INSERT INTO COLL BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME Select BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME.. Map bn = makename(first, LAST, MIDDLE); Collection.insert( { buyer_name, bn}); Collection.find(pred, { buyer_name :1}); { first: Buzz, last: Moschetti }
BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME BUYER_NICKNAME INSERT INTO COLL [prev + NICKNAME] Select BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME BUYER_NICKNAME. Map bn = makename(first, LAST, MIDDLE,NICKNAME); Collection.insert( { buyer_name, bn}); Collection.find(pred, { buyer_name :1}); NO change
BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME BUYER_NICKNAME SELLER_FIRST_NAME SELLER_LAST_NAME SELLER_MIDDLE_NAME SELLER_NICKNAME INSERT INTO COLL [prev + SELLER_FIRST_NAME, SELLER_LAST_NAME, SELLER.] Select BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME BUYER_NICKNAME SELLER_FIRST_NAME SELLER_LAST_NAME SELLER_MIDDLE_NAME SELLER_NICKNAME Map bn = makename(first, LAST, MIDDLE,NICKNAME); Map sn = makename(first, LAST, MIDDLE,NICKNAME); Collection.insert( { buyer_name, bn, seller_name : sn}); Collection.find(pred, { buyer_name :1, seller_name :1}); Easy change
BUYER_FIRST_NAME BUYER_LAST_NAME BUYER_MIDDLE_NAME BUYER_NICKNAME SELLER_FIRST_NAME SELLER_LAST_NAME SELLER_MIDDLE_NAME SELLER_NICKNAME LAWYER_FIRST_NAME LAWYER_LAST_NAME LAWYER_MIDDLE_NAME LAWYER_NICKNAME CLERK_FIRST_NAME CLERK_LAST_NAME CLERK_NICKNAME QUEUE_FIRST_NAME QUEUE_LAST_NAME 为所有的人名加一个称谓字段 What s a name? Did you find them all? QUEUE is not a name
Map bn = makename(first, LAST, MIDDLE,NICKNAME,TITLE); Map sn = makename(first, LAST, MIDDLE,NICKNAME,TITLE); Easy change Collec?on.insert({ buyer_name, bn, seller_name : sn}); Collec?on.find(pred, { buyer_name :1, seller_name :1}); NO change
$ head - 1 customers.json { "name": { "last": "Dunham", "first": "Jus?n" }, "department" : "Marke?ng", "pets": [ "dog", "cat" ], "hire": {"$date": "2012-12- 14T00:00:00Z"},"?tle" : "Manager", "loca?oncode": "NYC23", "benefits" : [ { "type":"health", "plan":"plus" }, { "type" : "Dental", "plan" : "Standard", "op?n": true }]} $ mongoimport - - db test - - collec8on customers drop < customers.json connected to: 127.0.0.1 2014-11- 26T08:36:47.509-0800 imported 1000 objects $ mongo MongoDB shell version: 2.6.5 connec?ng to: test Ø db.customers.findone() { "_id" : ObjectId("548f5c2da40d2829f0ed8be9"), "name" : { "last" : "Dunham, first" : "Jus?n }, "department" : "Marke?ng", "pets" : [ "dog "cat ], "hire" : ISODate("2012-12- 14T00:00:00Z"), "?tle" : "Manager", "loca?oncode" : "NYC23", "benefits" : [ { "type" : "Health", "plan" : "Plus" },{ "type" : "Dental", "plan" : "Standard", "op?n" : true } ] }
Source Database ETL
http://mongify.com/!
github.com/bryanreinero/firehose!
Apps Apps Apps Apps Apps Apps POJOs POJOs POJOs POJOs POJOs POJOs ORM DAL ORM DAL ORM DAL SQL / ResultSet MongoDB Drivers SQL / ResultSet MongoDB Drivers SQL / ResultSet MongoDB Drivers JDBC JDBC JDBC RDBMS RDBMS RDBMS
Apps Apps Apps POJOs ORM SQL / ResultSet JDBC DAL MongoDB Drivers POJOs ORM SQL / ResultSet JDBC DAL MongoDB Drivers POJOs ORM SQL / ResultSet JDBC DAL MongoDB Drivers RDBMS RDBMS RDBMS 暂停应用写入, 完成 MongoDB 同步 软件切换
Shepherd Apps Apps Low-level Shepherd 3 POJOs T 1 ORM SQL / ResultSet DAL 2 MongoDB Drivers POJOs DAL 4 MongoDB Drivers JDBC RDBMS
Pentaho KeAle hip://dev.mysql.com/doc/sakila/en/
FILM actor: category: [ ] language: INVENTORY film_id store_id Inventory_id STORE manager_id address:{ city: country: } CUSTOMER name: { first: last: } address:{ city: country: } RENTAL rental_id customer_id rental_date return_date inventory_id payment PAYMENT rental_id Amount Customer_id
PAYMENT customer_id rental_id amount payment_date last_update PAYMENT customer_id rental_id amount payment_date last_update
FILM?tle, category: [ ac?on ], language: english text: {?tle: descrip?on: } actor: [ { first: last: }]
PAYMENT customer_id rental_id amount payment_date last_update PAYMENT customer_id rental_id amount payment_date last_update
MongoDB 企业版 The best way to run MongoDB in your data center OpsManager 监控, 备份和恢复, 集群管理 技术 支持 24x7 线上 支持 开发 支持 Let s get you running 咨询服务性能调优, 疑难排解, 模式设计 培训服务 Get your teams up to speed.