cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query vs Data Table Component

I was wondering what is the best way to access a database.  We have a MySQL database on a web server and are running a local app accessing the data over the internet.  I was wondering what is the advantages and disadvantages of using SQL Queries vs Data Table Component.

In Delphi, you have components that allow you to access a database. You can use a query component and a table component.

The query component allows you to run SQL code to fetch data from the database. I imagine this data is then kept in local memory.

The table component opens up an active connection to a table in the database. In this case, I think you are working directly with the data on the server.

SimonBritto
Member
2 REPLIES 2

Hello,

I got an answer from Delphi programmers. About my assignment on TTable vs TQuery. And ORM frameworks may help you make this almost automatic.

 

 

https://theessayservice.org/buy-term-paper/ view my assignment

papaleo
Member

@myloweslife wrote:

I was wondering what is the best way to access a database.  We have a MySQL database on a web server and are running a local app accessing the data over the internet.  I was wondering what is the advantages and disadvantages of using SQL Queries vs Data Table Component.

In Delphi, you have components that allow you to access a database. You can use a query component and a table component.

The query component allows you to run SQL code to fetch data from the database. I imagine this data is then kept in local memory.

The table component opens up an active connection to a table in the database. In this case, I think you are working directly with the data on the server.


It's a spectrum, it's not just split into basic and advanced.

Generally I would say with any topic you get into advanced when questions stop being Boolean and are about weighing up the options. Things like performance tuning, indexing, maintainance ect

 
Carroll888
Member