 What you see on the slide, programming with databases and result sets, I will very briefly touch upon result sets to give you an idea why we are talking about result sets. The concept of the relational model is based upon the set theory. In the set theory, we don't have multiple values, there is set intersection, there is set union, there are set differences, right? Those operations are there in the relational environment. And as the outcome of set operations is a set, the result of tabular operations is a table which corresponds to the set. So this is just to give you an idea or to remind you the parallels between the relational model and the set theory. The result of the relational model is tables and the results of the sets are sets and they correspond and to each other very strongly. That is why the financial sector, the banking sector, they have a lot of tremendous trust in the relational model and which is evident based upon decades of usage. So now let's talk about the programming aspect, the database programming versus the procedural programming for this kind of environment. So what types of programming we are talking about and how basically we will talk about the database programming versus the procedural programming. The procedural programming which was not like 30 years ago, 40 years ago, now what we have the procedural programming is different from that procedural programming. And of course database programming which is altogether a different thing and how database programming is different and why this matters, why we should be talking about it. Okay, let's look at an example over here. We have this procedural programming over here. And what you can see is that we have this data record and the record is retrieved, operations are performed on those records. And you can see there is little repetition. Now this procedural programming is not the one which was like I said 40 years ago. Now if you look at 1b, the database programming, you will see that it is equivalent logically to what you see in 1a but the things have been split and things have been underlined. And you can see there is certain repetition also over there. Now the question is anybody who is a traditional programmer say oh this is your wasting time. But overall actually it results in saving of time and I will tell you why would somebody do database programming. Let's look at the differences from the previous slide you can see that the database programming code is longer and the choice logic is separated from the executable logic. There is a valid reason for this. And once the conditional execution starts, it goes uninterrupted. This is very critical for a database. Why because the contents of the tables are being updated and these have to be atomic that is what is meant by uninterrupted and the execution of the statement should be completed so that the tables are in a stable so to say consistent state. This is not there in the procedural kind of programming because the application domain is different. Now the question is that why would somebody use database programming. Why because people were used to 40 years ago a certain type of procedural programming which they left and adopted the current or the model type of procedural programming. Why would somebody use database programming is it is easy to understand and debug. It is fairly simple. It is straight forward. It has been expanded. It is easy to maintain also right. It is easy to maintain also that is why of course some commands are executed twice maybe thrice also okay. But the benefits are much so we are looking at the trade offs benefits are much more than the number of executions so why this matters why this matters. If you look at this diagram the diagram shows how the results from different database queries are kind of combined together to give you the complete result right. Why this matters because you don't have any option although there is PL SQL which I spoke about earlier also but this is the type of programming the database programming you have to get yourself accustomed to develop effective maintainable efficient web based database applications that is why it matters okay. And once the HTML page generation starts it cannot be stopped in the middle which is the similar to the atomic type of instructions I spoke about and need all info in the query to generate the page which page dynamic page we are not talking of static pages so if I want to generate a page I should tell I just pass the parameters to the web server all the way to the database server how many rows per page what are the attributes I am looking at do I want any attributes in a certain order and so on all that information has to be passed then of course if I am looking for the name corresponding to a passport number or CNIC or vice versa it should be there right and finally I should know what I should be looking for and where I should be looking for it so these are all things which are to be considered that is why it matters that is why it's important thank you for your time