glendango Posted February 14, 2018 Share Posted February 14, 2018 Hi.. I have a database which works fine. I ve just started using google charts to make the results look better for the U.Experience. . The example tables are very basic like: Country Visits England 4 Usa 6 Brazil 3 I get all my results form where statements so I have no tables which actually count the entries and show them in a basic table like this. My question is : Should I be using where, count() etc statements to populate the charts or should I have mini tables in my schema that present the information neatly like the above or a counter next to the id of the user/country etc e.g. so I don't need to worry about statements in the chart code.... thx for reading. Link to comment Share on other sites More sharing options...
Barand Posted February 14, 2018 Share Posted February 14, 2018 A basic rule of relational database design is "do not store derived data such as counts or totals". You get them when required with a query. Link to comment Share on other sites More sharing options...
glendango Posted February 14, 2018 Author Share Posted February 14, 2018 thx , I thought so but needed to confirm for my own mind. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.