 So in that case, I would like to share a tool which I recently discovered and I thought it will be useful for a larger set of audience. It is not very specific to do with the operations of database or anything of that sort, but it is mainly focused on writing, finding out the anti-pattern patterns while writing a SQL query. So before starting, what is an anti-pattern? So there are common repeating use cases we come across while doing writing SQL queries. And while writing that queries, we make some of the mistakes or something as part of that query. That is not something how it is supposed to be done. This is something like where the cost of doing something is higher compared to its returns. So considering that in mind, like the particular library I want to talk to something called SQL check. SQL check is a command line tool where you can input a SQL file and it will print out the list of anti-patterns that particular SQL file has got. So this is to do with the DDL operation or DML operations and that is like when you're creating the table indexes and making your queries. So the tool organizes these anti-patterns into the four higher level types. The first is the logical database design anti-patterns. Second is like physical database design anti-patterns and the query anti-patterns and the final is an application development anti-patterns. The tool, how does it go about finding these anti-patterns is like it has got a list of rules to follow. For example, one of the anti-patterns is select star. So what it does is like it looks for any of the statements which has this particular regular expression matching and it tags them as like a low risk or high risk depending on how it is configured. So let's see in some of these anti-patterns and let's get some idea what exactly this tool is doing. And after that I will present you the paper which the same team has developed for suggesting writing a better query. First let's start with the logical database design anti-patterns. So here they focus on some of the mistakes or trade-offs we do while creating the databases. One thing is like multi-valued attribute. So if you had seen like a CSV format, you can see everything's a comma separated. Let's say if you want to store an array in a column, you put it into a text and then you do serialize, deserialize. Right now a lot of databases support JSON structures. So there is like technically possible, but previously that was not possible. So you have to put everything into a text field and then read it in the application and split it by comma all those things. So those they call it as an anti-pattern. And second, a few more things in the same section is like primary key does not exist in a table. Other is like generic primary key. As Swannand was saying like if you use auto-incrementing ID, it is very generic primary key. And there are trade-off when you use generic primary key. Another thing is like entity attribute value. Basically what you're trying to do is you're trying to create a key value path. Which is, you know, rather than creating a very specific for one table, you're doing very generic for an entire application which can have its own shortcomings. And next is the physical database is an anti-pattern. So what they do is like imprecise data type. And a few more things like files are not SQL data types. What they say is like rather than storing the path of the file, you store it as a blob and also store it, store the path in the table. And that can be like different opinions. And major chunk what they cover is the query anti-patterns. We all know select star is bad, but it is good for development because we come to know what our data is there in protection if you select star. One, there are a lot of disadvantages because you are going to transmit a lot of data which is not required. And second thing, it can cause a lot of difficult outcomes when you join. Because like if there are two tables with the same column and you join, how does the result output come? So there are a lot of things like that. And then they have like group by, you know, like group by always returns one value. The group by class whatever you give in a query has to be there. If it is there in the select, it should always return one particular value, not a range of values. That means sometimes you do an aggregate of it. So they try to figure out something of this sort. And they have like few more things. In the final aspect is like application development anti-patterns where you store passwords as a plain text. So they just do a regular expression for password as back care. If you declare in a table, it just says that this is bad. Let me quickly run an example and let's see like how this tool looks like. So you can install the tool using any of the platforms whichever you are using. So here is an example for say a password or SQL file. So yes, you can see like, let me increase the font size. So here is a table which has got a user user table, which name and the password column and password is declared as a vodka to 55 and not null and primary key is game. And I'm having search statement user name and password. So how do I run this it runs like SQL check hyphen if you give the file name and password dot SQL or the file name, and it outputs say what is the risk level. So it says like the statement create table not has got first say query anti-pattern is a low risk anti-pattern. They say it has null usage. That is, they say like, this is something like you have to understand like in a static analysis that can be like false positives that is like, for example, here they say it is an anti-pattern for a null usage. And next line they say not null usage as well. That is, sometimes they suggest like your column cannot take null values and explain they say to you, it's just like it can take null values. So this is something like hard to understand, but it depends on the use case. Here is what they say like the important thing is a low risk where they say the application and dependent that you are using it like a readable password. So if you rename the column like a hashed password, they may not complain it. So that is exactly what this tool helps you to do. So they classify the patterns that the risk level and the high level, medium and low risk and high level risk or some, some join distinct, a lot of other patterns you can see. And I just want to present this particular paper where this same authors behind this tool has released a paper in April 2020. But the tool was developed long back, say two, three years old this tool is. You can see it's a four year old tool. So that means it has been in usage for some time. But main thing I want to say here is like they have introduced a rule based engine how you can go out about developing these anti patterns, and they're classified and they've done some empirical evidence on the open source repositories which are available. And it is, and they have come up with the solution also in this particular paper what they did and they're describing the higher level of working of the, the new tool which have developed. For example, this is what they call AP deduct that is called anti pattern deduct to give us equal queries, the query parser passes in the tool, then you do the query analysis and you do some data analysis on the if the database is available. And then the tool gives out the impacts, what is the ranking of the model what is some score. And then they also give you some kind of an advice like how you can fix some of the queries, like any other research research they're not open source the code and the interface to do this, but they put some sort of algorithms and they give us some empirical data on this. So you can go about reading this. And they come up with the how they calculate all the mathematics behind it, it is given but I'm not extensively gone through as has gone through the mathematics to find out is, is it somewhat useful you can use it or not. So there are people who have said they use this as part of the CI CD build, but the, as of now the biggest disadvantages, this can be only used as a command line tool. For example, if you have this particular application which is a Python or Python or Ruby on Rails application, you cannot just plug it into a model and the query and automatically say is this good or not. So if you're working on something of the newer version what they claim to be like they have Python version which which is available that's what they say, where you can just insert the query and then you will get what to say like some kind of anti patterns for that particular query. And as I said the code is not available, but it is available in the research format, you can go and read about it. So they found like some of the data set they use they given like what is a major concern with most of the code, no primary key and wildcard usage. So, exactly like for example they have, for example, rounding errors, for example if you're using money to store it in the database, most of the people tend to use float but it can cause problem if you don't use decimal or any specific money specific implementation. So this gives an exhaustive view view and also the results on particular research. And as you can see this is text based thing, somebody even went one step further. So they went and also created a neural network. So you just give the, I want to say a SQL query that can classify whether this neural network can classify that this particular query has any anti patterns or not and it splits out the result what is the anti pattern. So they have not described much about this from some other team in China they have done this research. So the one comparison result is the SQL check tool is able to classify this particular query with 80 percentage accuracy. The paper claims that the neural network they're able to do 83.2. Like any other research paper they have not really released their architecture or code or anything. And it is something really interesting because right now you can use static analysis for a lot of things. So if this is something becomes useful somebody builds a wrapper over like for all the Python or Ruby or any specific language and it can be pretty useful too.