 Okay, so NoSQL. Some say NoSQL is not just SQL. It is more than SQL. I have a chance to talk to one of the developers, well actually not developers, they are partners, and I talked to him about our NoSQL support in MySQL. So he turned around and asked his developers, can we do this in MongoDB already? You know, like storing these NoSQL data types in MongoDB. So now let me just first start to say this talk is not about when or why you should use NoSQL or SQL, and why MySQL or NoSQL is better than MongoDB or MongoDB is better than MySQL. But I want to tell you today is how we support NoSQL native in MySQL, and how can you combine the NoSQL with SQL that we know in MySQL. Okay, and then I will propose to you a few interesting use cases that I think is useful if you use MySQL to do NoSQL. Okay, so back to the story. So the developers or the architects say, well if you already know all the requirements and you know how to design the data using relational model, then MySQL is the way to go. But if you don't have all the requirement, but you want to get started, and NoSQL is the right choice. Why? So first of all, definition. NoSQL is more or less equivalent to JSON or JSON. I like to say JSON because I like JSON born. So I say JSON. So it's a JavaScript object notation. It's a mouthful. It's similar to XML, right? Extended markup language. What it is? It's just a text file where you surround the data with description. And JSON has been, I'll say people ditch XML because it's very, very heavy. The payload is very high, right? So if you use XML to change data over the network, the passing of the XML take time, right? And then that's why people use JSON because it's relatively simple and it's very easy to use if you use JavaScript or Node.js. And yeah, that's what it is, right? JSON. And the power of JSON is really, it's designed for developers. It's in developer's hand, right? They develop application using the language they want, right? Whether it's PHP, Python, or JavaScript, right? They write data and then store it into whichever, right? Database or whatever. And when they develop application, if you don't have all the requirements, for example, a marketing tracking application where you want to create a promotion, say I have a promotion on iPhone X and I want to publish on the website. And you want to track visitor to the website, you know, the phone they're using, the promotion that they're interested, the click on the link. Do you want to track all this? Perhaps in the initial release, you want to track three, four parameters and you store those in the JSON document. And subsequently you found out that, hey, I forgot, I want to track where they refer from, right? Where do they get this link from? Because if you promote the event to other website, you want to also track that as well. So that's when you would want to add more view into the JSON document. And it's very flexible. Developer can just add that in the application without having DVA to add one more view into the database if you are using JSON. And that's why developer like JSON, right? They don't have to rely on DVA, hey, DVA, can you add one more view because I forgot, right? When I first designed the application. So in summary, this is how the different view from different people, right? So from DVA point of view, I mean, Ivan and I, Ivan and me, look at data this way. Relationship. A country would have many languages, right? That they speak, right? In Thai, Thai language, maybe English. And then you have Indian, whichever, right? So it's, but the primary language is Thai. But you have one to many relationship. And you also have many city. So typically, traditionally, we design data based on using ER diagram, right? Entity relationship diagram. It's all about relationship. So you've got to have all the requirements before you can design the whole data model, right? And sometimes you don't really have the luxury, right? Especially now, digital transformation. Requirement comes in very, very fast, right? So the moment you roll out your first releases, your competitor already, oh, this guy is doing this way. Let me have another new feature. So you are constantly trying to keep up, adding features, adding requirement to application. And you cannot, you don't know what you need to add, right? So to be more flexible, agile, you use JSON, right? Because you can store anything that you want. So Noah Ski also means no structure, right? No schema. You store anything that you want. It's in the hand of the developers. So in another view, it's columns and rows in relational, right? Traditionally, MySQL allows you to do this. But whereas in the JSON way is you design your JSON structure and then similar document will be grouped into collection. So if you look at the database relational way and the NoSQL way, collection is similar to database, right? This document is similar to rows, right? Collections of many documents, tables of many rows, right? So columns, it just structure. It's a key, you know, key. So each one of the JSON document is key and value. So each key identify, it has a value to identify the document. So there's a name, key, there's a date, and so on. And because you don't have structure, you don't have schema, you do whatever you want, right? And in MySQL, we support JSON document natively as a data type called JSON, right? So you have your application, you use the API of your choice, send a crud with the request, create, retrieve, update, delete, and work with JSON document. And then, you know, whichever function, find, delete, update, it will provide you, send you the JSON document, right? And internally, we actually have designed a new protocol called XProtocol on top of our traditional client server protocol to enable, you know, the JSON support. And a developer API is called Xdef API, which allows you to support the multiple languages, Python, Java, and so on, right? And this is enabled by installing XPlugin to MySQL to enable you to work with JSON document natively, okay? So in summary, these are all the component, right? XPlugin, the XProtocol, which is based on the Google proto buff technology. The reason that we chose this because this is extensible will allow us to add more new features into this protocol in the future. And in ODB cluster, we leverage, you know, like what Ivan just explained, that all this work with in ODB cluster. So you can build a very robust in ODB clusters that serve your JSON document. Xdef API, MySQL shell is for you to interactively test out the JSON API or JSON document with API of the choice, Python, JavaScript, or SQL. And the connector, we choose hand in hand with the application, right? So let's take a look at how you could use JSON natively in MySQL. So this is a create table. We just have a column called JSON, and that's it. So you could store JSON into the employee table. And this is how you would insert a JSON document into the table. I'm going to do a select astrid and it'll give you all the JSON document. This is how simple it is. Okay, let me just give you a quick demo. So I've used the MySQL, which I've shown you earlier in the first section. Okay, I need to switch around here to look at the screen. It doesn't appear on my screen. So I'll select the database and just say use Ryan. Okay, and then I have a few tables. Okay, the table that's contained the JSON data type is T1. So I do a select astrid from T1. Okay, so the column one, which has all the JSON document. So there's an ID and then there's an age and then there's my name. I'm also same age as the dolphin, 24-year-old. And then you could, you can see some of, it doesn't care about, you know, the structure, right? So you can store anything that you want. Of course, that gives you a problem later on, right? Because you, you don't really, you don't really have those views and, but anyhow, that's, that's why people use JSON because it's very flexible. I'm going to explain to you later on the ID and name. You see, when, okay, let me just, okay. I'll talk to you, I would explain the ID and name later on. So this is essentially how we manage the JSON in MySQL table, right? So I'm, I'll show you how you can insert a JSON document. Okay, so I'll insert another JSON document. Key value ID 8, name is Ivan. He is also 24-year-old. Just like the dolphin. Okay, so you can insert it and you do a select, okay. So you see the document get inserted. Now, if you notice, insert into T1 whatever, just column C1. I didn't have anything on ID and name, but I tell you how, why this can be done and what kind of usage of these two columns. So far, so good. Everybody still with me? Okay, good. Okay, so I've shown you the example. Here's another similar example which I explained earlier related to the marketing, you know, the website tracking. So this is one of the way that you can track and why people use this to track your JSON to be more flexible in their application. Okay, so use case number one, right? So you can combine JSON with relational data type. And this is the power of using MySQL JSON support. One thing is that you can leverage on the indexing of, you know, being able to create index on a column to manage and to select to aggregate your JSON document. Okay, you know, the column that I shown you just now, the ID and name, it can be generated automatically by extracting data from the JSON document into a virtual column or a generated column automatically. The reason for that is that you can leverage the SQL statement to query that table instead of using API or functions to do that because JSON document is not a normal, you know, data type in relational, right? So it's JSON, so you need to have function to deal with the data type. So in MySQL, we have a list of, I think, 40 user defined function which come together with JSON in order for you to work with the JSON data type. So one of it is called JSON extract to extract any key value from the JSON document for you, right? To do comparison, to do whatever and so on and so forth, right? So this is what happened when I insert the JSON document and I have a column that extracts from the JSON document, the name and the ID. You can do it virtually or you can do a store, generate the column on the table and you can have index on those to, you know, access the data faster. Now once you have that, you could do, you know, your aggregation, your reporting and so on. Now the other advantage of using MySQL JSON data type is you can leverage on the transaction capability that we have. So I imagine you have a Node.js application. You could have a start transaction and commit to manage the, you know, update or delete in your code when you write your JSON document. So that can be transaction managed using the MySQL API. So in here, before you, you know, select or find or update whatever data of JSON, you could have a start transaction block embedded in your application so that, you know, you have this transaction control in your application. The second use case, I've explained this, is that you could use MySQL with JSON data type to do reporting, right? If you don't, if you don't do this in SQL, you got to probably export, you know, your JSON document into a CSV and then you do your reporting, whatever not. So that's a two, I mean there's an additional process that you have to do if you don't, you know, if you don't leverage, if you don't use relational, that's the one way that you could do for reporting. So you'll find it's very, very useful, right? Especially if you have lots of documents and, you know, you could leverage this capability in database to do reporting for you, right? So every day you have many, you know, visitors to the website, you know, every time you run marketing campaigns, this can be very, very useful. Okay, so I have some reference on, you know, API and references, which you can take a look. Essentially is in the, it's in our, you know, main website. So document, you can download it, you can play with it. The last thing I want to show you is MySQL shell, which is part of our JSON architecture that allows you to quickly test your code interactively using the shell. Okay, so you see a JS, this is the JavaScript command, and you can do a slash SQL to change into SQL mode, or if you are Python, you prefer Python, you can do Python. So currently you can do three different kind of commands using MySQL shell. Let me just go to JavaScript. So first of all, I need to connect to the database, right? Okay, so you see I'm connected using the X protocol. And you can see I've connected on this port number, because traditionally we are running on 3306, and this is SSL enable and JavaScript command. So first I need to select a database. Okay, so you see I can access to the schema Ryan to this DB global variable, right? So you do a DB, you say Ryan connected, and then you do a DB tap, it gives you a list of functions that you could use to work with this schema objects, right? So in here you see there's the right hand corner, T1. This is a table that I showed you. So T1 plus two fast. Let's do it again. So tap to get a list of functions, do a select. Okay, so you see you can access the table that way, or you can go to SQL mode. So same thing. So you can just switch back and forth and you could use it. You can test those things very, very fast. Yeah. Oh, okay. Okay. Let me try. Okay, I'm keeping my finger crossed might not work. But that's the syntax, right? I think no, I, yeah, yeah, switch it, right? Like that. And then like that, right? Yeah, let's, let's try it. But you, you get the, yeah, you get the idea, right? So it's get collection, T1, and then fine. And then your, your argument. Yeah. Yeah. Double code. Find double code. Instead of saying, Oh, okay. Yeah. Yeah. Yeah. Yeah. Yeah. Always got confused where there's curly bracket. Do I need to do curly bracket? Collection. Yeah. Yeah, you just got a syntax is yeah. Yeah. Right. Okay, that's why I need to also go back and read all this to be more familiar. And yeah, more, you know, if you, you know, these are all the different API and connectors. So in summary, it's great extension. In fact, I have quite a lot of fun playing with the mask. I'll show up. It is so flexible. And you can really test out stuff quickly. And yeah, that's about all for my talk. I do have a couple of questions and see whether, you know, anybody cash that I actually mentioned but if you, anybody get collection, collection. That's a JavaScript. I'm looking for SQL. The one that you use in SQL statement, select whatever. It always prefixed with Jason. I'm reaching for my back. So you know that some goodies coming. I should show. Yeah, I should show. It's a book. It's a book. So too difficult, right? Okay, I have a simple one. Can you give a hint perhaps? Yeah, it's Jason something. Jason something. Yeah. Okay. How many more syllables? Okay, no, no worries. No worries. I don't want to stress you. Jason extract, you know, extract. Remember just now I saw extract ID, whatever. Okay, this one is simple. Name one of the MySQL documents to a component. Yeah, thank you. Thank you. Thank you. Here you go. It says by one of our community manager, Dave Stoke, but we don't have time for him to autograph. Maybe next time. Okay, so I think that's all I have. Back to I'm sharing. Well, thank you very much. Let's give a round of applause for Ryan.