Depending on your needs you have the choice of three data aware components, DBTable, DBQuery and DBSimpleQuery. The first two are closely related as DBQuery is inherited from DBTable, and the only difference between the two is that DBTable requires a table name to function (for full Crud functionality) and DBQuery requires an SQL statement (and a Crud component for the CUD sql statements). DBTable and DBQuery can be bound to data aware form fields, using a Data source component. DBSimpleQuery is a component designed for use within your application. It is very usable for processing data as we will show you later.


DBQuery and DBSimpleQuery can use complex queries with joins and functions. Although DBQuery can be used in Crud design, it is mostly used for binding complex queries to data grids.


DBTable and DBQuery use a mechanism that is called ‘caching’. SQL datasets are not bidirectional by design, instead, after a query you get a sequential list of results. Some PDO drivers allow bidirectional cursors, but as PHsPeed is database independent we needed a different and uniform design. 

Bidirectional access is a requirement for many applications. If users select a certain row of data, they expect to be able to scroll forward or backward. In standard SQL this is not possible. 


All retrieved data is for that reason stored in a temporary sqlite database in the workarea of your project. This has advantages and disadvantages. Caching data makes design more complex and could make the application a bit slower. But the advantage is that for scrolling there is no need for re-querying the original database that can reside on a different server as well.