Hello. As I'm a newbie, I would like to better learn use of databases.
Which is the best method to load a database, supposing I have about 4000-5000 rows that consist of 30 columns.
I don't know if it's better to load "Select * from table" and load all the objects into an array or it's better take row by row when constructing table (jface tableviewer in my case) .
I mean:
Form1:
select * from table
arraylist<movie> moviesList=new arraylist<movie>
iterate trough resultset filling movieslist
OR
Form2:
With tableviewer whenever it needs to be redraw:
tableviewer.setdata(xxx)
load a movieobject from the table
fill the item of the tableviewer.
The problem with form1 is memory comsumption, and the problem with form2 is when the list must be redraw can call this method a lot of times.
Do you know alternative ways of database loading. I know about chunks loading but I don't like because I don't know methods to do the replacement: less recent used, and so on...
Sorry for the question, I know it's a very newbie question, but I'm beginning and I don't know how real people load databases: all objects in a list, or when needed by the table.
Thanks!!!