NoSQL Guide & Sample

  • View
    562

  • Download
    5

Embed Size (px)

DESCRIPTION

NoSQL MongoDB install and sample

Text of NoSQL Guide & Sample

  • 1. NoSQL Guide & Sample S.O.Lab / OracleOn(Lee Sang On)14 1 8

2. NO SQL & Not Only SQL Oracle , MSSQL , MySQL , DB , H , DB : DB : , 14 1 8 3. NoSQL ? ? NoSQL 3 NoSQL , NoSQL & NoSQL , DB 14 1 8 4. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 5. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info 6. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info User_Info 7. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info User_Info Order_Detail_Info 8. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info User_Info Order_Detail_Info credit_info 9. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info User_Info Order_Detail_Info credit_info 10. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info User_Info Order_Detail_Info credit_info 11. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info User_Info Order_Detail_Info credit_info 12. NoSQL ? ? RDBMS . RDBMS DB SQL 90% RDBMS (?) : - - . ID: solab username: on Date: 2014-01-06 OrderNum: 201400123 item list 1. 20140111 / S / black / 2 / 3000$ 2. 20140112 / m / black / 1 / 7000$ 3. 20140113 / L / black / 3 / 5000$ Pay Method Card: Amex C.Number : 1234-123-1234 expiry: 04/201414 1 8 Order_Info User_Info Order_Detail_Info credit_info 13. SNS, Smart Device , , : 14 1 8 14. SNS, Smart Device , , : : 14 1 8 15. SNS, Smart Device , , : : - - 14 1 8 16. SNS, Smart Device , , : : - - 14 1 8 17. SNS, Smart Device , , : : - - - . - Oracle Grid, MSSQL2008 . - , .14 1 8 18. SNS, Smart Device , , : : - - - . - Oracle Grid, MSSQL2008 . - , .RDBMS . .14 1 8 19. NoSQL : 1990 RDBMS(Strozzi NoSQL) SQL . NOSQL , , , No 14 1 8 20. NoSQL : 1990 RDBMS(Strozzi NoSQL) SQL . NOSQL , , , No NoSQL 714 1 8 21. NoSQL : 1990 RDBMS(Strozzi NoSQL) SQL . NOSQL , , , No NoSQL 7 -, , , H,,DB,DB14 1 8 22. NoSQL 3 - (Key- value) - - . - - . - . - , DB - , DB 14 1 8 23. DataBase , ,, , , 14 1 8 24. DataBase , ,, , , 14 1 8 25. DataBase , ,, , , 14 1 8 26. DataBase , ,, , , / / { id:1, name:Martin billingAddress:[{city:Chicago}] }14 1 8 27. DataBase , ,, , , / / { id:1, name:Martin billingAddress:[{city:Chicago}] } / / { id:99, customerId:1, orderItems:[{ productId:27, price:32.45, productName:NoSQL Distilled }], shippingAddress:[{city:Chicago}], orderPayment:[{ ccinfo:10000-10000-10000-10000, txnId:abcdefg123fg, billingAddress:{city:Chicago} }], }14 1 8 28. DataBase . / / { id:1, name:Martin billingAddress:[{city:Chicago}] } / / { id:99, customerId:1, orderItems:[{ productId:27, price:32.45, productName:NoSQL Distilled }], shippingAddress:[{city:Chicago}], orderPayment:[{ ccinfo:10000-10000-10000-10000, txnId:abcdefg123fg, billingAddress:{city:Chicago} }], }14 1 8 29. DataBase . / / { customer: { id:1, name:Martin, billingAddress:[{city:Chicago}], / / orders:[{ { id:99, id:99, customerId:1, customerId:1, orderItems:[{ orderItems:[{ productId:27, productId:27, price:32.45, price:32.45, productName:NoSQL Distilled productName:NoSQL Distilled }], }], shippingAddress:[{city:Chicago}], shippingAddress:[{city:Chicago}], orderPayment:[{ orderPayment:[{ ccinfo:1000-1000-1000-1000, ccinfo:10000-10000-10000-10000, txnId:adfncer123df, txnId:abcdefg123fg, billingAddress:{city:Chicago} billingAddress:{city:Chicago} }], }], }] } } } / / { id:1, name:Martin billingAddress:[{city:Chicago}] }14 1 8 30. NoSQL , ..... - + - 2 DataBase DATA UPDATE DataBase . RDB .(RDBMS SQL) .(NoSQL) .(-)14 1 8 31. NoSQL & (replication) (sharding) - : - : - . , Master-slave, peer-to-peerA,BCA,B,C 14 1 8 D,E,F 32. (sharding) ? (server connection count reduce) NoSQL . (com.google.*****) A~D , E~G .... NoSQL DATABASE - . , DB ....14 1 8 33. Master-Slave() DATAA,B,C,D masterA,B,C,D slave -14 1 8 A,B,C,D slave . . 34. Peer-To-Peer() DATAA,B,C,D DATAmasterDATA A,B,C,DA,B,C,Dmastermaster- . - . - 14 1 8 35. Sharding + Master-SlaveA,BB,DmastermasterD-master& B-slaveA,DC,BB,Dslave14 1 8 Cslaveslave 36. Sharding + Peer-To_PeerA,B14 1 8 CD,B -A,CA,DC,B PTP 3 , 2 37. NoSQL - 2 (051-123-1234/0511231234) - (write-write conict) - ( ) - ( ) - ( :SVN,GIT) - 1 : ( ) - 2 : , 14 1 8 38. - 14 1 8 39. - .14 1 8 40. - . / / { customer: { id:1, name:Martin, billingAddress:[{city:Chicago}], orders:[{ id:99, customerId:1, orderItems:[{ productId:27, price:32.45, productName:NoSQL Distilled }], shippingAddress:[{city:Chicago}], orderPayment:[{ ccinfo:1000-1000-1000-1000, txnId:adfncer123df, billingAddress:{city:Chicago} }], }] } }14 1 8 41. - . / / { customer: { id:1, name:Martin, billingAddress:[{city:Chicago}], orders:[{ id:99, customerId:1, orderItems:[{ productId:27, price:32.45, productName:NoSQL Distilled }], shippingAddress:[{city:Chicago}], orderPayment:[{ ccinfo:1000-1000-1000-1000, txnId:adfncer123df, billingAddress:{city:Chicago} }], }] } }12 A . .....14 1 8 42. - ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~14 1 8 43. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~14 1 8 44. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~14 1 8 map 45. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~14 1 8 map 46. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~14 1 8 :{price:16000,quantity:8}map 47. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~14 1 8 :{price:16000,quantity:8} :{price:12000,quantity:4}map 48. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~14 1 8 :{price:16000,quantity:8} :{price:12000,quantity:4}map:{price:10000,quantity:2} 49. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~: price:16000,quantity:8 price:14000,quantity:7 price:20000,quantity:1014 1 8 :{price:16000,quantity:8} :{price:12000,quantity:4}map:{price:10000,quantity:2} 50. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~: price:16000,quantity:8 price:14000,quantity:7 price:20000,quantity:1014 1 8 :{price:16000,quantity:8} :{price:12000,quantity:4}map:{price:10000,quantity:2} 51. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~:{price:16000,quantity:8} :{price:12000,quantity:4}map: price:16000,quantity:8 price:14000,quantity:7 price:20000,quantity:1014 1 8 reduce:{price:10000,quantity:2} 52. - NoSQL ID:1001 customer:Ann Items : {,8,2000,16000}, {,4,3000,12000}, {,2,5000,10000}, ........ :~~~ : ~~~:{price:16000,quantity:8} :{price:12000,quantity:4}map:{price:10000,quantity:2}:: {price:50000,quantity:25}price:16000,quantity:8 price:14000,quantity:7 price:20000,quantity:1014 1 8 reduce 53. - : - : . - . - , .