Successfully reported this slideshow.
Your SlideShare is downloading. ×

FireDAC Local SQL Skill Sprint

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 13 Ad

FireDAC Local SQL Skill Sprint

Download to read offline

The TFDLocalSQL component creates a local SQL engine that allows SQL queries (CRUD & DML) across local DataSets. Works with TFDMemTable or any TDataSet descendant.

More information: http://delphi.org/?p=1951

The TFDLocalSQL component creates a local SQL engine that allows SQL queries (CRUD & DML) across local DataSets. Works with TFDMemTable or any TDataSet descendant.

More information: http://delphi.org/?p=1951

Advertisement
Advertisement

More Related Content

Advertisement

Recently uploaded (20)

FireDAC Local SQL Skill Sprint

  1. 1. EMBARCADERO  TECHNOLOGIESEMBARCADERO  TECHNOLOGIES FireDAC:  Local  SQL Jim  McKeeth   Lead  World  Wide  Developer  Evangelist  /  Engineer   jim.mckeeth@embarcadero.com   @JimMcKeeth  /  JimMcKeeth  /  Delphi.org   March  19th,  2015
  2. 2. EMBARCADERO  TECHNOLOGIES This  Skill  Sprint  Works  with  .  .  . • Windows   • Mac  OS  X   • Android   • iOS   • RAD  Studio   • Appmethod   • Object  Pascal   • C++ • RAD  Studio  XE7  DocWiki   – http://embt.co/latestdocwiki     – http://docwiki.embarcadero.com/RADStudio/en/     • Appmethod  September  2014  DocWiki   – http://embt.co/AppmethodTopics     – http://docwiki.appmethod.com/appmethod/topics/en/   • Appmethod  supports  the  FireMonkey   framework  on  all  4  platforms  while  RAD  Studio,   Delphi  and  C++Builder  also  support  VCL  on   Windows.  Contact  sales  with  any  questions!
  3. 3. EMBARCADERO  TECHNOLOGIES FireDAC’s  TFDLocalSQL  for  Local  SQL • Run  SQL  queries  locally  on  TDataSet  descendants.   • Works  for  any  TDataSet  descendants.   • Simplify  code  with  SQL  instead  of  spinning  through   records.   • Join  queries  between  heterogeneous  data  sources.   • Supports  the  INSERT/UPDATE/DELETE  SQL  commands   as  transactions  and  savepoints.
  4. 4. EMBARCADERO  TECHNOLOGIES Some  Possible  Uses • Heterogeneous  queries  (Queryable  datasets  have  result  sets   from  different  DBs).   • In-­‐memory  database  (TFDMemTables  serving  as  the  datasets).   • Advanced  offline  mode  (While  main  DB  is  not  accessible,  an   application  is  still  able  to  perform  the  SQL  queries  locally.)   • Advanced  DataSnap  client  (the  data  delivered  by  the  DataSnap   driver  to  the  client  can  be  queried  locally).   • Simplified  migration.  (Use  3rd-­‐party  TDataSet  objects  in  an   application,  and  use  FireDAC  API  to  work  with  these  data   sources.)4
  5. 5. EMBARCADERO  TECHNOLOGIES Unsupported  SQL  and  Alternatives • ALTER  TABLE  ...  ADD  COLUMN  -­‐  Instead,  change  the   structure  via  the  DataSet.   • DROP  TABLE  -­‐  When  a  dataset  is  unlinked  from  the  Local   SQL  engine,  it  is  automatically  dropped  (not  freed).   • CREATE  INDEX  /  DROP  INDEX  -­‐  Instead  of  the  SQL   indexes,  use  the  DataSet  indexes.   • CREATE  TRIGGER  /  DROP  TRIGGER  -­‐  Instead  of  the   triggers,  use  the  DataSet  events. 5
  6. 6. EMBARCADERO  TECHNOLOGIES Local  SQL  Components 6 TDataSet   Descendant TDataSet   Descendant TDataSet   Descendant TFDConnection   w/  SQLite  driver TFDGUIxWaitCursor   (Wait  Cursor) TFDLocalSQL TFDQuery   or  TFDCommand Connection DataSets Activate  2nd Activate  1st Activate  3rd
  7. 7. EMBARCADERO  TECHNOLOGIES DEMONSTRATION TFDLocalSQL
  8. 8. EMBARCADERO  TECHNOLOGIES TFDLocalSQL  Summary • Works  with  any  TDataSet  descendent.   • Supports  DML/CRUD,  but  no  DDL.   • Supports  Transactions  and  SavePoints.   • Uses  SQLite  internally.   • Query  across  multiple  heterogeneous  DataSets.
  9. 9. EMBARCADERO  TECHNOLOGIES TFDLocalSQL  Resources • Samples   – C:UsersPublicDocumentsEmbarcaderoStudio15.0Samples
 Object  PascalDatabaseFireDACSamplesComp  LayerTFDLocalSQL   • DocWiki   – http://docwiki.embarcadero.com/RADStudio/en/Local_SQL_(FireDAC)     – http://docwiki.embarcadero.com/Libraries/en/FireDAC.Phys.SQLiteVDataSet.TFDLocalSQL     • Blog  Posts   – Dmitry  Arefiev   – FireDAC  Local  SQL  video:  https://youtu.be/QA-­‐xhfYoEq4   – CodeRage  9:  FireDAC  Tips,  Tricks  and  News:  http://youtu.be/gljfudAKlTI       – Jens  Fudge’s  Local  SQL  video:  https://youtu.be/fJsmKiUz6VU     – All  these  links  and  more:  http://delphi.org/?p=1951   https://commons.wikimedia.org/wiki/File:Iceberg.jpg  
  10. 10. EMBARCADERO  TECHNOLOGIES Next  Time…. • Preview:  Box2D   • Sneak  peak  from  a  future  release   • Cross  platform  2D  physics  engine   • Tuesday  the  24th  of  March   – 6AM  San  Francisco  /  9AM  New  York  /  1PM  London  /  2PM  Milan  /  13  UTC   – 11AM  San  Francisco  /  2PM  New  York  /  6PM  London  /  7PM  Milan  /  18  UTC   – 5PM  San  Francisco  /  Wed  9AM  Tokyo  /  Wed  11AM  Sydney  /  0  UTC Sign-­‐up:  http://www.embarcadero.com/landing-­‐pages/skill-­‐sprints  
  11. 11. EMBARCADERO  TECHNOLOGIES Next  Time…. • FireDAC:  BDE  to  InterBase  Migration   • Paradox  and  BDE  are  Deprecated   • Take  advantage  of  new  FireDAC  and  InterBase  features   • Thursday  the  26th  of  March   – 6AM  San  Francisco  /  9AM  New  York  /  1PM  London  /  2PM  Milan  /  13  UTC   – 11AM  San  Francisco  /  2PM  New  York  /  6PM  London  /  7PM  Milan  /  18  UTC   – 5PM  San  Francisco  /  Fri  9AM  Tokyo  /  Fri  11AM  Sydney  /  0  UTC Sign-­‐up:  http://www.embarcadero.com/landing-­‐pages/skill-­‐sprints     (2nd  sign-­‐up  on  the  left)
  12. 12. EMBARCADERO  TECHNOLOGIES RAD  Studio  Special  Offers More  details  http://www.embarcadero.com/radoffer March  31,  2015 All  expire
  13. 13. EMBARCADERO  TECHNOLOGIESEMBARCADERO  TECHNOLOGIES Q  &  A   @EmbarcaderoTech Special  offers:  http://embarcadero.com/radoffer/  

×