From the course: Code Clinic: JavaScript

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Accessing the MySQL database

Accessing the MySQL database - JavaScript Tutorial

From the course: Code Clinic: JavaScript

Start my 1-month free trial

Accessing the MySQL database

- [Instructor] So the bad news is that Java Script isn't designed to hold large amounts of data because what happens is that it gets processed by your browser every time you make a connection to a website. So if you tried, for example, to access 20 megabytes of data what would happen most likely is that your browser will crash and that's not a good experience. So what we need to do is find a way of accessing a portion of the data, just a portion of the data that we need, in this case the barometric pressure as well as the dates. We're gonna return it in this JSON format that we can feed into our Java Script so that we can process and even graph the data. So the reason why all this data is in this particular format is because it's a little bit friendly to the charting application that I'm using which is C3 and that's the only reason why it's formatted like this. So you can see that it is a Java Script object or actually a JSON object and we're returning the barometric pressure as an…

Contents