Hi Devs,
The project I'm currently working on requires the use of CubeGrid.
The image below shows how I get the GUI to respond to the Database structure.

The code below shows the CubeGrid object (advancedCube) code that sets the all the columns, rows and data between the GUI & Database.
The issue with my approach currently is that I foresee there would be too many data to load (inefficient).
As demonstrated above, 8 rows is required to display the values at only Time 08:00 (In reality there are 31 rows by default).
If I needed to show all the values from Time 08:00 to Time 09:00 (1 hour difference) with an increment of 5 minutes, the amount of rows I need to produce in my Database would be:
31 x (60/5) = 372 rows of data for 1 hour.
From the calculation above, if I need to display data from 08:00 - 23:00 (15 hours difference), I would need to produce:
31 * [(60*15)/5] = 5,580 rows of data.
Doesn't seem like my higher-ups and clients will be happy with that many rows of data.
So they suggested that I alter my codes to match the database design below (I used paint to demonstrate):

Any ideas in how I could achieve this?
Regards,
Sam
==================
Environment Details
Google Chrome
SmartGwt 6.1p EE
==================
The project I'm currently working on requires the use of CubeGrid.
The image below shows how I get the GUI to respond to the Database structure.
The code below shows the CubeGrid object (advancedCube) code that sets the all the columns, rows and data between the GUI & Database.
Code:
ds = testVcmCubegridDs.getDataSource(); setDs(ds); ds.fetchData(null, new DSCallback () { @Override public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) { RecordList rl = dsResponse.getDataAsRecordList(); if (rl.isEmpty() == true) { rl.addList(preloadTime()); } advancedCube.setData(rl); [B] advancedCube.setColumnFacets("Date","Time"); advancedCube.setRowFacets("Header","Header2"); advancedCube.setValueProperty("Value"); advancedCube.setCellIdProperty("cellID"); [/B]
As demonstrated above, 8 rows is required to display the values at only Time 08:00 (In reality there are 31 rows by default).
If I needed to show all the values from Time 08:00 to Time 09:00 (1 hour difference) with an increment of 5 minutes, the amount of rows I need to produce in my Database would be:
31 x (60/5) = 372 rows of data for 1 hour.
From the calculation above, if I need to display data from 08:00 - 23:00 (15 hours difference), I would need to produce:
31 * [(60*15)/5] = 5,580 rows of data.
Doesn't seem like my higher-ups and clients will be happy with that many rows of data.
So they suggested that I alter my codes to match the database design below (I used paint to demonstrate):
Any ideas in how I could achieve this?
Regards,
Sam
==================
Environment Details
Google Chrome
SmartGwt 6.1p EE
==================
Comment