Okay, at the end of the last segment we looked at solutions for the laminar boundary layer and we found that in order to get the new salt number over a wide range of parental numbers we needed to start to look at empirical or experimental data. So what I'm going to do in this segment is just introduce us to that and that will then enable us to move onward into turbulent boundary layer flows. So we're looking at empirical force convection. Okay, so what we've been starting to notice is that the analytical methods such as the solution by Blasius only gets us so far and that only works for rather restrictive and limited cases and when we want to get to more practical or flows of engineering interest we need to start to bring in experimental results and that is the empirical data that I'm referring to and so when we're looking at these the empirical data could be in a number of different forms. We could have empirical formulas and an example of that could be new salt numbers so let's say it's new salt number based on some characteristic length scale diameter a plus b Reynolds number to the n. We haven't looked at this one yet but this is convective heat transfer over a cylinder and it's referred to as being Kinz law and if we plot new salt number versus Reynolds number we'll get a curve that would look something like this and so what you do is you collect experimental data and then fit that curve to the experimental data that you have collected and I show a scatter there because all experimental data is going to have noise in it and a little bit of uncertainty so you can come up with empirical formulas like that. Sometimes there are graphical charts and you'll look up data that way but in any event what we try to do is we try to take experimental data and collapse it in terms of these non-dimensional numbers like new salt number and Reynolds number and then when we're doing our curve fitting what we're trying to do we're trying to determine these constants a, b, and n and that would then give us a relationship that would describe the curve that I've sketched in the middle of this Reynolds number and new salt number plot and sometimes what you'll do you'll take the log of both sides of those equations enabling you to determine the constants in a power lot or you can also do numerical methods to minimize the difference between the data that you've collected and the curve that you're trying to fit. We won't be looking at that in this course but that just gives you an idea as to where these relationships are coming from. Okay so when we collect this experimental data and we're trying to collapse the data onto a curve so you might wonder how do you know what the functional form of that curve would be well there are a couple of different tools that we have experimentalists quite often use dimensional analysis we're not going to talk about it in this course but if you want to see things it's called Buckingham Pi look at my course in introductory fluid mechanics and if you find the lecture on Buckingham Pi you'll be able to watch about dimensional analysis and learn a little bit more maybe you've already taken a course that has covered that. Physical insight so Ludwig Prantl when he took the boundary layer or derived the boundary layer equations came up with them that was partially based on physical insight partially based on a doing dimensional reasoning but that enabled Blasius then to come up and solve simplified forms of the Navier-Stokes equations we call the boundary layer equations and then also sometimes what people will do they come up with very simple analytical models and these can sometimes be quite powerful because they will give us an indication as to what the functional relationships might be between the variables that we're interested in so what we're going to do with this we're going to be looking at different relationships for heat transfer over and across a number of different types of objects and bodies and plates so what we're going to be looking at is so this is where we're going in the next few segments and the next couple of lectures we're looking at flow over flat plates and we'll now be moving into looking at turbulent boundary layers then we're going to look at the flow that we call external flow over things such as cylinders and spheres and then we're going to be looking at tube banks and and tube banks are quite commonly found in cross-flow heat exchangers and consequently that is the interest that we have within this course so those are the types of flows that we're going to be looking at we refer to them as being forced convection external flows and then after we go through all of that we'll be moving into internal flow which would be pipe flow but that will be in later lectures so in the next couple of lectures these are the things that we're going to be focusing on and we'll be using a lot of experimental data and consequently what you're going to be finding are a lot of relationships that you may not really understand where they're coming from but don't worry they they've come from experiments the main thing is to know how to apply them and the other thing that I should say and I'll say it again later on in the course when you're applying these relationships make sure you understand how the properties have been evaluated I mentioned the film temperature but that's not always the case sometimes the evaluate properties at other temperatures so just be very very careful to read the paragraphs above and below the equations that you're going to use to ensure that you're applying them in the right way but anyway so that's where we're going in the next segment we'll then move into looking at expressions for the turbulent boundary layer


To those fifty-four percent of physicians who are burned out, what would you say to them? Particularly in a profession like this, where it's a question of life and death for somebody else. Seven days of the week, twenty hours a day, three hundred sixty-five days, this is our schedule. You will not see me burned out. Maybe I'll die of exhaustion one day, but definitely not of burnout. A big study came out. Fifty-four percent of physicians in America meet criteria for burnout. And nurses are in the same boat, and you're here at a medical school, and we're looking for answers, and we're looking for hope. And so to those fifty-four percent of physicians who are burned out, and the nurses, and PAs, and nurse practitioners, all of us in healthcare, what would you say to them? If we have to bring health, either to ourselves or to others, one fundamental thing is you bring a very profound sense of wholeness into you, the various dimensions of life that we are. All of it is in sync and functioning well. It's sad to hear that physicians are in a state of burnout. How would they cause health? They could sell more medicine, but they cannot cause health if they are in a state of burnout. Now we're seeing as modern medicine progresses, comes out with miracle after miracle, research, all kinds of things, but people are not getting healthy.  A country like United States, which is the most affluent country on the planet, which essentially means you have a choice of nourishments. Every human being has a choice of nourishment. Most of the ailment that you see in other parts of the world are nourishment related in some way, because the needed nourishment is not there at the right time for a whole lot of people on this planet. But in a country where there is a choice of nourishment, I would say an excessive choice of nourishment, a nation is spending three trillion dollars on healthcare. This is bigger than the budgets of major nations in the world. India's economy is around three trillion dollars. You're spending that much on healthcare of a quarter million people. This shows somewhere we have missed health. Maybe we have an industry going, but we have missed health. Well, we can explain it in so many ways, but doctors being under burnout, I see this in every profession, everybody thinks their profession is the most difficult one. If any individual human being is creating something that they really care for, there would be never any kind of burnout. Myself and a whole lot of people around me, we are seven days of the week, 20 hours a day, 365 days. This is our schedule. You will not see me burned out. Maybe sometimes I'll get physically exhausted. Maybe I'll die of exhaustion one day, but definitely not of burnout or boredom. Those two things will never happen to me. Why I'm saying this is the fundamental reason why this is happening is particularly the physicians because there are various kinds of professions, but particularly when people go to your doctor, in some way they're placing their life in his hands. So when somebody is willing to place their life in your hands, you must treat it as a sacred duty. It's not just a job, it's not just a business.  But somebody, an unknown person comes and places his life in your hands, I think it's a greatest privilege that somebody trusts you at that level that they're willing to trust you with life. You could do right things or wrong things, knowingly or unknowingly, because nobody has figured the human body absolutely, all right? We know it to some extent. So you may do any number of wrong things, but they place their life into your hands. I think traditionally it was said like this in India. In any given society, if education, medicine and spiritual process, if it gets commercialized, that society will go down the drain. I think we are doing this to the entire modern world. All three are becoming commercialized. There is nothing wrong with commerce. Commerce is a transaction of give and take. You give me this, I'll give you that. But there are some things which cannot be handled as just give and take. If you bring this aspect of transaction into spiritual process, into education and into medicine, then it turns ugly.   If they were genuinely doing something that they truly care for, there would be no burnout. The more opportunity you get to do it, the better it would be, isn't it? Everything is towards a certain end. The joy of doing what you're doing is not there in one's life. This is not just for any one profession, it's for all professions, but particularly in a profession like this, where it's a question of life and death for somebody else. When it's a question of life and death for the person who is sitting in front of you, it can't be a transaction for you. Well, there is a business end to everything because to make anything sustainable, there has to be a business end to it. We are not against the business end of it, but within yourself, if you don't do it as a great offering to the person who is sitting in front of you, of course they will pay their fee, but within yourself if you are not like this, definitely you will burn out doing this kind of work. Otherwise every day if you helped a person, if in some way you made somebody life, their life better, by the end of the day, should you be ballooned into a joyful state or should be in a state of burnout at the end of the day? It should not be a burnout. If you genuinely experienced, you have enhanced many lives around you, this is not about surveys, this is not about ideas of I served this, I did this. No, there is a joy within a human being when they are able to touch another life. Why you are holding a few people dear to you as family is because you believe you can touch their life in some way. You can make a difference. That is what is most important for a human being. In every activity that we perform, whatever the nature of the activity, how profoundly we can touch someone else, this is what makes the big difference. If you make a movie, you don't want to make a movie which nobody wants to watch, would you? You want people to watch this movie and come to tears, isn't it? You don't want to build a house that nobody wants to live in. You don't want to cook something that nobody wants to eat. These things you can do only because in some way you are able to touch another life through your activity. This is most fundamental need within the human being and as a physician you have a phenomenal opportunity of touching lives like very other very few other professions can do and this should not lead to burnout but this is happening so because we are trying to treat it like a transaction and the most fundamental thing that we have not understood in this process is that human experience is caused from within, not from outside. Your joy and misery, your pain and pleasure, your agony and ecstasy, even light and darkness right now is happening only within you. It never happens around you.  I am surprised why only 54 percent because if you don't understand human experience is caused from within, especially medical professionals who in some way have delved into the nature of human physiology and I believe to some extent the mind, we must know that every aspect of human experience comes from within and today modern medicine especially unlike the traditional medicine is entirely chemical fixes for everything so you understand that both health and illness is happening because of chemistry. Joy and misery is a certain chemistry, different types of chemistry, ecstasy and agony are different types of chemistry or in other words we are a chemical soup. The question is only are you a great soup or a lousy soup? Now if I give soup making ingredients to all of you, do you believe all of you will come with the same kind of soup? You will come with hundred different varieties of soups so there is something called as the skill of soup making. I can teach you a way of making your chemistry into your blissful chemistry. That means you're blissful by your own nature not because of something that happened around you. This is exactly what I'm saying.


And now, tonight's presentation of Radio's Outstanding Theatre of Thrill's Suspense. Tonight, Suspense brings you a repeat performance of one of the most controversial plays ever presented over your radio. It is called Zero Hour by Ray Bradbury. After the initial performance, a great number of letters were received. Some comments were highly complementary, and an almost equal number were not. However, because so many of you did write, asking to hear this provocative work of fiction again, we present it. And hope that those of you who have not heard it before will write us your opinion. So now, starring Miss Issa Ashdown, here is tonight's suspense play, Zero Hour. What a game. Such excitement they hadn't known in years. Ming talked earnestly to someone near the rose bush, though no one was there. Then the two little girls, shouting, laughing at each other, such fun, such tremulous joy. Ming ran into the house all dirt and sweat. For her few years, she was loud and strong and definite. And her mother, Mrs. Morris, peeling vegetables at the sink, watched with amusement as her daughter threw into a sack old pots and tools, and things which were relegated to child play. Oh my goodness, Ming, what's going on? It's all the most exciting game ever, just ever. It's all right. I take these things, Mom. Well, just don't dent them, and it's all right. Thanks, Mom. We won't. Bye. All right, dear. Oh, what's the name of the game, dear? Invasion. Invasion? Invasion. And in the garden now, a serious concentration, mink with an assortment of pots, pans, and wrenches, forks, spoons, and her friend Anna, a little younger, tongue in teeth taking notes on a pad. This and this. What's it say next? Wait a minute, Ming. Well, hurry up! And a string and a hexagonal. A fork and a string and a hexagonal. What do we do next, Mr. Drill? And then mink talking to the rose bush again, and to her own satisfaction at least, receiving some kind of answer which she relayed to Anna. Triangle. How do you spell it? Oh, any old way doesn't matter. Now write beam. I haven't got triangle yet. Well, hurry! Zero hours by five o'clock. We haven't got it all day. Then time out from invasion for lunch. Mink bolted down the soup, and coincidentally crammed a sandwich into her mouth. Now you slow down, mink. Whatever's waiting will wait a few minutes longer. But I can't. Drill's waiting for me. Drill? Well, that's a peculiar name. Is he a new boy in the neighborhood, dear? He's new, all right. Well, I don't think I've ever seen him. Which one is Drill? Oh, he's just around. You'll make fun. Everybody makes fun. All the kids do. Well, I don't think that's very nice. Is Drill shy? Well, yes, in a way. I don't know. I gotta go now, Mama, for gonna have the invasion. Now you finish your milk, Miss. Who's invading what? Martian's invading Earth from up there. Oh, I see. And, uh, Drill's a Martian? I think so. He's had a very hard time getting here. I should imagine. They couldn't figure out a way to attack Earth. How to get in or something. And Drill says they have to do it by surprise. And even get help from your enemy. Oh, a fifth column, huh? Uh-huh. And all this time they haven't been able to figure out how to attack until one day they thought of children. Well, that was bright of them. And they thought of how grown-ups are so busy they never look under rose bushes or on lawns. Oh, that's where Drill is now, uh, under the rose bush? Uh-huh, with all his friends, too. And there's something about kids under eleven with imagination. It's real funny to hear Drill talk. Well, it must be.  Oh, and bath tonight? School tomorrow, you know. Drill says I won't have to take any more baths. Oh, he does, does he? And stay up till ten o'clock. Well, your friend Mr. Drill, it better mind his peas and queues or I'm gonna call up his mother. That's just it. Drill says you're dangerous because he don't believe in Martians. Just like you think Drill's a kid. Well, he's not.  All of us kids. And I might even be queen. Well, that's nice, dear. Now run along. What is it, dear? But I'll be sure it won't hurt very much. Well, thanks. Thanks a lot. Guys, are you in town? Oh, it's long distance though. You shouldn't. Fine, and Bill? Oh, wonderful. Noisier than ever. Oh, she's got a new game now. It's taking the place of hopscotch. Invasion. Well, yes. Are yours? Same thing. I got a crush on some guy named Drill. Oh, it must be a new password. Mink likes him, too. Why are you sweeping the country? Well, I... I wonder where they learned it. They told me at lunch, zero hours at five o'clock. When? And they talked a little more. Schoolgirl friends. Casual woman talk. Mrs. Morris was thoughtful. She was thinking of other things, of adults. Of children with imagination. Rose bushes. Dimensions.  And she wondered about Mink. And all the kids who were at that moment playing Invasion. Kiss for Mink. I will. And to Bill and the kids. Goodbye. An hour drowsed by. It was three o'clock. There was an occasional hum inside the coolness of the house as a car passed outside. The street was lined with good and green and peaceful trees. And all across the city, in other gardens, in other places, children under eleven were excitedly playing a game. Talking to rose bushes and grass lawns. Trees and shrubs. Even children in apartment houses. High in the air. Conferring with potted plants. Cactus and ivy. Mrs. Morris finished her housework and went to the kitchen. Oh, hello, dear. Hi, Mom. Can I have a glass of water? Of course, I'll get it. What, dear? Oh, nothing, Mom. Well, here you are. How are things going? Huh? The, uh, invasion. Oh, that? Yes, that. Hollow's finished. When everything's right, Gryll said we should be ready on time. Five o'clock? That's right. How'd you know? Helen called me from Danbury. She says that, uh, Timmy's playing it, too. Hey, that's keen. I guess all the kids are, aren't they? No, not all of them. Not guys like Jimmy Wood and Bob Wilson. They're growing up and they make fun of us. They're worse than parents. They just won't believe and drill. They're so smart just because they're growing up. You'd think they'd know better. They were little only a couple of years ago. Well, we'll get rid of them first. Dress is okay to kill them first. A mink. I don't like that kind of talk. Do you hear me? I don't like it at all. No, Mom. Now, I mean it. You keep on that way and there'll be no more playing. You'll have to tell Anna to go home and you'll stay inside until bedtime. I'm sorry. Well, I should think so. Thanks for the water, Mom. Mink. Yes, Ma? What did those numbers mean? What numbers? Those numbers you were saying to yourself before.  You don't even have to use your allowance. I'll pay for it. I haven't got time. Well, I'd never believe I'd hear you say that. I gotta go now, Mom. Oh, wait a minute. Mink, I want you to tell me the truth. What is this invasion silliness? It isn't silly. Game. That's all. Mom, we're just playing an invasion. Excuse me. I gotta get back now. I'll see you later. It was a game called Invasion. Mrs. Morris' little girl Mink was playing it. So was Mink's friend Anna and all the other children under 11. It was called Invasion and the zero hour was to be at five o'clock. Mrs. Morris was disturbed. She wasn't sure why, but there was something, something about parents shutting ears and eyes to what was happening. And because she was disturbed, she did something she didn't usually do. She called her husband at the office. Hello, dear. Oh, hello, Henry. I'm sorry to bother you, but Miss Maxon said you weren't busy. Oh, not too. I should be able to get home early today. Everything all right? Yes. You all right? I'm fine. Mink? Oh, she's... Henry. What? Oh, nothing. I just wanted to talk to you for a minute. That's all. Oh, yes. Mink been getting on your nerves? Not really. Well, you tell her to behave or when I come home, she and I are going to have a talk. As a matter of fact, she's been a little fresh lately and I don't think it's good. Well, she's playing outside. She's fine. Honey, is something wrong? What? No, I told you. I was just thinking about you and wanted to talk. That's all. Nothing wrong with that? Not a thing. You go back to your work, dear. I'll see you soon. All right. What time do you think you'll be home? Five. Oh. Well, I... I was just thinking. Nothing really. Just Mink and you and me. Goodbye, dear. Hey, aren't you? Yes, I'm fine. Goodbye. And it was half past four. The day began to wane. The sun lowered in the peaceful blue sky. Shadows lengthened on the green lawn. Outside it was quiet. The two little girls more intent than ever upon their endless movement of design and pattern with the implements before them. Mrs. Morris watched from the window and she had never known Mink to have such powers of concentration. She had turned on the radio and sat drinking a cup of coffee and turned over her thoughts. Children. Children. Children. Love and hate side by side.  Strange children. Do they ever forget or forgive the whippings and the harsh, strict words of command? I wonder. I wonder. How can you forget or forgive those over and above you? Those tall, silly dictators. Those parents. Oh, what is it, dear? Oh, I don't know. There might be in the garage. What do you want them for? We just need them. Well, if you tell me what for, dear, maybe I can... I don't say. Is something wrong? What can I help? You better get through, Mink. I want you to take your bath before your father comes home. All right. Now, he's coming home early. And, Mink... Mink! Mink had disappeared behind the shrubs and Mrs. Morris knew it was ridiculous to make an issue of it. Besides, what was the issue? Invasion? Drill? Zero hour? Unaccountably, a cool breeze came up and although normally for that time of year it would have been relief, Mrs. Morris felt a chill. She closed the window. Time passed. A curious, waiting silence came upon the street, deepening. Then from the living room, Mrs. Morris heard, five o'clock, zero hour. Zero hour. It had come. And now it had gone. But was the clock right? And Mrs. Morris, knowing how foolish it was, knowing it, went to the phone and dialed. Silly. It's silly. Time will be exactly four-fifty seconds. Four-fifty-four and twenty seconds. And Mrs. Morris knew that it wasn't as silly as she had thought. Because it wasn't five o'clock yet. Not zero hour yet. Then the car drove up into the driveway. Mrs.  I'm in the living room, dear. The daughter didn't have time for a kiss. How about you? A hard day? Not particularly. Would you like a cocktail? No, you read my mind. Martini? Perfect. Anything exciting happen today? No. Oh, Helen called. From Danbury. She was crazy, but she just felt like calling. Like you calling me this afternoon, crazy, huh? What was that all about? Well, I told you, I just wanted to. Hey, incidentally, what's this new game the kids are playing? Invasion, that's a nice depressing thought. Is she all right? Come to think of it, she looked kind of funny. She's all right. What's the time, Henry? A couple of minutes after five. No, no, the clock's wrong. By your watch. Oh, I've got two minutes, too. I'm probably slow. You got something on the stove? No, I just wondered. Honey. Hey, look at me. What's the matter? Nothing, really. Now, minks been up to something. No, of course not. I guess I'm a little tired, upset, that's all. You want to go out for dinner? Oh, no, I've got a steak here. I'll tell you what, I'll barbecue it. How'll that be? Oh, fine. What was that? What? Well, I thought I heard something. Well, I didn't. I must have been imagining it. You are jumpy. Why don't you have a drink? I don't want one. What's the time? Mary, what is this? Now, I mean it. Something's wrong and I want to know. It's silly. Oh, silly. I'm on edge, that's all. Mary, I don't like this. That kid's done something, hasn't she? I'm going to get her in. No, no, Henry, please don't. She hasn't. It's nothing at all. I just... What's that? I don't know. Those kids haven't got anything dangerous out there, have they? I noticed a lot of junk lying around. I thought it was a game. She wouldn't have done it herself. They made her do it. The devil? Maybe you better go out and tell them to stop playing now. It's after five. You tell me to put off the invasion until tomorrow. Tell her! It is coming from outside. What are they up to? I'd better take a look. Mink! Mink! Bombs are bombing! No, no, it's upstairs. I know it is. In the attic. That's where it is. Mary, Mary, it is not up there. Mary! It was not a little frightened. She seemed to know something. In the attic. That's where it is. Her mind had worked that quickly. Any excuse to get them away from the outside, to get them upstairs to the attic in time. And outside there were more explosions. And they could hear the children screaming with delight. It is not in the attic it's outside. Mink's out there. What's the matter with you? No, no. I'll show you. Hurry! Get inside quick. Now we're safe until tonight.  Why did you throw that key away? Maybe we can sneak out later. Maybe we can escape. For heaven's sake, the kid's out there. Do you want her to get to? No, you don't. You don't. We've got to stay here. We've got to. It's horrible. We've got to. You've got to stay here with me. At this point, I don't know how the devil I can get out. Where is that light coming from? Be quiet, please. Be quiet. They'll hear us. They'll find us. Henry, please. Well, who's going to answer the telephone? There's that noise again. It's in this house. Mary, what is this? Mary, what's happening? You know, now answer me. Stop it, Mary, stop it. Somebody's downstairs. Who's down there? Who? Oh, no, no, no, no, no, no. Oh, please, please be quiet. They might go away. Please, please. In between his wife's terror and the electric humming from below, Mr. Morris felt a great fear. They trembled together in silence in the attic. Mr. and Mrs. Morris, parents of a little girl. Then they heard steps coming up the stairs and a voice and a queer cold light became visible under the door crack. A strange odor and the alien sound of eagerness in Mink's voice was almost more than they could bear. Each wanted a scream and another sound and the attic lock melted. Mink.  Suspense in which Miss Issa Ashdown starred in tonight's presentation of Zero Hour. Next week, suspense will bring you the story of a bomb and the man who carried it to its ultimate destination. We call it The Lunch Kit. Be sure to listen to Lunch Kit next week on Suspense. Suspense is produced and directed by Anthony Ellis. Tonight's script was written by Ray Bradbury and adapted by Mr. Ellis. The music was composed by Leith Stevens and Lucian Morowitz and conducted by Wilbur Hatt. Featured in the cast were Parley Bear, Paula Winslow, Eve McVeigh, John Daener and Beverly Hanley. Sound patterns were by Bill James Kemper. This is the CBS Radio Network.


Hello and welcome to NewsClick. Today we are going to discuss the COP25 or the environmental discussions on the climate change that has started today in Spain. But this is the COP25, the annual group, annual meeting of the countries regarding the Paris Agreement. Now, we know that the US is walking out of the Paris Agreement. But the focus seems to be if we take the even Secretary General statement regarding the COP25 on big emitters and here it doesn't take into account the fact this big emitters are also some of them are big populations and this seems to be forgetting all about historical emissions or the per capita emissions because ultimately it's people who emit carbon dioxide through their consumptions of different kinds. So this is a huge gap in the current COP25 or the current climate change discussions. Unfortunately, yes. However, this has been or has become the dominant narrative since the Paris Agreement because as we have discussed before the Paris Agreement completely ignores historical emission has deliberately taken on what the Americans and the Paris Agreement call forward-looking perspective. That is, you forget what's happened before. Let's just look at what's ahead. In that scenario then you don't look at historical emissions and even looking forward you are looking only at total national numbers. Per capita comes in if you are emphasizing equity. Since there is no emphasis on equity in the Paris Agreement, either historically or on per capita terms, both these are missed out. So the big names that come up are the US, the EU as a block, China and India. Irrespective of the fact that you would take for instance individual countries like France or England, small populations compared to India and China, but their per capita emissions are something like six times, eight times higher. That's right. And in the US for example, it's about 14 times the per capita consumption of India and the emissions of India. This has been a problem and in fact this has been the aim of the US in steering the climate talks from very early on and leading up to Copenhagen. This is a self-declared objective and in fact Hillary Clinton has even written an op-ed piece at the time of Copenhagen summit saying this was what we had set out to achieve this forward looking perspective and not addressing equity and per capita and we have achieved this.  That's right. That arguing that the US should also be considered a big editor, which it is. But per capita terms it's a, as you said, 14 times for instance per capita Indian emissions. That's right. Coming back to the issue of the global climate change itself, if we look at the, what would be called the current best case scenario for science, which is looking at carbon budgets. Not looking at CO2 numbers, but looking at the carbon budget and arguing that the carbon budget that is existing is roughly x number of gigatons. And in that, I think the figure changes of course whether it is 1.5 degree centigrade target or 2 degrees centigrade is your target. And of course there is a huge difference. But if we look at what is left of the carbon budget today, it seems that we are eating up this budget much faster than what the commitments were and what the scenario for limiting up to 1.5 degree demands. And even if we look at 2 degree scenario, we seem to be slipping badly. And at this rate, if we look at what was desired of the climate change negotiations, what was the best case scenario for 2 degree centigrade, we are really slipping it to the extent that it seems that we are looking at a 3 degree centigrade by 2100. Absolutely. And this is the one place where what Secretary General Gutierrez has said and what the emissions gap report has said has to be taken at its face value that this is the reality on a global scale. The issues we were talking about is therefore then how do we tackle this and what does each nation do? But if you look at the global picture, it is very clear that the prospect of irreversible climate change is now visible. It has gone beyond the stage where you could say it is further down the line. It may come. Now it is very clear that we are staring at it and in fact we are hurtling towards that phase. And like you said, even if you take all the voluntary pledges made at Paris, the sum of the NDCs leads you to about 3.2 to 3.5 degrees Celsius temperature rise by the end of the century. And the other targets in Paris at the global level were to reach carbon neutrality that is net zero emissions by 2050, which meant that maximum you would have to freeze global emissions right about now for two degrees and in another 10 years for 1.5. We don't seem to be getting there either. I didn't get it. If you say 1.5, we have to freeze emissions later. If we have to limit our emissions for 1.5, when should we stop emitting or reach zero increase? If we are talking about 1.5, we really should have been at a global level at peak emissions roughly about now. And after that cut down and quite steeply. And if you are talking about 1.5 or 2 degrees, you have a 10 year or so before you start cutting down again. So the more you miss these targets, what it means is you have to start cutting even more steeply later. And after 2050, start doing what is called negative emissions, which means you have to suck carbon out of that for which no known technologies exist as of now. Now coming back to the issue that you said about the pledges, these are voluntary pledges. But if you look at the figures that UNEP report has presented for the COP25, that shows that even those pledges are not being ordered. In fact, the rise of carbon emissions goes beyond, forget the pledges, but even beyond the pledges to the extent that these are, we are tending to see a faster rise of carbon emissions right now. Yes. And there unfortunately is where again national performance figures come into play, notably China, which whose emissions are rising very fast even today. And even on per capita terms, Chinese emissions today on per capita terms are getting pretty close to the European Union's emissions per capita. That is high. And the Chinese at Paris have pledged peaking year for China at 2035, which means you can expect China to continue to grow for at least the next 10 years. If that happens on an absolute basis, you are not going to be able to meet these global targets very effectively. Yeah, but the interesting part is that for instance, now Japan is exceeding whatever it had committed. Yes. Small country compared to China, but still there. Yes. You have European Union, which seems to be half of them seem to be backing off from their promises, except countries like Germany, which has been sticking to basically their targets. And the United States, which is abandoning it anyway, and I said it is going to go over to a carbon rich future because it doesn't believe in global warming. And you have a White House, which says essentially that global warming is a myth. But what you are saying is, these are already visible. But when you talk of these being visible, you mean already the patterns predicted that you will start seeing a change in rainfall patterns. All of this is already starting to happen. And you are getting extreme weather events, which are not directly correlated with, but you can see the rise of such events. And you see also summer temperatures, we are getting hottest summer temperatures ever consistently over the last 10, 15 years. And this has been every year, we seem to be breaking the record. Now, the question about when people talk about 2 to 3 degrees average rise, people tend to think that from 32 average, it will go to 34, that's not such a big deal. But they don't realize the summer peak could go from say 45 in Delhi to 50 degrees. So, we are really talking of extremes of temperature, which would rise by as much as 5 degrees to 6 degrees. That's right. But it's not just the temperature rise, which is going to affect even human beings. If you say our summers are going to get uncomfortably hot, yes they are. But you are also going to see more numbers of and prolonged heat waves, which means persistent temperatures of 49 or thereabouts for a period of 2 weeks, 3 weeks. That's when you will start seeing, as is already started happening in Europe, deaths due to heat stroke, running into the thousands, which Europe is not experienced, is not ready for, affects the elderly and the already infirm, infants and so on. But this is directly as it affects humans biologically. But the effects in terms of extreme weather events, sea level rise, which is going to inundate. I am going to stop you a minute on this. When you talk about the weather, such events, high temperatures 2 to 3 weeks in Europe, well heat waves would also have huge effects on Asia and Africa. Absolutely. Because already we have hundreds of people who died heat waves every year. Absolutely. So these numbers are really going to rise dramatically. Absolutely. And second part of it that's going to happen, also drought drinking water. That's right. And then of course, the change in seasons that we are seeing monsoons come much later every year. Exactly. This whole rainfall pattern is changing and lastly agriculture. Precisely. Because all these are going to impact on agriculture and crops. Even in simple biological terms, more drastically perhaps than they are going to affect you and me. In the sense your wheat crop, for example, is going to start behaving erratically even with 2 degrees Celsius lies in temperature. And it is predicted that India, for example, will have something like a 20% net drop of yields in wheat. Now let's also look at the weather when you say weather pattern is changing. It also the argument is you could also not only will have rise of sea levels but also complete change of the rainfall pattern. Absolutely. And the argument here is the temperate lands will see wetter climate. It will see higher temperature which might be good for the temperate people living in temperate climate. But it will adverse effect what today really are the poorer sections living between the tropics. Exactly. So even the climate change and this could explain why the wealthy nations which effectively are the ones in the temperate climates Europe, United States, etc. They are far less concerned about global warming unless there are countries like Germany which have taken this very seriously. And essentially because the differential impact it is going to impact the global south much more and benefit the global north in some sense. Both the effort to reach parity in development terms means energy consumption which then they have to really forego because this will lead to irreversible climate change. But they are also going to suffer differentially the impact of the climate change. Absolutely. And if one understands that vulnerability to climate is an add-on to pre-existing structural vulnerabilities which are directly correlated with poverty levels. If I am richer I can afford to for example move my residents away from uncomfortably hot or sea level inundated areas move to other locations. I can change what I eat if I am poor I cannot do any of these things. Flexibilities are lower. Thank you very much for being with us. We will watch the COP25 as it unfolds but not much is expected to come of it because essentially the leading figures who can make a difference are not there particularly the United States which is in the mode of withdrawal. There is a year of notice and they already withdrawing out of it. China and India are not represented by high-level delegations so we will have to see whether the COP25 really does anything or not. Looking at it it seems to it will sound more warnings but really not take any decisive steps. That is the way it is looking at the moment. Thank you very much for explaining all this to us. This is all the time we have news click today. Do keep watching news click.


Our next chapter is on indexing and hashing. The hashing part actually I have not really covered here and it is kind of historical term. So, we can just think of it as hashing sorry indexing just forget about the hashing part. So, what we are going to cover here is basic concepts of indexing then with our focus on B plus trees because these are the most widely used index type and the parts on hashing I have dropped from this abbreviated version. It is there in the book slides but I have dropped it here and then we will talk a little bit about multi key access and a few other topics. So, let us lay the groundwork with some terminology. There is a notion of a search key which is an attribute which is used to look up records in a particular file or relation. So, again terminology here a file refers to the underlying storage structure where the records are stored. A relation we will use to mean the logical relation. So, file is the physical manifestation will just say file it could be a collection of files but we will just use the word file. An index file is often just referred to as an index basically has a collection of records called index entries which help us map from a search key to a pointer. So, search key could be may be name may be the student relation has ID as the primary key but you can have an index on ID as well as another index on name. So, if you put an index on ID the search key would be the ID and the pointer would be pointer to the record. Now, what do we mean by pointer? Typically if records are in a heap organization meaning the land up somewhere in the file and never move after that the pointer here would consist of two parts. One is the identifier of the page where the record is which could consist of a file ID offset of the page within the file and so forth. And the second is a record identifier within that page. If you use the slotted page structure the entry in the page header which points to that record is what is thought here. So, all that together constitutes the record pointer or record ID. Now, what is the use of a file like this? If a record might be quite large but this is going to be much smaller. So, indices are smaller which let you search through it efficiently but in fact you are not going to search sequentially through an index. There are ways to jump to the required part of an index which I think most people would be familiar with. So, there are ordered and hash indices as said we will focus on order. Now, the goal of an index is to speed up access to data. So, first of all you have to see what all kinds of accesses it supports. So, the simplest kind of index finds all records with the exact given value for one or more fields. The next more complex index will find records whose attribute values fall in a given range. So, between say 10 and 30. So, simple linear range. So, those are the kinds of things we are going to focus on. Now, many people have been asking queries about geospatial data. There you will often ask queries for things which are you know within 1 kilometer of this spot. Things which are less than you know 4 kilometers downwind of this spot in this month when the wind direction is so and so. So, you have more complex queries there. So, we are not going to look at those today but there are indices which support these kinds of queries also. So, access time is the key thing. The access type and the access time. The other important attribute is the insertion time because if insertion is very slow then up you know insertion to relations gets slowed down. Similarly, deletion time updates can be considered as insert plus delete. And lastly the space overhead of the indexes can also be significant. Usually it is pretty small it is not an issue but occasionally it can be. Now, our focus is going to be on ordered indices where index entries are stored sorted on the search key. So, in our context the entries sorted on id or entries sorted on mean. The summer terminology here we have what we call a primary index, but many people also call this as a clustering index. And I will often use this terminology to mean an index on a sequentially ordered file. So, the file is been sorted on a particular key and the index is on the same key. So, if the index key order matches the order in which the records are stored then you have some nice properties for the index. The search time comes down and so it is more efficient for accessing. In contrast the secondary index is one where the search key order is different from the sequential order of the file. The file may be unordered it may be ordered on some other attribute, but the order does not match that is the key thing. Such indices are called secondary indices or non clustering indices and they have a different performance characteristics. Now many people think that primary index means the same thing as an index on a primary key. That is not how we define primary index, but there are people out there who call an index on a primary key as the primary index. To avoid confusion we tend to use clustering index and secondary index. An index sequential file is basically an ordered file which has an associated cluster or primary index. Now let us start with another concept dense versus spark indices. A dense index is one where an index record appears for every search key value. Note that it does not say for every record it is for every search key value. Here the search key is the ID. So, there is one entry per ID, but if you have something else let us say name it is possible that two people have the same name and then their dense index may have only one entry for that name may not be separate entries to the two records. In contrast, so this is another dense index on the attribute department name where there is only one entry with all the records with the same department name stored together. So, it is clustered on department name and then you have a sparse index sorry dense index with one entry per key value. In contrast, a sparse index does not have entries for every possible key value. It may have an entry only for certain key value. So, this is the same data sorted on ID now and what we have done is instead of having an entry per ID we have only three entries here. The first one points to the very first, the second one points somewhere into the middle of the file the third one points later into that file. Now, as long as the file is stored sorted on this you can create a sparse index like this. How do you use a sparse index? Suppose, I am searching for 15151 is it greater than or equal to this? Yes it is compared to the next one is it greater than or equal to 32343? No. Therefore, I will follow the first pointer and then search sequentially till I find it. But, if I now search for let us say 83821, I compare it with this it is greater, compare it with this it is greater, but this is the last entry. So, I will follow that pointer and then search sequentially to find this. So, what have I achieved with this sparse index? I have avoided looking at every possible search key. I have looked at only a few search keys and found the record that I want pretty efficiently. This is the key idea for indexing that you need to have some kind of sparse index. Now, sparse index has less space and less maintenance overhead, but it requires data to be sorted as I said. Now, how many entries do you create in the sparse index? So, coming back to the previous slide I arbitrarily chose about 4 or 5 records, 1 in 4 or 5 records is indexed. So, heuristic which is typically used is we take the data blocks in which data is stored and the sparse index has one entry per block. Now, again I am assuming that the data is sorted within this. So, it has one entry for the first block, one entry for the second block. What is a block? A block is the unit of fetching or storing data from disk. So, when I read data from disk, a whole block is read. So, given that a whole block is read, there is no motivation to store multiple pointers into the block. Anyway, the whole block is read and then I can search sequentially in memory, it is much faster than disk access. So, I do not need multiple entries per block. On the other hand, if I do not have an entry for a block, if my data is in the second block with no pointer, I have to go to the first block, then fetch the second block, then the third and so forth. So, a good tradeoff is one entry per block. Now, index like this with just two levels is usually not sufficient because this index itself can become very big. So, what we end up with is a multi level index, let us show it pictorially. This is the data which is already sorted on the search key. Then, you have sparse index on these blocks and the sparse index itself is broken into blocks. So, think of this as a single logical array with pointers to each block in the file at each block here in this sorted list. So, this is the first level. The next level of index has one entry per index block here. So, this is the inner and outer index. So, what happened here is, if I had a thousand blocks here, I would have a thousand entries in this level and those thousand entries may fit in say 10 blocks because each block can contain say 100 entries. Now, these 10 blocks, the next level index, I need only one block because I can store 100 entries per block. So, this is just one block. So, the upper levels of the index shrink very fast. They shrink by a factor of say 100 each step if I have a 100 entries per block. So, again we talked of primary index. We said that the data is sorted. Then, we can build a multi level sparse index. But what is the data is not sorted? Then, the trick is the following. First, the index records point to something here. We will call it a bucket. I am not telling you how it is implemented. Usually, this is at the leaf level of tree where you have pointers to the actual records. But these things are sorted on this search. It is a secondary index meaning the actual data is not sorted here. So, this is on salary. So, these things are, the index is sorted on salary. The data which is at the leaf level of the index is also sorted on salary and it has one pointer per record. So, every record is pointed to from here. So, the first one is 40,000 and that points to Mozart whose salary is 40,000. The second one is salary 60,000 which points to L side history teacher whose salary is 60,000 and so forth. Now, any secondary index like this has to be dense meaning it has to have one entry per search key value and further that entry must have one pointer to every record with that search key value. That is required. So, those are the general concepts. These general concepts were applied in real systems for many, many years. For example, this multi-level index was done in a way that matched the physical layout. So, in olden days, you would have blocks which were within tracks and so forth. So, there would be maybe one block over here per let us say all the blocks in a particular cylinder. So, one track might have let us say 100 block or maybe some number of blocks, maybe it was less in that era and then if you take all the blocks in a particular cylinder together, that would have enough blocks here that it made sense to create one index block for that. Now, if you go across different tracks, there would be different index blocks here and so there would be one more level across the different cylinders. So, this was tied to the physical implementation initially, but later people realized that there is no need to link it to the physical organization and that led to the concept. So, that was one idea. The second idea is that as data gets updated, it gets out of order. How do you maintain this ordering of the search keys? So, that is an important thing. So, what an index sequential file does to keep the sort order? You may have to re-sort the file periodically, rebuild the index. This used to be a headache. Once in a few weeks, there had to be some schedule downtime during which the file is re-sorted and re-indexed. On the other hand, a B plus tree does not require any such thing because it automatically reorganizes itself with small local changes. Each reorganization has some cost. It is not free. On the other hand, you do not have to have downtime when the system is inaccessible because all these changes happen in small, small increments as the normal processing is happening. There is a minor disadvantage. There is extra insertion and deletion overhead. Time for insertion and deletion goes up. There is a space overhead. There is wasted space to some extent. But people found out soon enough that the advantages well outweigh the disadvantages. So, they are ubiquitous. Everybody uses them today. So, here is a small example of a B plus tree. This is a toy example where the nodes are very small. In this case, each node has four pointers from the node and three key values are in the node. So, what is going on here? Let us start at the leap level. This is an index on name. Is the data sorted on name? If you look at the data, you will observe that it is sorted on ID. ID is sorted. Names are not. So, what does this mean? What kind of an index is this? It is a secondary index. So, we have to have a pointer per key value here. If you see the key value pointer, this is called the leaf level of the tree. You see here, brand is here and to the left of the key value brand is a pointer to the record with a value brand. We are assuming for simplicity here that there are no two records with the same key value. If there were two people called brand, I would have to store two pointers, which is not a big deal. If there are hundred people called brand, then I would not have space in that node or maybe if I have a thousand people called brand, I am in trouble. So, handling duplicate key values is an issue and we will come back to that later briefly how to deal with it. For the moment, let us assume there are no duplicates. So, there is just one brand. So, one pointer to the record brand. The next one is Califairy. You see that pointer. There is one pointer to the record with Califairy, which is here. And this, I should fix this bug in this slide. The bug is that this pointer should start from here. I forgot to update this version of the slide. So, the pointer to Cric is to the left of the value Cric. And it points to Cric here. Now, by the way, all of this is pictorial. If you think of the underlying actual implementation, this is simply an array of bytes. And if a pointer is 8 bytes, which is typical, then there is 8 bytes of pointer here followed by string, which is the key. If it is fixed length, I know the length. If it is variable length, I have to store the length and the key value. And at the end of the key value, there is another 8 bytes of pointer and so forth. So, this is the physical, physically what happens inside the leaf node. But logically, we are showing it like this. Now, the last thing you will notice here is a pointer to the next node, which is not very important, because you can always go to the parent and find the pointer to the next node. So, here you will see that this node was pointed to from here. The next node's pointer is the next pointer in the parent page and so forth. Now, let us look at this next layer. There is a value Einstein. So, what does that value tell us? It tells us that if you go to the pointer to the left of Einstein, the values which are there are less than Einstein. If you go to the pointer, which is to the right of Einstein, we can be sure that the values are greater than or equal to Einstein, but less than gold. What about to the right of gold? They are greater than gold for sure. But what are they less than? Well, if you go further up, you can figure out that and this node in the tree, things which are less than Mozart are in this sub tree pointed to here. Since this is the last one, things which are greater than Mozart are in this other sub tree over here, which has further children here. So, what this tells us is that if it were greater than or equal to Mozart, we would not have followed this pointer. Therefore, this thing has things which are greater than or equal to gold, but less than Mozart. Similarly, here if it was greater than or equal to Mozart, but less than Srinivasan, we are here and if it is greater than Srinivasan, we are here. So, it is been established that Srinivasan rules BCCI. So, there is nobody greater than Srinivasan there, but in this tree, we have Wu who is greater alphabetically than Srinivasan. So, the point is that if you have a larger value than any of these, it is ok. It will end up at the right end of the tree and you have a value there. So, now, let us look at a B-plus tree by example. Formally, a B-plus tree is a rooted tree satisfying the following properties. First, all parts from root to leaf are of exactly the same length and any update to the tree must satisfy this property. There are many trees which are not fully balanced. So, the path from the root to one leaf may be of length 4, the path to another leaf may be of length 5. In particular for binary trees, you cannot avoid this. There will be different path lengths in general for different leaf, but this is not a binary tree. It has multiple length trees and so, you can make this happen. And the way you make it happen is to allow some flexibility here. Each node that is not a root or a leaf has between ceiling of N by 2 and N children. What does this mean? We have a choice. We meaning when the tree is built depending on what data was inserted, you may have as few as ceiling of N by 2 children for a particular node or you may have as many as N children. So, where did N come in from? What is the value of N? So, if I have fixed length keys, I can determine N directly. So, I am going to assume fixed length. How do I determine N? I know the size of a block. I know the size of a pointer. So, if I come back here, sorry, here, how did I choose that this thing has 4 pointers and 3 key values? That depend on the size of the block. So, this was a very tiny block and I decided that at most, assuming the names are fixed length, I mean, you can imagine that gold has spaces padding it. So, all names are a fixed length which is the longest name here. Who is the longest? I guess Trini Wasen of length 10 or so. So, you would have 8 bytes of pointer, 10 bytes of name, 8 bytes of pointer, 10 bytes of name. So, overall you had 30 bytes of name and 32 bytes of pointer. So, let us say this node was 64 bytes. So, I could back in 62 bytes of information. I cannot back in any more. So, that is how I came up with the number N. In this case, N is 4. The number of pointers that I can have. So, the B plus 3 will have anywhere between ceiling of N by 2 and N children. Similarly, a leaf does not have children, but it has values. So, if you come back here, a leaf in this case had 3 values. How about this leaf? It had 2 values similarly here. Can a leaf have just one value? Sorry, I went the wrong way here. Can a leaf have just one value? No. It must have between ceiling of N minus 1 by 2 and N minus 1. Why N minus 1? The thing is here, a node has N minus 1 values and in a leaf I must have value per pointer. So, I can only have N minus 1 pointers to records because they are only N minus 1 values. The last pointer is used to point to the next page in the sequence. Now, there are two special cases. If the root is leaf, meaning the tree has so few records that there is just one node which is both the root and the leaf, then it may have as many records as have been inserted. If the relation is empty, the index may be empty. But as long as the root is not a leaf, it must have at least 2 children. So, if the root is a leaf, then it can have anything between 0 and N minus 1 values. So, that is the special case when the tree is so empty, the relation may be empty. So, then these constraints cannot be met. So, these are two special cases. Now, the structure of a node I have already showed you pictorially. This is showing the same thing more abstractly. The p i's are pointers and the k i's are key values. So, k i are search key values. P i's are pointers. What do they point to? If this is an internal node, they point to a child node. If this were a leaf node, the pointers are record pointers. So, I am assuming that the structure is the same for both. The next thing to note is that the search key is in a nodar order. I assume that earlier on in the example. So, if you see here, brand caliphary and crick. If you can read it, the font is very small. So, if you cannot read it, these are sorted. Similarly, these are sorted. Furthermore, if you see across nodes, you will see that everything in this leaf sequence order is sorted. Similarly, if you go one level up in a tree, everything across these things is sorted. We have Einstein, Gold and Srinivasan and the top in this case has just one, but if there were multiple key values, it would be sorted. So, the leaf nodes we have already seen that they store pointers. So, as I said, if L i and L j are leaf nodes and i is less than j, that is in the sequence L i is to the left of L j, then the search key values in L i are less than or equal to the search key values in L j, that we saw pictorially. So, as I said, b plus 3 is generalization of the multi-level sparse index. So, the non-leaf nodes form multi-level sparse index on the leaf nodes. So, that is the basic idea of a b plus 3. The difference from is, how do you maintain it when there are inserts and deletes? Given that it is a multi-level index and this is something which we saw, all the search keys in the subtree to which p 1 points are less than k 1. So, if I am at any node of it, whether it is a root or any internal node, if I look at the value k 1, the values which are in the subtree which is below p 1 are definitely less than k 1. The values in the subtree 0.82 by p 2 are greater than or equal to k 1, but less than k 2 and so forth. Till the last one, where you can say the values are definitely greater than or equal to k n minus 1. What are they less than? Well, that depends on the parent. So, here is another example of a b plus 3. Earlier, I had up to 4 children and minimum would be 2 children. Now, I have 6 children up to 6 children with a minimum of 3 children at the leaf node, sorry at an internal node and the leaf node would have between 3 and 5 values because ceiling of n minus 1 by 2 is 3 and n minus 1 is 5, n is 6 because there are 6 pointers here. Any non-leaf node other than root must have between 3 and 6 children and root must have at least 2. So, the point is you can have b plus trees with wider nodes and as you just saw the tree become shorter. So, here are trees are really toy trees with 15 records or so. But in real life, you have trees on relations with millions of records. So, there are multiple levels of that tree. Also, the tree the n there the number of children for internal node n is usually much larger than the 4 or 6 or so that we have used an example. It is usually of the order of 100 or 200 or some such number. So, what this means is the leaf you know each leaf has a pointer to 100 records let us say on average or minimum of 100 depending on what is in. Now, the next level up will have the same kind of structure, but the size of the next level will be 100s the size of the leaf why come back here. If you see here this had a number of nodes at the next level up there is only one pointer per node. So, if you had a 100 nodes here there are 100 pointers from the next level up and if n over here the number of pointers per node maximum is 100. One node is enough at this level to point to all the 100 nodes here. If instead of 100 we have 300 nodes here then they would have to be at least 3 children here. Sometimes it is more because the minimum number of pointers let us say is 200 sorry let us say the maximum is 100 and the minimum is 50. Then if you have 300 nodes at this level you may have up to 6 nodes at this level and at least 3 nodes at this level. At the next level you would have exactly one node. So, that is the kind of thing that happens. So, the number of nodes decreases sharply as you go up each level. So, if you look here this quantifies it in terms of n. So, the root has at least 2 children the level below that has at least 2 times c of n by 2 values and a corresponding number of children little bit more than that. Then next one has at least 2 times ceiling n by 2 times ceiling n by 2 values and so forth. Each level grows by a factor of n by 2. So, the number of levels you will have at most are log to the base of n by 2 of k where there are k search key values on the file. n by 2 as I said is pretty big if n is 200 n by 2 is 100 log to the base 100 of a million is just 3. So, million records will have b plus 3 with only 3 levels. If I have 100 million records it would be 4 levels and so forth. So, even with a lot of values b plus 3's are really short structures and that is important to avoid to minimize the I of. So, now let us look at the operations on a b plus 3 what are the operations insert delete update and so forth. So, let us and before that queries that is a very first one. So, how do you do a query you start at the root and say while the current node current node is initially root if while it is not root let I be the least value which is less than or equal to the key value. If no such value exist said the child to the last pointer otherwise it should be one of them. So, for example, if you are searching for Crick which is here if you look in this node again if you cannot read the text it is we are looking for Crick the we want the least value we least value I such that Crick is less than or equal to k I. So, here Einstein I equal to 2 Einstein is the very first one which is such that Crick is less than Einstein. So, now I will set c equal to pointer I plus 1 sorry this is a special case when v equal to k I here we will set c equal to p I it is less than. So, k 2 was this p 2 is this one and we will come down here and we keep going down till we hit a roof roof leaf I mean once you have hit a leaf we check if the key value is present in the leaf. So, v is the key value if there is an ith entry in the leaf which is equal we have found the record we want otherwise we return failure the record does not exist. So, as I said the typical fan out is 100 of 200 of some such. So, the tree height is 3 or 4 if you had a binary tree on the other hand with a million keys you would have 20 height of 20. Now, why does this difference between 4 and 20 matter it is a factor of 5, but if it is all in memory who cares, but it is not the point is these nodes are on disk every time you want to retrieve a node from this if it is not already in the buffer I have to pay a big price. How big is this price something like 10 milliseconds. So, if I had 20 accesses each taking 10 milliseconds I have just taken 200 milliseconds which is one-fifth of a second. So, my disk can only support 5 accesses per second which is quite bad on the other hand if I use a B plus tree and it had height of 4 what have I done now each one takes 10 milliseconds. So, in 40 milliseconds I have accessed what I want. So, in one second I can have 25 accesses. So, the difference between 5 and 25 is quite significant my throughput can be 5 times as much as with a binary tree. So, that was queries now let us focus on insertions this is the key idea behind a B plus tree. So, far a B plus tree look like a multi level index which we saw earlier the except for the fact that the number of children can be variable and here is how we exploit that in insertion. So, let us do it by example it is not read all the text here. So, the first thing to notice that if a node is full leaf node is full and we want to insert a record. So, the first step is to find the leaf node we have to search down to the leaf node which would contain the value. How do you do this? So, the first step in insert is to search for that key value use the search algorithm which we saw we will land up at a leaf and if the value is already there it is a duplicate. So, we will have to deal with that otherwise we have found a leaf and we need to insert a new value here in this leaf. Now, if there is space in this leaf. So, let us go back to for example, supposing we inserted a new value let us say I do not know what the near click say crack which is below click. So, we are inserting crack we come down to we search for crack we land up at this leaf and there is space in this leaf there is empty space at the end of that leaf. So, what I will do is I will move click to the right and insert crack because it is less than click, but greater than caliphary. So, crack will come in here I will store a pointer to the record with crack I am done that was a easy case. The problematic case is if the node is already full supposing I insert something here something between gold and kim. So, let us suppose I insert Gordon who would be land up at. So, the search for Gordon will land up at this leaf and there is no space now what to do the key idea of B plus 3 is that we split this node and create two nodes half of the records will be in one node half will be in the other node that is a key idea and that has given us enough space for the new value which is being inserted. Now, if I have created a new node of course, I have to do an update at the next level up I need to do something here. So, I will have a pointer to the new node I need a new key value here to differentiate between the two nodes which I have just created. So, all that has to be done at this level. Now, if it so happens that the insert happen here at this level may be I have enough space and I can adjust things here, but if I change it you know if I need to add a new entry to this node there is no space. So, then I have to do the same thing here I have to split this node which can propagate up. So, that split can cause split of a leaf can cause a split of its parent which in turn in some rare cases will cause a split of its parent and all the way to the root node. It is unlikely that a split will reach the root node, but every once in a while it does happen. So, that is the key idea. So, in our example we had Adams, Caryfiri and Crick we added Brandt. So, Adams and Brandt landed up in one node Caryfiri, Crick landed in the second node. Now, we have to update the parent node. So, here is the initial state with again if you cannot read the text it is ok sorry we had Brandt we added Adams I mixed the two up. So, we had Brandt, Caryfiri and Crick and I added Adams. So, what happened this node split Adams and Brandt landed up in the first node Caryfiri and Crick landed up in the second node. Now, I need to add an entry to the parent here to differentiate between this. If I am searching for a record should I be in here or here what is the value that helps differentiate between these two nodes and that is the minimum value in the second node Caryfiri. So, what happened here? This one pointer to this node is replaced by two pointers one to this node and one to the second node and the value in between is the least value here which is Caryfiri. The other keys and pointers here are shifted to the right you will see that gold has moved to the rightmost value and the pointer to the right of gold has now moved there. So, same node with the pointer has moved here. Similarly, the pointer to the right of Einstein has moved there Einstein itself has moved everything got shifted. This is the key idea if there is space you insert there. If this is out of space then again you have to split we will see an example. So, here is this example this is the previous tree and into this we insert a new record lamport. Again if you cannot see the font it is the key step is to find out where lamport goes is lamport less than Mozart yes come down here. If you look here Caryfiri Einstein gold is lamport less than gold no it is greater than gold. So, I will follow this pointer and this leaf has the following values gold cats and kin and I am inserting lamport into this. So, what is the result? I have to split it into two nodes with the lower two values in one node and upper two values in this case in the other half here and half there. So, gold and cats landed up here and kin and lamport lined up in this node. So, what I have done is two nodes have been created I need a new pointer to this node, but is there space here there is not this node already has four pointers down and I am trying to add a fifth pointer. So, what to do I am going to split this node the key question is how do I split this node. So, first think of it this way I will first slightly expand this node giving it extra space. So, what do I store here I split this one into gold kin gold cats and kin lamport. So, what I will do here is add a key value kin and a new pointer to the new record here. So, these two pointers are both added here I mean one is already here this pointer the new pointer is added here with the value kin which is the least value here in between them because that is step one, but this node is too big it would not fit in a actual node. So, now I am going to split it in half with half the entry is going to one part and half going to the other. In this case there are five children right there were four and now a new one fifth child is added. So, I have to split it two three or three two here I have done three two. So, the first three pointers come here the last two pointers go there. Now, if you look at this node it had five pointers and four values when I split it though I have five pointers, but how many values do I have here I have only three values what happened to the fourth value the fourth value. So, when I split these three pointers went to the left this and the new pointer went to the right the key is what was in between these two pointers gold that is added to the parent along with the pointer to the newly created. So, I split this internal node into this and this and in the parent I added an extra pointer to the new node that is here this pointer and the value between this old pointer and this new pointer is gold. So, the split has now reached the root node. Now, it is possible for the root node to be full in which case what do we do we break it into two and add a new root which has a pointer to the two nodes created by splitting the root node. So, that is intuition and the pseudo code gives details of how to do the splitting in the interest of time I would not go over the pseudo code in detail, but you know do read it from the slide. So, if you see at a high level we try to insert if it does not fit we have to split it and splitting a non-leaf node is described here. So, the basic ideas copied to an in memory area which pays for extra pointers and keys inserted into that and then break it into two parts from p 1 to p n by 2 will go to one side ceiling n by 2 and from p ceiling of n by 2 plus 1 up to p n minus n plus 1 will go into other side and the key which splits p ceiling n by 2 and p ceiling n by 2 plus 1 is k ceiling n by 2. So, the entry k ceiling n by 2 and n prime that is a pointer to the new node created here is inserted into the parent. So, again the details are in the book. So, that is an insert at the last major operation is deletion. So, here what do we do the first step is to find the record to be deleted we remove the record from the main file if I am deleting from the file and then I delete it from the index. Similarly, when I am inserting I first insert to the file and then I come in insert into the index. So, now what I need to do for a deletion is remove the search key value and pointer from the leaf node. So, there is some stuff here about buckets will ignore it for the moment. So, it is easy enough to remove value and a pointer from the leaf node. Let us take an example supposing I wanted to delete brand. So, I will delete the record here and I will delete the brand and the pointer from this leaf node and now the leaf node has 2 pointers and 2 values. So, that is simple it is still not under full. But, what can happen is that the leaf node is still not under full. So, if I then do one more deletion the leaf may have 2 few pointers. This leaf should have minimum of 2 and maximum of 3 pointers to actual records. After deleting brand it is ok caliphary crick still satisfy the minimum of 2. If I then delete caliphary also crick is the only thing left there is just one pointer and that node is under full. We have to do something about it. So, what do we do if it is under full the what do we mean by under full one of the properties of a B plus 3 is it must be at least half full whether it is a leaf or an internal node. If it is less than half full we have a problem we have to fix it somehow to restore the half full property. And the key idea here earlier when we overflowed we split and the good thing is that if we were already full and then we added one more and split we can guarantee that each is at least half full that is obvious. Now, if you are less than half full what do we do. So, the idea is that we will look at sibling and try to borrow from that we are under full and we will try to borrow some entries from a sibling. Now, what happens if the sibling is also half full if it lends any entries it will become under full and then we have a problem. But the good thing is if your sibling is at the minimum and you are under full that means your sibling has at most n by 2 and you have less than n by 2. So, you can actually merge all the data in you and your siblings together into a single node. So, there are two parts there is redistribution and then there is merging. If you can redistribute redistribute if you cannot you can merge and you will merge. So, that is intuition. So, the previous slide talked of merging here. So, the point here is the node has too few entries and the entries in the node and a sibling fit into a single node then merge them. How to merge them will skip the details straight forward, but it is kind of the converse of splitting. You have to take a key value which is in the parent and move it down into the merge child I will skip the details. The other case is when you cannot merge you have to take some entries from a sibling and transfer it into this node. Again the leaf and the internal node cases are slightly different, but the basic idea is the same either case. Now, a deletion can also cascade upwards. How does this happen? I delete something the node is under full and I merge with another node. Now, I have to delete an entry in the parent. The parent is under full I try to redistribute I cannot because the siblings are also at minimum. So, I have to merge with the sibling. So, now a deletion propagates to the parent of the internal node and this can go all the way up to the root. In the root what happens was a special case I had a root with two children and after a deletion one of those children became under full the other is at half full. So, I cannot redistribute. So, at this point I am going to merge the two children of the leaf into a single child. At this point the root has only one child that is not allowed a root must have at least two. So, what I do is I actually delete the old root and make the child of that root the new root and then net result is the height of the tree decreases by one. So, that is how the tree grows and shrinks in height splits cause it to grow in height while merges cause it to shrink can cause it to shrink in height. Here is the example of deletion this is before deleting Stringivacin. Let us pretend that in the BCCI the other camp whoever that campus anti Stringivacin camp prevailed and deleted Stringivacin from BCCI. So, we search down for Stringivacin. Since this node we delete the entry now this node is under full because who is the only guy left behind there. So, we can merge it with Mozart sing. So, what we land up with is Mozart sing. So, now what happened to the parent? The parent had two children and those two children merged. So, this entry is gone from the parent there is only one entry the parent is under full. So, what do we do? We have to borrow from this in this case the sibling has enough pointers that it can lend a pointer. What is the pointer it lent? Gold. So, golds the pointer to the gold node came over here the this last pointer is gone the values Stringivacin is gone. So, I have two pointers one to this merged record that is a Mozart record one which I borrowed from here which is to the gold record. What is the value that separates these two? I could search down and find it here which is Mozart or a simpler way is I just look up here and the Mozart is the value that separates these two nodes in the parent. So, I will just copy Mozart down from the parent and copy it down here. So, I have two pointers with Mozart in between. But now something else has happened gold was here it separated this pointer and this pointer. Now, this pointer is gone from the leaf from this internal node. What happens to the value gold? Well gold is an important value because it distinguish between this one and this one. So, we have to actually move the value gold into the parent replacing Mozart. So, if you look down here this Mozart has been replaced by gold which moved up from here to here while Mozart moved from there to there. So, think of it as a slight rotation the value in the top came to the right and the value here went up. So, that is how we do redistribution. This is another example where from the previous one we deleted sing and move. So, if you go back to the previous one sing and move were the last two things here. If we delete both what happens? We try to borrow from the next node. So, we had gold cats Kim Mozart gold cats for one node and Kim was borrowed into here and it became Kim Mozart. When we do that the key value above has to change and in this case it became Kim. So, that is a there are some more examples of deletion with in this particular case the root had only two children and after some deletion the children became under full and got merged and now the root had only one child. So, the child became the new root. So, the new root is caliphary Einstein gold and the tree has become shorter from three levels it became two levels. I will skip the details and I will take a brief pause here to take questions.  So, suppose we are having a keyword search application then can we use session management technique for the purpose of caching of the results of the search query. So, you want session management to cache results of a search query. Certainly you know any system which supports keyword search like the web search engine they do cache results as long as the results are not personalized. If they apply a personalization algorithm for me which where my results may be different from yours caching may not be very useful, but if it is not personalized then it is useful to cache it. So, if somebody ask the same query again there is no need to execute it you just have the result and you return it and this is very useful because if you see many many people ask the same questions over and over again. So, caching is extremely useful for any search engine, but the connection to session I am not sure. So, keyword search at a search engine this is not done in the context of the session. There are many different users connecting and your it is caching across users. There is a different concept which is when you connect to the database in a session you may cache values locally. So, if you are using JDBC you cache certain things. So, if a query comes again you do not go to the database you serve it from the locally cached value. This is done often hibernate for example does caching of results from the database. There is a problem that the result may become out of date if the database is updated that is a risk. So, generally what happens is you do caching for stuff which does not change much. So, if you say that it is unlikely to change in 5 minutes I can cache it for 2 minutes and I may get slightly out of date data may be it is. So, for example, if you are a railway reservation system if I give a slightly out of date view of seat availability it is ok. I might tell you that I have 2 seats, but when you come in book there are no seats it is ok. You are willing to accept that most of the time this would not happen because initially there would be hundreds of seats when you came to book may be 100 came down to 90, but it did not matter to you. But at the end when the last few seats are there it is noticeable, but that is life. So, caching is used widely in such applications. Does that answer your question? I have a question related to read implementations. I want to know whether if the failure occurs the read system automatically takes over or does it need the human intervention? That is a good question. Eventually human intervention is needed, but immediately what the read system does is one disk is gone it detects that and if a request comes for data it has to serve it from the other disks. In raid 1 it is very easy it simply reads the data from the other disk. In raid 5 it has to read data from several other disks do an XORing in order to recover the data which was requested and then give that data back. So, it does that it keeps doing that until the raid can be rebuilt. So, how is the raid rebuilt? So, in the simplest form raid implementation the most common one the system will wait until you plug in a new disk at which point it will ask you shall I use this new disk and rebuild the raid and you say yes it will go ahead and recover the data on to that new disk. Now, a well designed system will let you do all this without shutting down the system. You can remove a disk and plug in a new one without shutting down the system, but other cheaper ones force you to shut down the system and change the disk and then boot it back up at that point it will ask for repairing the raid. Now, higher end systems will actually keep a spare disk. So, there are many disks in the system and it will keep a spare disk. As soon as there is a disk failure it starts rebuilding the failed disk on the spare one which is initially lying idle. So, it is doing nothing and it starts rebuilding it on the spare disk and recovers completely using this spare disk with no human even coming into the picture. A human must be told though because one disk is dead if one more disk dies there may be no spare disk left. So, human is warned, but the human can take some time if it is a middle of the night does not matter they can come the next day. In some cases with multiple spare disk they can come in you know once a week and remove all the dead disks and plug in new disks. So, many data centers follow this approach they will you know periodically once a week they will go through all the machines find all the dead disks remove them and replace them. We have techno India Rajasthan please go ahead. Sir, I have question from previous section. Sir, how to check the null values in the store result set? In the. Sir, first I get the get the values in the previous statement and then I get the value in result set. And now I have to check the values which is null in the result set how to do it? How to do that? So, the JDBC interface lets you call RS dot WAS null. So, supposing you fetched a value get int immediately after that you can check if RS dot WAS null that means the previous value which you fetched was a null value. Now, RS dot get int will return an int there is no null value in the integer domain.  But, in reality in the database it was null. So, at that point if you say RS dot WAS null you can figure out that the value was actually null that is how the JDBC allows you to access it. Immediately after fetching you have to check. Sir, I have one more question. Suppose, if I am having some data in table 1 of database 1. And I want to fire a query and the result set should get store in table 2 of database 2. So, how to do that? So, if you want to do it from JDBC you can write a small program that runs a query on database 1 gets a result set. And for each retrieved row it also opens a connection to the second database. And each row that is retrieved from the first database it takes those values and inserts it into the other table of the second database. So, it is easy enough to write JDBC program that opens connections to two databases at the same time two connections. However, if the data volume is very large this is not necessarily the best way of doing it. It turns out that if you insert one record at a time naively the number of records you can insert per second is relatively small. So, typical implementation might top off at 100 records per second. If you would insert one record per you know one insert statement at a time with auto commit on you are going to get may be 100 inserts per second. If you have a million record table this is really slow it takes a 100 per second how many seconds is it going to take? It is going to take 10000 seconds that is a lot of time more than 3 hours horribly slow for a relation which is not all that big it is only a million records. Now, it turns out there are some things you can do to tune this. First of all you can turn off auto commit and do a commit every let us say 1000 records or 10000 records that speeds up things significantly. And from 100 per second you might go to 1000 per second that might still take you 1000 seconds a lot better than 10000 but still pretty slow. So, an even better way is to do you know most databases have a way to dump well one or more relations into a file in some flight as form as key form. And so you do a dump and then on the second database you do a restore from that dump into load from that dump into another relation. How do you do this is database specific but most databases have utilities for dumping a relation into some as key format, comma separated value or other format. And on the other database there is corresponding way of importing data from this comma separated value format into the database. So, use the appropriate tools on the two databases it can be much faster. So, that same million records which took a you know 100 seconds something with 1000 seconds with JDBC might run in say 10 20 seconds with this mode. Why is that so because there are lot of overheads to JDBC shipping queries across getting results back then again shipping it over it is all very slow. But if you dump a database relation it is very fast copying a file from one machine to another is very fast loading from a file into the database directly also very fast. Okay sir usually in SQL we fire a query for this select star into table 2 in database 2.mdb we used to give some extension of the database. So, in PostgreSQL what is the extension of the database file. Okay I see what your question was your question is how to do it directly from the database. So, many databases support the ability to create a view of a relation on another database as a local relation it is a view and that view will allow you to query as well as to insert into the view. So, it is just a copy of that logical copy of the relation but not a physical copy. So, if you have a database which supports this you can first create a view on a separate database and then insert in you know select star from table 1 that is the method you said insert into the second view and the database system will automatically copy the data over yes that is a valid alternative for that. Now, does PostgreSQL support the ability to create views on remote databases I am not aware of this I have not used it as far as I know it is not there but I am not 100 percent sure about this. So, you can use one of the methods I told you. Because here my many colleagues were searching the file extension of the database PostgreSQL database and we were unable to find that. So, I was curious to know what is the file extension of the PostgreSQL database. Now, there is no file extension per say the database is stored in a data directory which if you went through the PostgreSQL installation thing the directory parts are given there. If you go in there there are directories and then within those there are sub directories there is a data directory within those there are many sub directories. There is no particular naming scheme there is no dot extension but those directories have files for different relations and within those directories there are multiple files which are parts of a relation. So, PostgreSQL does not tell you which is where it is possible may be to find out indirectly but directly you cannot look at the names and find out anything. Thank you sir. We have Sarvajani college Surat please go ahead. Sir, I am having two questions my first question is what is host pair and what is the use of what is the use in context with different rate levels. And my second question is can you throw some light on R tree real tree with respect to geospatial data what is that and what it is used for sir. So, the first question hot spare I think you are mixing up two terms in rate systems a spare disk is one which is not being used and can be used whenever some disk fails it will be used to repair that failed disk. Now, physically it may be sitting somewhere in the rack but it can be used the rate system will logically remap this thing. So, that it will rebuild the failed disk on the spare disk that is the notion of a spare disk there is a separate notion of hot spare which is at the database level. So, it is a hot spare is a copy of the database or it could even be a machine but let us stick to database level now. It is a copy of the database sitting somewhere it a hot spare is one where every update which is done in database copy in the one is also being made in the hot spare copy. So, the hot spare is up to date all the updates done here are also done there. Now, if the first copy of the database fails the hot spare can take over what I mean by take over the people who are submitting queries should know that they should go to the hot spare. This is done at the application server level. So, this is hidden from the end users. So, now the application server or some intermediary server will re-root request to the hot spare database and the end users do not even know that something happened they may see a slight delay when the switchover happens but after that the hot spare is processing queries and all transactions that committed in the first place would have been copied to the hot spare also. There are some issues with what happened in the very last second before failure that is discussed in the recovery chapter later on but that is what hot spare is. So, if you want to learn more read the chapter on recovery. Now, coming to your second question on R trees. So, far we have talked of B plus trees. B plus trees assume single linear sort ordering. So, if you saw we built it on names, we built it on integer all of which have a sort order. However, if you want to build it on spatial location let us take two dimensional location x y coordinate. Now, if I want to find what thing is exactly at this part I can still use a B plus tree meaning if I index on x comma y and the look up is also on x comma y exactly what is at that spot. I can build a B plus tree on multiple attributes and do an equality query on x and y no problem. However, the problem arises when I am looking for range queries. So, if I in a B plus tree I can look for all names between let us say, Soumen and Sudarshan or Sudarshan and Soumen in the alphabetical order. So, that is a range query. Now, in the context of spatial data I may want a range query which says give me all things which are located within this rectangular region. So, that range query of this form in two dimensional range query cannot be supported using a B plus tree. So, what you do? This is a common kind of query in spatial databases. Another kind of query is you know instead of rectangles I may have circles, but another kind of query is may be find me the nearest hospital to this spot. If there is an accident I want to take the victim to the nearest hospital. So, the query is find me the nearest hospital to this spot. Again hospital locations are there in a spatial database you could look at the crow flies distance or if you have road network that makes life more complex. So, R trees do not apply there, but if you just look at the physical distance which is the closest. So, nearest neighbor queries. So, these kinds of queries can be answered using an alternative index. There are many alternative index structures designed for spatial data. There are KD trees, there are quad trees, there are KD B trees, then there are R trees, R star trees, R plus trees. This is a huge number of different tree structures which have been created for this purpose. One of the very first ones and probably the most successful one is the R tree. So, R tree is a practically a very useful structure in terms of you know guarantees about complexity it is not very good. Its worst case complexity can be bad, but in practice people find that it works very well for spatial data. So, it is very widely used for spatial data. So, if you want to learn more about R trees it is not there in the chapter 11 which we are covering right now, but there are details in later chapter on I think it is 24 or something like that on spatial data. So, there is a description of R trees. So, you can learn more over this I will answer your question. Yes, thanks sir.