I am working on a feature where I need to store some data and I am not sure what should be my best option to store this data. I am sending data to some third party and want to show some part of that data internally in system dashboard.
Data is being calculated at run time and being sent to third party. Since the base data based on which I am creating data needed for third party can change down the line, I can not use same API to create data in the later stage so I am left with no option but to save it somewhere.
I am not sure what will be the best way to store some part of it. I have following options
- Store data in DB as json data and when need to show in dashboard , just fetch it and de serialize it.
- Create a new structure for this in DB and store it.
FYI: I am storing data being sent to third party as an XML for logging purpose but not sure if using same XML file at later stage is a good option ( a little doubtful about file system).
1 Answer 1
The guiding principle at work here is probably "if you ever need to run a query on the data, and not just display it in its native form, then the data needs to be first-class rows and columns, not some JSON stuffed into a single field."
-
I understand that, but there will never going to be any instance where some one needs to be query on this data. this is only for reference purposeUmesh Awasthi– Umesh Awasthi06/24/2016 00:35:47Commented Jun 24, 2016 at 0:35
-
Then it doesn't need to be first-class rows and columns then, does it?Robert Harvey– Robert Harvey06/24/2016 00:51:14Commented Jun 24, 2016 at 0:51
-
Question is what can be the best option for this? As I have to keep these records and show it on the dashboard, since this is not being used in any business calculation / search etc, I was not very inclined to create new DB structure for this.Umesh Awasthi– Umesh Awasthi06/24/2016 02:42:49Commented Jun 24, 2016 at 2:42
-
1
Explore related questions
See similar questions with these tags.