Tuesday, May 31, 2011

Database Tutorial

create table student(
id int,
name varchar(255),
marks int,
PRIMARY KEY(id)
);

create table lecturer(
id int primary key,
name varchar(255)
);

create table batch(
id int primary key,
description varchar(255)
);

One to One
alter table batch add column lectId int;

alter table batch add foreign key(lectId) references lecturer(id);

alter table lecturer add column batchId int;

alter table lecturer add foreign key(batchId) references batch(id);

One to Many

alter table student add column batchid int;

alter table student add foreign key(batchId) references batch(id);

Turn off Foreign Key

set foreign_key_checks=0;

Add data to batch

insert into batch
values (1,'.NET,1),(2,'Java',2),(3,'QA',3),(4,'PHP',4),(5,'Pega',5),(6,'Intern',6),(7,'C++',7);

insert into lecturer
values (1,'Madu',1),(2,'Shyam',2),(3,'Nimali',3),(4,'JJ',4),(5,'Sanjay',5),(6,'Mihiri',6),(7,'Keith',7);

insert into student(id,name,marks)
values (1,'Kalani',90),(2,'Nuresha',90),(3,'Sashikala',90),(4,'Nadeesha',90),(5,'Suresh',99),(6,'Lahiru',95),(7,'Sandi',80),(8,'Sheron',85),(9,'CJ',77),(10,'Achini',70),(11,'Chanks',65);

Sunday, October 4, 2009

Life goes on

It's might be a coincident that whenever I feel down I come and blog :) . Someone probably even think that I'm a totally miserable person. But honestly there hv been many ups and downs frequently and now I'm so done with all. I completely hated life at EPIC. I was so bored and all the time I was there I was thinking why couldn't I be at IIT, enjoying my studies which used to be something that I enjoyed most and actually kept me happy and cotented. But after one year, here I am, back in IIT, and studying as I wanted, but woooowi I'm NOT HAPPY. ;) Actually even I can't undertand myself. I remember A/L's, which was the milestone in school life which I enjoyed most yet I got fed up when it came to the end. ;) Life is so strange, it goes on and on and sometimes bring u to the same point where it all started. Today I'm in the same position I was in three yrs ago eargerly waiting to see how I tackle myself with everything comes on my way. :)

Saturday, July 25, 2009

I Think

Things went on in the same routine as in the past month.Office, BCS work, office, BCS work, Worries of final year all these things were giving so much trouble in the head. And I was mainly occupied in reading more on MJ and listning to music again. :) And it really bothered me how media used to verbally abuse Michael and after his death only speek of all the good things he did, yet again after couple of weeks of his memorial publish articles such as saying he's really not the father of his children and stuff, which in my opinion are quite ridiculous and plain crap. I really can't understand how these media can make those comments when those three children are crying in the loss of their beloved father.To this day I'm writing this post, it's been a month since he parted from this world. God must have been too stressed with all the work load to recruit the best entertainer in this world for him. :) Yet again I saw loads of good comments from fans and couple of critisisms as well, and I wonder what was the actual problem with him to be a victim of critics. What was so odd about loving children so much and wanting to spend time with them? Being an icon? Well then what about Madonna's obcession in adopting children? Is it fair coz she's a woman and MJ's a man? I do not know the answer. But one thing I know, since I was a kid I always turned to music when I was down. BSB,MJ,Westlife they all were part of my childhood and MJ was special coz he had the most amazing smile :) and when I was down their songs brought so much comfort and hope and made me smile. But today when I listen to my old collections it brings so much sadness coz the feeling MJ's gone strikes me like a blow and that makes me feel part of my childhood has vanished. I don't know if anybody understands what I'm saying :P Apolagies if I confused anybody :P Well it's been a tuff month with so much happenings, not to mentuon almost falling asleep in first Exco meeting :P I wish MJ could come back or probably he could actually go to Neverland and hope one day I'll be in Neverland as well. Far away from all the worries and playing whole day long :) Love u more MJ!!!

Saturday, June 27, 2009

Michael Jackson End of an Era


There's A Place InYour Heart
And I Know That It Is Love
And This Place CouldBe
Much Brighter Than Tomorrow
And If You Really Try
You'll Find There's No Need To Cry
In This Place You'll Feel
There's No Hurt Or Sorrow.............. I still remember almost 10 years back how I watched Michael Jackson's songs in MTV Most Wanted as amazed as every fan. Specially his Earth Song,Will u be there for me, We are the world touched my heart. He was inevitably the King Of Pop. But later I did not have much time for music but once in a while when I'm feeling down I turn back to my childhood hobies. And listning to my favourite music was one of them and always MJ's songs were among them. But yesterday morning when I logged into internet the first chat I got from a friend was a link, I just clicked on it and waited for my super ultra fast dial up conncetion to load the page and after few minutes only I realised the end of the link said Michael_Jackson_Dies_(http://digg.com/celebrity/Michael_Jackson_Dies_2). I was so shocked and could not belive what I was actually seen.I went to yahoo news for more news and yes the "King of Pop" had left us from a cardiac arrest.


I read a lot of articles, I herad about his trial and all but personally I think he should have lived more.In 2008 August 28 J Randy Taraborrelli, the journalist who reported 'Michael Jackson Turns 16' in 1974 and Michael Jackson Turns 21,writes an article for his 50 th birthday where he mentions "He later fancied himself as a new-age Peter Pan and tried to recapture his lost childhood in any way he could - not least through his famous Neverland ranch with all of its amusement park rides, zoo and its bucolic grounds bustling with happy children.". He further says that "Looking back, Neverland - which he bought in 1988 - was the worst thing ever to happen to Michael Jackson. It allowed him too much solitude and gave him the chance to isolate himself from his friends and family, and from common sense. He surrounded himself with children, animals and a false reality - so much so that he never learned how to cope in the real world. He never wanted to grow up, and his managers encouraged these eccentricities when they should have encouraged therapy. They allowed him to live an excessive life and spend money like there was no tomorrow".


This clearly proves how ones childhood afftect the entire life.If Michael Jackson had a normal childhood like the other kids and got the love,afftection and care his later life would have been more beautiful. And also it surprises me how media who gave an image of a monster to him now talking of him as a god. I came across articles where they speek all about his charty work and how he contributed for humantarian yet he was the victim of media criticism for the past 10 years.



This is how the article ends from the writer who has reported more on Jackson in the past 30 years than anyone else - including having written three best-selling books about him concludes his article on Mchael's 50th birthday, 'It's what he hangs on to, the chance that he'll be able to relive the glory days through one of his children. But for a man who is so obsessed with youth, so intent on remaining a child, many fear his birthday will be a day of reckoning for Michael Jackson. He has no plans to celebrate, other than in some small, private way with his children.
And this time there'll be no big interview with me - or anyone - to commemorate the occasion.
He has even begun to regret having plastic surgery and spends much of his time staring at his reflection in the mirror.'I don't know what I was thinking back then,' he recently said. 'Everyone makes mistakes when they're young, I guess. But I still look OK, don't I? I mean, for 40?' When reminded that, in fact, he was about to turn 50, Jackson gave a sad, half smile. 'It all went by so fast, didn't it? I wish I could do it all over again, I really do.' But for Michael Jackson, it seems, the time for a comeback has passed. 'I'm tired,' he said last week. 'I've got nothing left to give. I just want to be left alone. Is that so bad?' '


My post is not complete if I don't include this,"In addition, Jackson believes that the masses of fans who once flocked to his concerts won't be there for him today. He fears they have been turned against him by the trial. At a recent meeting with a promoter in Las Vegas, he expressed amazement at the success of the recent re-release of Thriller. 'I'm really shocked,' he said. 'I can't believe people actually bought it. I heard it sold more than three million copies. Can you believe it?'

It is a question if we,his fans were there in his darkest hours and his trials and his deepest despair but today fans all through out the world are crying out for him but he's not there anymore to see how much we care.

Farewell Michael Jackson, your songs will be with us till you come back in a new form coz I thoroughly believe god should have been more fare to you and hope you will have a blessed life in your next birth and the you will get the love, afftection from that you so earnestly carved for and you will do wonders in the music industry again.

In Our Darkest Hour
In My Deepest Despair
Will You Still Care?
Will You Be There?
In My Trials
And My Tripulations
Through Our Doubts
And Frustrations
In My Violence
In My Turbulence
Through My Fear
And My Confessions
In My Anguish And My Pain
Through My Joy And My Sorrow
In The Promise Of Another Tomorrow
I'll Never Let You Part
For You're Always In My Heart.

P.S If anybody's wondering why I'm stressing upon his childhood I'd like you to read this part on an interview with The Times Magazine in 1993. The article says "Jackson's life was never, ever normal. For a celebrity of his magnitude, to be seen is to be smothered, to be a star is to be a freak, to be loved is to be abused. A poignant and appalling case history that could have come straight out of Krafft-Ebing, Jackson's childhood was marred by mistreatment. In a 1993 interview with Oprah Winfrey, he recalled his youth, when his father Joseph was making millions off his sons' popularity. Jackson said that in puberty — "very sad, sad years for me" — his father routinely called him ugly, "and I would cry every day." When Winfrey asked, Did your father ever beat you? Jackson tried to smile as he said yes. Then, in an aside to his father, he added, "I'm sorry. Please don't be mad at me." With that wincing smile, Jackson was like a wounded orphan who has walked through fire and has booked a return trip."

Saturday, May 16, 2009

Once in a while

Hi again, I hven't had written anythng for a long time, not because I didn't have anything but last few days it was like I had lost the reference to my vocabulary class. Well I decided to write this at an unexpected time, it's 1.24A.M at the time but after watching a movie I thought of writing this. Normally I hate Hindi movies specially old ones coz of the laguage used at that time, dances and sometimes I thought those love stories were simply stupid. But as x-files was cancelled I was switching channes checking if there's anything interesting and came across Rupavahini as well saw a guy whom I have seen acting as grandfather now(After little bit of searching found out it's Rishi Kapoor).Somehow I was totally surprised seeing a younger Rishi Kapoor(well I thought it was him at least) that instead of switching off the tv I got curled up in my chair getting ready to watch it, thinking the fickelty of life comparing the actor in tv and the grandfather in Fanaa. Well I'm really really sleepy now I'll finish the rest tomo. SORRY!!!!

Saturday, March 14, 2009

Twilight

Hi there everyone, after all of my bored and frustrated notes I'm gonna write something which made me feel alive. And it's none other than the Twilight saga. After seeing the trailer on yahoo movies last year although I planned to catch up the movie the circumstances were such that I never got a chance to get hold of it till two weeks back when my friend announced that she got the ebooks. But as didn't bother to finish the previous books she gave me simply coz the stories really didn't are not my kinda stuff ;) she was reluctant to send it coz she thought I'm never gonna read it. And after convincing her my attitude towards vampires I got the books after agreeing taht she's gonna ask me questions regarding the books to make sure that I read them ;).

And I already knew the abstract from the trailer butthe first page itself managed to keep my eyes glued to it. It's the best vampire book ever written in the history I would say. Well better make it the best vampire book tht I hv ever read. :) To brief the story it's about a teenage girl , Bella who moves to Forks, and falling in love with a vampire. But the fascinating part is Eddie, the vampire and his family are different from there own kind and do not drink human blood. Rather than describing the story here I'll simply say it's the most touching love story of the decade and not only love, it's full of action, adventure, misery all those feelings that we can hardly get from one single book.


I have always lived my life with the characters from my story books and tv shows as long as I can remember, Josh, Paul, Riana, Kathy, Julian,Harry to name a few. And I never imagined after reading Harry Potter any book would make feel it's so real and unpredictable and keep me glued on to the seat. But Stephany Mayer proved me wrong with Twilight series which consists of five books Twilight, New Moon,Eclipse, Breaking Dawn, Midnight Sun. And currently Catherine Hardwicke had put the first book into a movie with Kristen Stewart as Bella Swan and Robert Pattinson as Edward Cullen and I would like to give her my heartiest gratitude towards the hard work they have done to make it a success. And wish all the very best for the second movie of the series, New Moon which is gonna be released in November 20. I should admit the movie's missing some very important and emotional parts from the book but altogether it's a good attempt and Edward Cullen and Bella Swan truely match the characters described in the book.

I am simply crazy about the whole Twilight series right now, not to mention staying home having a leave from the company to simply read the book. ;) It's like finding water in a desert I must say. I guess all this time I was missing the taste of a good book and as it's being a while since I last read something absolutely awesome like this but Twilight was a good push to awake the reader inside me. I invite all of u to read it. Trust me the books worth it. :)

Tuesday, February 24, 2009

Endless Persuing

Well, today was another disappointing day for me and it's been like this for two weeks. And I was thinking how life moves swings between hapiness and sadness while mom was doing shopping in Keels. We were about to go to the cashier when couple of people surrounded a man and the security person start hitting a man. Though I did not see the face I saw him fallin on to the floor and the security guy was hitting him with the foot and that man was begging not to hit him. It was obvious that man had tried to steal something and the security guard tracked him using the cameras. A poem which I learnt in O/L Literature came to my mind inevitably, "Plead Mercy" but in that case it was a cow but today I saw a human being hitting another human making him fall and kicking him with the legs and dragging him to another room, and god knows what they did to him after that. Theft is always wrong regardless of any reason to perform such an act. But I thought for a minute, what if that man saw something his children so eagerly wants him to buy and he can't afford it, what if it was some food or a chocolate for the children.More than everything kicking a human being like an animal is unacceptable regardless of what he did. Well I really don't know what I'm trying to emphasize here but whatever we do the final expectation happiness, either self happiness or bringing happiness to ur loved ones. And today I feel down as happiness has gone so far from my reach these days and I have no idea where I lost it and another human being got kicked like an animal and was pleading for mercy as he followed a wrong path to find happiness. I do wish god would grant everybody with happiness so humans will be traeted as humans rather than become an animal themselves and treat others like cows.hmm end of another confusing day...............

Thursday, January 1, 2009

Happy New Year


Wish you a very happy new year everyone.Hope this year brings you all the happiness and prosperity throughout the year.Today's a holiday for us. Yeppiiiiiiiiiii :). Even if it was a working day I wouldn't have gone coz Jan first I hv always being at home.:) It's not good to spoil the tradition right?
I'll step back to 2008 which I still can't believe is over.The January first of 2008 feels like couple of hours back ;).It's the year I most feared to welcome I thought I'd either go crazy or get over it.But I didn't go crazy neither did I get over.It's the same old me. Nothing is Ever Forgotten. :) I did reach some of my goals too. I had a dream of graduating before 20 but I somehow graduated in 21. Not so bad huh? ;)2008 was full of happenings happiness,sorrow,achievements,disappointments,new frineds,understanding about current friends goes the list so on.Going back to the beginning of 2008 I got a really bad news came on the first week.Then by the end of Jan I got sick with some viral thing and had to be in home for two weeks and the day I recovered I had the Computer Systems Organizaton test.No idea how I wrote it but I got an A.Hats off to u for the help.Then I was sick for my birthday and couldn't have the party for my 21 st birthday.But the most horrible thing was loosing my dear old mobile phone which I carried around with me everywhere even after getting the new one.It wasn't just a mobile.I lost touch with all my school and BCS friends and all the sweeet messages from friends.More than that it was my first mobile :(. What else did I loose?? Four teeth because i had to put bracers. And I did a really big mistake by quitting the first company who offered me internship and a good projject and the chance to code from my second day.Then I did a really big mistake by going somewhere else which is soooo boring :( .Then came another time full of hardships when I was sick and the doctors couldn't find the reason coz all the reports were normal.And last but not least I muust mention Imagine Cup as well.Now I'm gonna move to the good parts.I wasn't had working in the second year but managed to get A's. And oh my god the Copmuter Services Management paper of the BCS exam which I wrote shivering with fever and nothing on my mind but ultimately ended in succeeding :). Thank you god!!!!Thank you so much!!!And passing the Network paper of the BCS exam was a miracle too coz all the questions in the paper were new and nothing I studied. And I'm sooo glad I got through the BCS final level without going to classes.(I did join, but as I always got late I kind of stopped going ;).Thank you god for helping me to graduate in 21. And hats off to all of you who helped me in some way.Hmmm and finally I got to be in a project which has image processing after being jobless for fiv months.Hopefully I'll get to code in image processing module.As I said before this year (oops sorry, last year) was full of happenings. Everything was happening like a butterfly effect.It was cool but hard too and I wonder if anybody went through more than this.If so I'd like to know.

So everyone Happy New Year again :).

Wednesday, December 24, 2008

Jingle All The Way


Ho ho ho Ho ho ho Merry Christmas everyone!!!!! Merry Christmas!!!!
Thought this would be a better starting on this special day.The cold breez and the smiling faces made it hard for me to feel gloomy and find any fault to grumble about office ;) . Christmas has always being the season to be light hearted, free, cheerful what's more feel on top of the world. :) Well gradually the spirit is moving away year by year, it had being ages since I decorated the christmas tree and waited for Santa. Yep, I believed in Santa till I started preschool coz my Christmas presents were waiting for me in the Christmas morning. So bad mom, u guys were fooling me :(. Today no christmas presents, no christmas tree, got only today to celebrate and stuck in office where as I had a whole month to celebrate till this time.Oh am I grown up now???? :( .And I should note here all the fun times I had with Nadeesha, my best friend. Miss u girl. Hope u still remember all the super crazy stuff we used to do in December vacation as I do. Oh and the best thing was watching Christmas movies ;) . There were soooo many nice Santa movies like I'm home for christmas,Jingle all the way, oh and soo many movies where christmas wishes come true in Art TV home movies, TNL, even ITN and Rupavahini and lastly ETV.Hmmm hope they'll telecast at least one nice movie today ;). Ah so many Happy Memories at the Christmas parties too and not to mention the delicious yummy christmas cakes ;).Things are a bit boring but all those memories bring a smile to my face and yes it is hard to feel gloomy and I wanna say loudly I'm sooooo happy and wish a merry christmas too.Jingle all the way guys ;)

Tuesday, December 9, 2008

Random feelings

Well I was actually planning to write my Interior Monologue part 2 but during my free time at office which is almost all the time there as I'm blessed with some misfortune to be sitting jobless I was reading stuff on the internet. Well that would range from technical stuff to paranormal ;). There were some facts which thoroughly drew my attention,mmm would be more appropriate if I say which made me sad and think twice.In many stories and poems people were lamenting over what they let go. Well in my case it was only a placement of one year which is the most important thing for me in this year but these people have let go of their preacious love.And then alas lamenting over it, thinking of the past and wishing they can go back in time.But what surprises me is had the circumstances been that much worse that they had to take a decision and let go of love.It just surprises me can you really let go of your love if it means so much as to lament over ages.I'm not reffering instances where u let go of him or her for that person's good or if there are distances between you. But there were incidents people did that for no reason maybe coz they didn't understand how much they loved the other till they lost that person.I wonder how this feeling consisting of four words brings so much happiness and so much sufferings to one's life.Yet I feel it should be something withing you and pure and it should not always end up achieving the person,but here I'm not saying that you should let go either but if you can't have your love by some means people should be happy by seeing the other's happiness, well like a silent love.I think that'll be a cure to the lamenting,frustration, sufferings and so on........ But most importantly hold on to your love when you've got it coz once broken, the heart is the least possible thing to replace and more than that I can't bear to read any more blogs posts and stories and poems of people's sufferings coz they let go of love which I believe to come once in a life.Believe in your love and god will lead you to him or her.Oh I guess that was tooo much from me. okmanymanyapolagiesifIwasted ur time. Just hold on o what your heart say and not what the world expects from you.Do every possible thing to hold on to your love and still if you loose you can comfort your weepingheart sayin tht you did your best to stop him or her. ;)Good Luck everyone.

Wednesday, November 12, 2008

Intel's Core i7

Intel is now introducing the sucessor to the Core 2 processor named Core i7 which has both improved performance and higher efficiency.Since Intel is re-introducing Hyper-Threading to its desktop CPUs in the Core i7 line, the new processors show a marked performance boost in many modern multi-threaded applications. Simultaneously switching to Socket 1366, the X58 chipset, and a tri-channel DDR3 interface, Intel is once again launching both a new generation of processors and an entirely new platform complete with a corresponding leap in performance. The last time we saw a performance improvement of this magnitude was when Intel moved from the Pentium 4/D line to the Core 2 architecture.However, the new Socket 1366 also comes with one disadvantage: the spacing between the mounting holes for the coolers has increased, meaning you’ll need a larger cooler and a new mounting clip or retention module when you make the switch. As a result, no Core 2 CPU is compatible with any Core i7 boards and vice versa. On the plus side, a cooler is included with the boxed version of the processors. On the other hand The new integrated memmory controller offers much higher throughput and is even superior to AMD’s solution on the desktop. The Core i7 is going to leave Intel’s rival AMD lagging even further behind.Have fun with core i7 everyone :)

Sunday, September 14, 2008

Old is Gold

Couple of days back I realised that it's being a while since I last wrote a blog post.Well I was not exactly busy.But my thoughts were too confusing and I had to distinguish them before turning them into a blog post.Well seriously I'm not too sure what exactly to write either I have no thoughts or I have too many complicated feelings.But I'm sure of one thing that is I'm missing the life I used to have before starting placement.Yeah it's true that I really wanted a change in my life but this is not the change I was seeking.I truly miss going to IIT,getting late for lectures and running up to 5LA coz I never take the lift,sleeping during the lectures ;) ,taking notes, doing course works well this includes all that I used to hate well not hate but these were things that I didn't enjoy at that time.But I truly I miss those days coz at that time I at least had an urge to get up in the morning and get dressed. There was always something new that had to encounter.And I seriously miss travelling from Kaluatara too.I miss passing all the bridges,looking at the beach and the mornng sun and praying that the AC bus wan't meet wwith an accident.he he. But life is a disaster now.I mean there's nothing for me to look forward to next day.Everyday is just another plain dull day except weekend when I go home.And work is the most boring place I've ever been.Well I must admit the people are the most boring I have ever seen (no offence coz maybe there's something wrong with me too).And I hate travelling daily by the over crowded 138 :( .Well currently I feel myself has become a disaster coz I have been there for more than one month and I haven't been trained on anything new except the report generation and java persistence wich were done by a collegue who was kind enough to spend his time on us.But other than that from the company side there has being no real training session or anything of the sort.So I only gaze at a dumb screen or spend time chatting.So I have nothing to say other than office sucks.Well they gave me to write a user manual but hellooo I want to learn something new and I can alraedy write in English, and I am thouroughly disappointed that one month and two weeks of my time is wasted in this place and there's no improvement in my coding skills which I always wanted to improve.Well do u still think that I'm moaning about life not enjoying as it is? Well maybe I am n I'm not gonna defend myself coz I just wrote down what I feel and hey it's my blog so I can write my own mind ;) .Well now I am looking forward to going back to IIT and see all the old faces and get myself in the old lifestyle. I want my life back n I want to smile again, a genuine smile.