Skill Sprint NoSQL, MongoDB and FireDAC in Delphi, C++Builder and RAD Studio 10 Seattle
-
Upload
jim-mckeeth -
Category
Software
-
view
2.082 -
download
1
Transcript of Skill Sprint NoSQL, MongoDB and FireDAC in Delphi, C++Builder and RAD Studio 10 Seattle
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
EMBARCADERO TECHNOLOGIES
Tips Tricks Techniques
Intro to NoSQL with MongoDB and FireDAC
Download a free trial!embt.co/trialdownloads
Jim McKeeth, Developer Evangelist
Sept 15th, 2015
@JimMcKeeth
embt.co/sprint-nosql-mongodbBlog Notes:
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
This Skill Sprint Works with . . .
• Windows• OS X• Android• iOS• RAD Studio• Appmethod• Object Pascal• C++
• RAD Studio Seattle DocWiki• http://docwiki.embarcadero.com/RADStudio/Seattle/en/
• Appmethod Sept 2015 Release DocWiki• http://docwiki.appmethod.com/appmethod/1.17/topics/en/
• Appmethod supports the FireMonkey framework on all four platforms while RAD Studio, Delphi and C++Builder also support VCL on Windows. Contact sales with any questions!
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
What will be covered?• What is NoSQL• What is MongoDB• Basic MongoDB usage• FireDAC + MongoDB
• Learn more: CodeRage X• October 13-15, 2015 • TheCodeRage.com
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
What is NoSQL?
• Doesn’t use SQL • Uses a custom query language
• A “non-relational” database• Means different things to
different implementations• Favors speed & scalability over
features• Does not replace RDBMS
A concept, not a standard.
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
What is MongoDBMemcached
RDBMS
MongoDB
Scale+
Speed
Features
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
What is
• A document orientated database• Documents are represented as Name : Value
pairs in BSON format• Binary version of JSON or JavaScript Object
Notation (with some minor differences)• Embedded documents and arrays reduce
need for joins• Dynamic schemas – allows for unstructured
and complex data
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
MongoDB Document Example{ "firstName":"Jack", "secondName":"Jones", "age":30, "phoneNumbers":[ {fixedLine:"1234"}, {mobile:"5678"} ], "residentialAddress":{
lineOne:"…", lineTwo:"…", city:"…", state:"…", zip:"…", country:"…"
}}
• Names are in quotes• String values are in quotes• Separated by commas• Curley braces represent objects
• residentalAddress is an embedded object
• Square braces represent arrays• phoneNumbers is an array of objects
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
MongoDB Vocabulary
RDMS/SQLDatabase
TableRecord / Row
ColumnPrimary Key
IndexCursor
Schema
MongoDBDatabaseCollectionDocumentFieldPrimary KeyIndexCursorSchema
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
Other Notes
• All documents have an _id field• Collection exists when documents added• Documents within collection don’t need a consistent
schema, but typically are similar• Query language supports complex logic, including
regular expressions
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
MongoDB Installation
• Straight forward install • https://www.mongodb.org/downloads (32-bit & 64-bit)
• Setup environment – folder for database• Default is c:\data\db
• Start MongoDB: mongod.exe [options]• Or setup as a service . . .
• Tutorial• http://embt.co/install-mongodb-windows [MongoDB.org]• http://embt.co/connect-mongodb [DocWiki]
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
MongoDB Units & Components
• Units• FireDAC.Phys.MongoDB - Driver• FireDAC.Phys.MongoDBCli – Call Interface• FireDAC.Phys.MongoDBWrapper – Wrapping classes• FireDAC.Phys.MongoDBDef – Connection definition
• Components• TFDConnection – used to make the DB connection• TFDMongoQuery – Run queries to a collection• TFDMongoDataSet – Connects to a MongoDB cursor• TFDMongoPipeline – Execute pipelines to a collection
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
Low-Level MongoDB Classes
• Wrappers - FireDAC.Phys.MongoDBWrapper• TMongoConnection: manage connections• TMongoDatabase: manage a databases and users• TMongoCollection: represents a collection• TMongoCursor: fetches a result set document
• Fluent style builders• TMongoUpdate builder• TMongoSelector builder• TMongoInsert builder• TMongoIndex builder
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
DEMONSTRATIONTitle of Demo
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
Learning Resources
• MongoDB.org• http://embt.co/install-mongodb-windows• https://docs.mongodb.org/manual/core/crud-introduction/
• DocWiki - http://embt.co/connect-mongodb • Samples
• Object Pascal\Database\FireDAC\Samples\DBMS Specific\MongoDB• Books
• Instant MongoDB by Amol Nayak• MongoDB: The Definitive Guide by Kristina Chodorow
• CodeRage X - TheCodeRage.com – October 13th to 15th, 2015
Download a free trial!embt.co/trialdownloads
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
Next Time….
Delphi Anonymous Methods and C++ Lambdas – When to use them and not use themSee the full schedule and replays at embt.co/Sprints15
Tuesday, the 22nd of September, 2015– 6AM San Francisco / 9AM New York / 2PM London / 3PM Milan– 11AM San Francisco / 2PM New York / 7PM London / 8PM Milan– 5PM San Francisco / Wed 9AM Tokyo / Wed 10AM Sydney
Download a free trial!embt.co/trialdownloads
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
Special Offers
Seattle Early Bird
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
EMBARCADERO TECHNOLOGIES
Tips Tricks Techniques
embt.co/sprint-nosql-mongodb
Blog Notes:Download a free trial!embt.co/trialdownloads @JimMcKeeth
EMBARCADERO TECHNOLOGIES
embt.co/sprint-nosql-mongodbBlog Notes:
Learning Resources
• MongoDB.org• http://embt.co/install-mongodb-windows• https://docs.mongodb.org/manual/core/crud-introduction/
• DocWiki - http://embt.co/connect-mongodb • Samples
• Object Pascal\Database\FireDAC\Samples\DBMS Specific\MongoDB• Books
• Instant MongoDB by Amol Nayak• MongoDB: The Definitive Guide by Kristina Chodorow
• CodeRage X - TheCodeRage.com – October 13th to 15th, 2015
Download a free trial!embt.co/trialdownloads