Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MongoDB 101
Search
Leszek Krupiński
July 15, 2013
Programming
0
90
MongoDB 101
Wprowadzenie do dokumentowej bazy danych
Leszek Krupiński
July 15, 2013
Tweet
Share
More Decks by Leszek Krupiński
See All by Leszek Krupiński
So that the daemon won’t die
leafnode
2
390
Practical PHP7
leafnode
2
420
Dobrze posól swoje hasło
leafnode
0
81
Dobrze posól swoje hasło (z notatkami)
leafnode
0
70
PHPNG kontra HHVM
leafnode
0
79
PHPNG kontra HHVM (z notatkami)
leafnode
0
46
Ewolucja PHP: PHP 5.6, NG, PHP 7, HHVM
leafnode
2
280
Sculpin - Generowanie statycznych stron w PHP
leafnode
2
52
Skalowanie aplikacji PHP
leafnode
1
390
Other Decks in Programming
See All in Programming
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
Zoneless Testing
rainerhahnekamp
0
120
선언형 UI에서의 상태관리
l2hyunwoo
0
160
Go の GC の不得意な部分を克服したい
taiyow
3
780
Spatial Rendering for Apple Vision Pro
warrenm
0
100
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
Beyond ORM
77web
5
670
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Designing for humans not robots
tammielis
250
25k
Optimising Largest Contentful Paint
csswizardry
33
3k
How to train your dragon (web standard)
notwaldorf
88
5.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Unsuck your backbone
ammeep
669
57k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Visualization
eitanlees
146
15k
The Language of Interfaces
destraynor
154
24k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Transcript
MONGODB 101 Wprowadzenie do dokumentowej bazy danych PHPers.02 15 lipca
2013 Leszek Krupiński @leafnode Monday, July 15, 13
PODSTAWY NoSQL i dokumentowe bazy danych Monday, July 15, 13
MONGODB Baza dokumentowa, object store Monday, July 15, 13
REPLIKACJA I SHARDING OOTB Monday, July 15, 13
GEOSPATIAL INDEX Monday, July 15, 13
JSON BSON { _id : ObjectId("51d66af57d3afb7a973b00ab"), username : 'foo', firstName
: 'Jan', lastName : 'Kowalski', address : { street : 'Marszałkowska 12', city : 'Warszawa', zip : '00-950' } friends : [ 'janek', 'mirek', 'wiesiek' ] } Monday, July 15, 13
ZAPYTANIA CRUD Monday, July 15, 13
FIND Monday, July 15, 13
INSERT Monday, July 15, 13
UPDATE 3 sposoby na update Monday, July 15, 13
REMOVE Monday, July 15, 13
PROJEKTOWANIE SCHEMATU Schemaless != Nie planuj Monday, July 15, 13
MODEL RELACYJNY Monday, July 15, 13
MODEL DOKUMENTOWY { _id : ObjectId("51d66af57d3afb7a973b00ab"), author : 'janek', title
: 'Ciekawy post', body : 'Lorem Ipsum', date : ISODate("2012-12-19T20:10:56.920Z"), tags : [ 'lorem', 'testowe', 'z życia wzięte' ], comments : [ { author : 'Anonim', date : ISODate("2012-12-19T20:10:56.920Z"), body : 'Nuda!' }, { author : 'Zdzisiek', date : ISODate("2012-12-19T20:10:56.920Z"), body : 'Wcale nie nuda.' } ] } Monday, July 15, 13
GEOSPATIAL INDEX db.places.ensureIndex( { location: ‘2d’ } ) Monday, July
15, 13
db.places.find( { location: { $near: [ 52, 21 ] }
} ) Monday, July 15, 13
MONGODB I PHP pecl install mongo Monday, July 15, 13
DEMO Monday, July 15, 13
DOCTRINE DEMO Monday, July 15, 13
NOTKA $qb = $dm->createQueryBuilder('Application_Model_Entry') ->field('club.$id')->equals(new MongoId($club->getId())); Monday, July 15, 13