Chetan Bhagat | Chetan Bhagat Novels | Download Chetan Bhagat's ebooks | Free Download |


Chetan Bhagat

Chetan Bhagat

Born
April 22, 1974 (age 35)
New Delhi, India
Occupation
Novelist,Columnist, Banker (ex)
Nationality
Indian
Genres
Fiction, Management, Humour
Official website
Chetan Bhagat (Hindi: चेतन भगत), (born 22 April 1974) is an Indian author who has written Five Point Someone - What not to do at IIT , One Night @ the Call Center, The Three Mistakes of My Life and 2 States - The Story Of My Marriage. He has also written the script of Hello, the Hindi movie based on One Night @ the Call Center.


Personal life
Chetan Bhagat was born in New Delhi and studied in the Army public school. He studied Mechanical Engineering at The Indian Institute Of Technology (IIT) and then studied at Indian Institute of Management Ahmedabad (IIM) where he was named "The Best Outgoing Student". He worked as an Investment Banker with Deutsche bank for eleven years in Hong Kong and moved to Mumbai with his wife Anusha in 2008. Later he gave up his job to devote his entire time to his writings. He is married to Anusha, who was his classmate in IIM.


Writing Style
Bhagat's writing style tends to be simple, with linear narratives and vivid storytelling. His protagonists tend to be named after Lord Krishna, like Hari, Shyam, Govind or Krishna. All his books have a number in the title (eg. 'five' in the first, 'one' in the second, 'three' in the third and 'two' in his latest book.) When asked about this Chetan replied 'I'm a banker, I can't get numbers out of my head."
In response to poor reviews from critics, Bhagat described the books as entertainment, rather than attempts at serious literature.
He is a columnist with Dhainik Bhaskar & The Times Of India, and writes on political issues.


Novels


As a columnist
Bhagat has an op-ed column in Dainik Bhaskar, a large Hindi newspaper and another at The Hindustan Times, an English daily. He says "The main purpose of the books and films is to entertain, but the columns allow me to give my views on how the nation should be run."
Some of his columns have been discussed in the Indian Parliament. His articles are written in simple English to achieve mass appeal. He also visits Educational Institutions in India to give motivational talks. His speech 'Spark' in Pune attained widespread fame and was published in many newspapers.


Chetanblocks controversy
On 7th Dec 2009, Chetan Bhagat clashed with his followers on Twitter ,following an argument over one of his tweets lamenting piracy of his books.He threatened to block them,which made his followers and other Twitter users furious. "#chetanblocks", became a trending topic for hours on twitter.Later he tweeted the reasons why he threatened to block some tweeters.


Awards
  • Society Young Achiever's award in 2004.
  • Publisher’s recognition award in 2005.

Download Chetan Bhagat's ebooks free!!!


Film Adaptations
  • Hello (2008)
  • Three Idiots (Set to release by December, 2009)
  • 3M The Three Mistakes of My Life

Five Point Someone - What not to do at IIT (2004) | Chetan Bhagat | Free Download | Chetan Bhagat book | Free ebook | Chetan Bhagat 's Five Point Someone - What not to do at IIT (2004)


Five Point Someone - What not to do at IIT



Five Point Someone - What not to do at IIT  
Five Point Someone-What not to do at IIT.jpg
The cover of Five Point Someone - What not to do at IIT by Chetan Bhagat.
Author
Chetan Bhagat
Country
India
Language
English
Genre(s)
Fiction
Publisher
Rupa & Co.
Publication date
2004
Media type
Print (Hardcover &Paperback)
Pages
270
ISBN
8129104598
OCLC Number
56904175
LC Classification
MLCM 2004/00384 (P) PR9499.3.B
Five Point Someone - What not to do at IIT! is a 2004 novel written by Chetan Bhagat, an alumnus of Indian Institute of Technology (IIT) Delhi and Indian Institute of Management (IIM) Ahmedabad. This was his debut novel. It is one of the highest selling English novels published in India, and remained on the bestseller list until now since its release in 2004,tied along with other novels byChetan Bhagat.


Synopsis
The novel is set from the Indian Institute of Technology, Delhi, in the period 1991 to 1995. It is about the adventures of three mechanical engineering students (and friends), Hari Kumar (the narrator), Ryan Oberoi, and Alok Gupta, who fail to cope with the grading system of the IITs. The three hostelmates - Alok, Hari and Ryan get off to a bad start in IIT - they screw up the first class quiz. And while they try to make amends, things only get worse. It takes them a while to realize: If you try and screw with the IIT system, it comes back to double screw you. Before they know it, they are at the lowest echelons of IIT society. They have a five-point-something GPA out of ten, ranking near the end of their class.
The book is narrated in the first person by Hari, with some small passages by his friends Ryan and Alok, as well as a letter by Hari's girlfriend Neha Cherian. It deals with the lives of the three friends whose elation on making it to one of the best engineering colleges in India is quickly deflated by the rigor and monotony of academic work. Most of the book deals with the numerous attempts by the trio to cope with and/or beat the system as well as Hari's fling with Neha who just happens to be the daughter of Prof. Cherian, the domineering head of the Mechanical Engineering Department.
While the tone of the novel is humorous, it takes some dark turns every now and then, especially when it comes to the families of the main characters. Most of the action, however, takes place inside the campus as the boys, led by the ever creative Ryan, frequently lamenting how the internationally lauded IIT system has stifled their creativity by forcing them to value grades more than anything else. Uninspiring teaching and numerous assignments adds to their woes although the boys do find a sympathizer in Prof. Veera, the new fluid mechanics professor.




Five Point Someone - What not to do at IIT (2004)
size:12140 KB







One Night @ the Call Center (2005) | Chetan Bhagat | Free Download | Chetan Bhagat book | Free ebook | Chetan Bhagat 's One Night @ the Call Center (2005)









One Night @ the Call Center



one night @ the call center  
One Night @ Call Center.jpg
Author
Chetan Bhagat
Cover artist
Chetan Bhagat and Samantha Holyoak
Country
India
Language
English
Genre(s)
Fiction
Publisher
Rupa & Co.
Publication date
October 2005
Media type
Print (Paperback)
Pages
291 pp (Paperback edition)
ISBN
ISBN 81-291-0818-6(Paperback edition)
OCLC Number
63276386
LC Classification
MLCM 2005/00074 (P) PR9499.3.B
One Night @ the Call Center or ON@CC is a novel written by Chetan Bhagat and first published in 2005. The novel revolves around a group of six call center employees working in Connexions call centerin Gurgaon, Haryana. It is filled with a lot of drama with unpleasant things happening to all of the leading characters. The story takes a dramatic and decisive turn when they get a phone call from God.
This is the second best-selling novel from the award winning author.

Synopsis

The story begins with a train journey from Kanpur to Delhi, During the journey, the author meets a very beautiful girl. The girl offers to tell the author a story on the condition that he has to make it his second book. After a lot of hesitation, the author agrees.ON@CC is a tale about the events that happen one night at a call center. Told through the views of the protagonist, Shyam (Sharman Joshi), it is a story of almost lost love, thwarted ambitions, absence of family affection, pressures of a patriarchal set up, and the work environment of a globalized office. Shyam loves Priyanka, Vroom loves Eesha,Eesha wants to be a model, Military Uncle wants to talk to his grandson; they all hate Bakshi, their cruel boss. Claimed to be based on a true story, the author chooses a person named Shyam Mehra (alias Sam Marcy) as the protagonist, who is one among the six call center employees featured.







One Night @ the Call Center (2005)
size:21665 KB







The Three Mistakes of My Life (2008) | Free Download | Chetan Bhagat book | Free ebook | Chetan Bhagat 's The Three Mistakes of My Life (2008)











The 3 Mistakes of My Life



The 3 Mistakes of My Life  
3 Mistakes of My Life.jpg
Author
Chetan Bhagat
Genre(s)
Fiction
Publisher
Rupa & Co.
Publication date
May 2008
Media type
Print (Paperback)
The 3 Mistakes of my Life is the third novel written by Chetan Bhagat. The book was published in May 2008 and had an initial print-run of 200,000. The novel follows the story of three friends and is based in the city of Ahmedabad in western India.
This is the third best selling novel by Chetan Bhagat, making him the best selling English Novelist in India's history.


Synopsis
The novel, written as if based on real events, is set in the year 2000, when a young boy in Ahmedabadcalled Govind dreams of starting a business. To accommodate his friends Ishaan and Omi's passion, they open a cricket shop. However, each has a different motive: Govind's goal is to make money; Ishaan desires to nurture Ali, a gifted batsman; Omi just wants to be with his friends. During the story the characters have to deal with religious politics, earthquake, riots, unacceptable love and their own mistakes.







The Three Mistakes of My Life (2008)
size:1377 KB







2 States - The Story Of My Marriage | Free Download | Chetan Bhagat book | Free ebook | Chetan Bhagat 's 2 States |




2 States - The Story Of My Marriage



2 States - The Story Of My Marriage  
2 States - The Story Of My Marriage.jpg
Author
Chetan Bhagat
Country
India
Language
English
Genre(s)
Fiction
Publisher
Rupa & Co.
Publication date
8 October 2009
Media type
Print (Paperback)
ISBN
978-81-291-1530-0
2 States - The Story Of My Marriage is a 2009 novel written by Chetan Bhagat. It is an Indian love story about a couple coming from two different states of India, who faced the conservative parents and how they finally persuaded them to get themselves married. The novel is a fiction, but is said to be inspired from the real story of the author and his wife Anusha who are from Delhi and Tamil Nadurespectively.




Synopsis
The story is about Krish and Ananya. They are from two different states of India, deeply in love and want to get married against their parents' wishes. To convert their love story into a love marriage, the couple have a tough battle in front of them.
The story begins in the IIM Ahmedabad mess, where Krish from punjab, a Punjabi boy from Delhimeets Ananya from Tamil Nadu, a Tamilian girl from Chennai, quarreling with the mess staff about the food. They become "just friends" in a few days time and decide to study together every night. In time, they become romantically involved. They both get good jobs, and have serious plans for their weddings. The story is based on how they struggle a lot to convince their parents for the marriage, which they eventually succeed in doing. It is narrated in a first person point of view in a humorous tone, often taking digs at Tamil and Punjabi culture. The plot is inspired from the life story of Chetan Bhagat and his wife Anusha, who are from Delhi and Tamil Nadu respectively. It is a love story about a Punjabi boy and an Iyer girl. This is the first Chetan Bhagat book based largely on his life. He wrote this novel after quitting his job at an investment bank.







1.Free ebook-Chetan Bhagat's 2 States
2.Free ebook-Chetan Bhagat's 2 States[mirror]
size:748 KB







Windows 7 or Ubuntu 9.10 – battle of the operating systems

Windows 7 or Ubuntu 9.10 – battle of the operating systems

Whether you're a die-hard Windows fan or a Linux evangelist, here is the lowdown on the latest updates

Ubuntu
Cherry picking ? the Ubuntu 9.10 operating system offers cloud storage and a new application to add software
Operating systems have become like buses: you wait ages for an OS update, and then three turn up at once. Apple let Snow Leopard out of its cage in August, and then, last Thursday, Microsoft released Windows 7, a major update of Vista. At the same time, Canonical chose to release "Karmic Koala" – which is otherwise known as the open-source operating system Ubuntu 9.10.
In the five years since its launch, Ubuntu has become one of the most popular Linuxes; though popular for servers or embedded systems, it remains a minority as a desktop operating system. Some put the figures as low as 1%, though the enthusiasts put the figure closer to 12%.
Taking the vital aspects of an operating system into account, which is better, Ubuntu 9.10 or Windows 7?

Speed

In terms of speed, if you've got an older computer that is starting to feel sluggish but you either don't want to or can't afford to buy a new computer, give Ubuntu a go. You'll get an up-to-date operating system running quite smoothly on your out-of-date computer.
Verdict: Windows 7 is much better than Vista on older hardware, while Ubuntu always has been strong on a wide range of hardware.

Drivers and hardware

Ubuntu is generally good at recognising hardware. Windows needed a driver downloaded for my vintage 3Com Wi-Fi PC Card, but it worked right away with Ubuntu – and even improved from 9.04 to 9.10. Ubuntu added extensions to take advantage of special keys for my laptop, and when I plugged in a spare Mac keyboard, it handled special Mac-centric keys too such as the CD eject button.
If Ubuntu doesn't automatically install a driver, it can be quite a bit of effort getting something to work, and not all hardware and peripherals will work with Linux. Sometimes you'll have to go to the command line, which is terrifying territory for most users. It's worth checking to see if Linux drivers exist for your printer and other key peripherals.
Windows has always had issues with drivers. I still am baffled why Windows forgets hardware that I have installed previously. Windows 7 doesn't seem to have completely solved these issues.
Verdict: Both Microsoft and Ubuntu could improve how they handle drivers.

Multimedia

Looking at the default applications that come with both Windows 7 and Karmic Koala, Ubuntu installs the Rhythmbox player for music and the Movie Player for video. Both are capable, and anyone familiar with Apple's iTunes will find the application easy to navigate.
Because of licensing restrictions and Ubuntu's own philosophy, it does not ship with the ability to play commercial DVDs. It's relatively easy to add commercial DVD support by adding Ubuntu Restricted Extras in the Software Centre.
Most versions of Windows 7 come with Windows Media Player and Media Centre. The Media Centre is impressive and polished. It organises your pictures, video and music files, and it gives you the kind of 10-foot interface that works well from your couch in the lounge.
Verdict: Microsoft wins this one with its Media Centre, though Linux enthusiasts will be quick to point out the digital-rights management issues of Windows.

Software and applications

In terms of software, Ubuntu is like the iPhone. Almost anything you'd care to do, there's an app for that. However, you'll have to learn to translate from the applications that you're used to on the Mac or Windows. For people looking to make the switch to Linux, osalt.com is a good directory of open-source alternatives to common commercial software.
Ubuntu comes with OpenOffice and Gimp photo editing software installed.
Windows 7 users will need to buy Microsoft Office, or you can also download OpenOffice and Gimp. Windows users will be used to Outlook to handle their email. Ubuntu ships with Evolution, which handles email and also has calendar software.
Ubuntu 9.10 comes with Firefox 3.5 as standard, and it now ships with the Empathy multiple protocol instant messaging client. Empathy works with most instant messaging systems including AIM, Gtalk/Jabber, MSN and IRC, just to name a few.
Windows 7 has Windows Live messenger and ships with Microsoft's internet Explorer 8, which is a vast improvement over previous versions. You'll have to download Windows Live messenger as part of the Windows Live apps. To install other applications, Ubuntu 9.10 changed the Add/Remove Software application with a refreshed tool called Ubuntu Software Centre. You can search the directory full of hundreds of applications.
Verdict: Ubuntu wins this hands-down with a huge range of free software packages ready to download.

Cloud computing

Ubuntu 9.10 brings cloud storage to the masses with its Ubuntu One service. It's simple and well integrated. Whenever you save a file, you have the option to save it directly to Ubuntu One. Up to 2GB of storage is free, and you can pay for higher amounts of storage.
You can also share files with other people, and your files are easily available on other computers, even ones not running Ubuntu. The service is in beta, though, so I'd expect a few glitches.
Microsoft has a remote storage and remote desktop service in beta called Live Mesh and SkyDrive, which offers 25GB of storage for free. It's not yet integrated into the operating system and Microsoft is under scrutiny about what it integrates into the OS because of its market dominance.
Verdict: Ubuntu wins this as well. Live Mesh isn't as well integrated yet as Ubuntu One is immediately from startup.

Ease of use

This is subjective. I've spent the past two years using Ubuntu, and find it relatively easy. However, just like any new operating system, there is a learning curve, and Linux advocates often gloss over this. Ubuntu has made great strides, but average users will still struggle with it at times.
Adding new software sources so that you can easily install applications such as Skype or Google Earth will be beyond most average users. User interface design still lags behind software on Mac OS X and Windows 7.
Windows 7 will be an adjustment for XP users. Vista users won't notice a change apart from a faster, smoother experience and fewer annoying pop-ups second-guessing your choices.
Verdict: Windows still is easier to use than Linux for some key tasks. Ubuntu is making a lot of progress, but Microsoft has stepped up its game as well.

Final Verdict

Windows 7 is a worthy successor to Windows XP. Vista had well-known flaws, which meant it never replaced XP for most users. For those with a lot of investment in Windows software, there probably will be no reason to look elsewhere.
For those not that tied into the world of Windows, Ubuntu is certainly worth a look. Consumers have never had more choices for capable, powerful and easy to use operating systems, and Ubuntu is only one Linux distribution.
I had tried Linux frequently as soon as I got broadband almost 10 years ago, but I always gave up after a few days until the arrival of Ubuntu. It is a relatively easy-to-use, modern operating system, and one that will only cost you the time to download it.

Ribbit Launches Google Voice Challenger

ribbit_mobile_logo_nov09.pngRibbit just announced the launch of Ribbit Mobile. Ribbit Mobile is a cloud-based VoIP telephony service that brings together web-based calling, smart call routing and voicemail transcriptions.
It is hard to look at Ribbit Mobile without comparing it to Google Voice. Just like Google Voice, Ribbit gives users a new phone number or they can use call forwarding to transfer calls from their mobile phones to Ribbit's platform. Ribbit Mobile also has quite a few features that Google doesn't offer, including the ability to make calls from within the browser.


More Features than Google Voice

As Ribbit Mobile is part of Ribbit's open VoIP platform, the service can even forward calls to your Skype, MSN or Google Talk account if you don't pick up your mobile phone. Whenever you miss a call or when a new voicemail arrives, Ribbit can also ping you by email, Skype, Google Talk or SMS. Through its partners, Ribbit offers widgets for popular start pages like iGoogle and social networks like Facebook and MySpace. Through these - as well as on the service's homepage - users can receive and place calls from their browsers. This is a feature that Google Voice doesn't offer yet.
GrandCentral, which Google bought and then transformed into Google Voice, offered some of the features that Ribbit Mobile now offers. Google dropped quite a few useful features like call chains from Google Voice's feature line-up, however.
ribbit_mobile_call_routing.jpg
Besides call chains, another nice feature of Ribbit Mobile is that you can choose which number will appear on your contacts' phones when you call, even if you are calling from your computer. Once you are on a call, you can also easily transfer calls from any device to another. Because of this, you can start a call in the web interface or iGoogle and then continue the call on your cell phone.
Just like Google Voice, Ribbit gives users the option to set up a new phone number for their Ribbit accounts. Users can search for a specific number and letter combination in these numbers. For now, Ribbit only offers numbers in select cities such as California and New York.
A service like Ribbit Mobile wouldn't be very useful as you couldn't easily import your contacts. Thankfully, users can import contacts from Plaxo and as an Outlook CSV file (Google Contacts can export an Outlook CSV file).

13 Tools for Building Your Own iPhone App

13 Tools for Building Your Own iPhone App

 



These days, everyone wants to build their own iPhone applications, but not everyone knows how write the code necessary in order to create them. Fortunately, there are now a number of tools that allow non-developers the ability to create their own iPhone apps without knowing programming or scripting. Some are general-purpose app builders designed for small businesses while other target specific needs, like apps for musicians or for eBook authors. Still others let developers familiar with simpler programming languages like HTML write apps using the code they know and then will transform that code into an iPhone application which can be submitted to the iTunes Store.
Below we've listed 13 different tools that let you create your own iPhone applications, none of which require knowledge of Objective C, the programming language used to build apps for the iPhone OS .

1. Sweb Apps


What it Does: Sweb Apps offers an online service which lets anyone build their own iPhone apps even if they don't know how to code. Designed with small business owners in mind, the company offers pre-created templates which you can customize with different background images and your own custom icons if desired. Otherwise, you're welcome to use the graphics provided by the company's own image library. After picking the category for your app (Restaurant, Retail, Business, etc.), you choose the buttons you want to include (Menu, Directions, Map, etc.). You can even create a mobile storefront where Sweb Apps manages your inventory. 


How Much it Costs: The company offers four-, six- and eight-button packages, which all include a one-time set-up fee of $50 per button. Then there is a $25 monthly hosting fee applied to every application going forward

2. AppIncubator



What it Does: Think you have a great idea for an iPhone app but not the skills to build it yourself. Like Apple says: "there's an app for that!" The AppIncubator iPhone App from MEDL Mobile lets you submit your ideas which the company's development team will then build into apps for you. App submissions can be sent in via the iPhone app or by way of the company website. Once received, you go online to use the company's "storyboard" tool to sketch out in more detail how you imagine the app working.
How Much it Costs: Using the service or downloading the iPhone app itself is free, but MEDL Mobile takes a cut of the profits after the app goes live in the iTunes App Store. 25% of the total revenue is shared with you and the company keeps the rest.


3. Kanchoo

Kanchoo is another platform that allows content producers to create native iPhone applications, this one is designed for news organizations. To use the service, you provide the company with an iPhone application icon, a splash screen (in .png format) and a description of your application which will be used in the iTunes App Store. Then, using their online tools, you build your app by uploading the content which can consist of either photos or news articles.

How Much it Costs: Basic account holders pay $88 for creation of their iPhone application and submission to the iTunes App Store along with a $28 per month fee for bandwidth and hosting.


Microsoft sets SQL Server 2008 R2 preview


Microsoft sets SQL Server 2008 R2 preview

Microsoft working to turn SQL Server 2008 database into information platform.

Microsoft Tuesday said it will make a preview of SQL Server 2008 R2 available this month that is features complete, including new business intelligence integration tools and master data management features.


In addition, Microsoft said it will deliver two highly scalable editions of SQL Server 2008 R2 (formerly code-named Kilimanjaro) in the first half of 2010 when it ships the next version of the database server.
The announcements came at the annual Professional Association for SQL Server (PASS) Summit. The PASS group is an independent, not-for-profit association.
Microsoft is pushing SQL Server 2008 R2 as the opening salvo in its strategy to turn the database into an "information platform." The company says the platform will integrate structured and unstructured data from a variety of sources, including SharePoint Server.
"The R2 release is a down payment on the information platform," said Fausto Ibarra, director of product management, SQL Server.
The review will include SQL Server PowerPivot for Excel 2010 (formerly Gemini), an in-memory analytics tools that will link Excel, SharePoint Server and SQL Server.
Power Pivot is the heart of what Microsoft calls managed self-service business intelligence, which lets users build BI programs for the desktop in Excel that combine data from diverse sources, process it using in-memory analytics tools and publish the results to SharePoint Server so users can collaborate around the results. In addition, IT can manage and control the BI programs users create by ensuring the proper infrastructure is available along with services such as data refresh.
"They are using and reading the meta-data from at least one other enterprise class information provider, which is SharePoint, and that is a big deal," says Mark Beyer, an analyst with Gartner. "Trying to put together text and content with the more structured stuff has been one of the challenges to getting real information management in an organization; to getting real data integration at the meta-data level."
What Microsoft is doing is significant in the aggregate because it elegantly combines data from two different sources, Beyer says.
"One of the constants I've had in my research is the pending earthquake of actually leveraging meta-data without having to import and export it from one place to another. That is where Microsoft is headed with its information management; reading through a service the meta-data in different enterprise applications that they have."
Beyer says the concept is one of data integration rather than interoperability. He says if Microsoft can create such an environment then the vendor will be one of the first to deliver such capabilities.
Also in the CTP are two new components, a master data management (MDM) platform that enables companies to integrate information from across multiple data sources in the network and create a single view of data such as customers, products or suppliers. Previously MDM was only available as a third-party add-on. The second component is StreamInsight, a complex event processing platform that lets companies or independent software vendors build applications that can process large numbers of events in real-time. 

Also part of the review is Application and Multi-Server Management, which enables central IT control of database infrastructure that includes applying policy, managing performance, moving workloads and pinpointing problems. In addition, there is support for Windows Server 2008 R2 and Hyper-V. 



The two highly scalable versions being offered alongside SQL Server 2008 R2 are Microsoft SQL Server 2008 R2 Datacenter and Microsoft SQL Server 2008 R2 Parallel Data Warehouse (formerly code-named Madison).
Parallel Data Warehouse is a massively parallel processing technology for high-end data warehousing and is designed to scale to petabytes and support high-speed queries.
Microsoft is riding Parallel Data Warehouse into a highly competitive data warehousing battle that includes Teradata, Netezza, Oracle, HP, Sybase, Greenplum, IBM and others.
The Parallel Data Warehouse version will be offered as an appliance on hardware from Bull, Dell, HP and IBM.
The Datacenter version aligns with the Datacenter version of Windows Server 2008 R2 and is designed to support large-scale applications. The platform provides support for up to 256 logical processors and unlimited virtualization.
Microsoft also is introducing version 2.0 of its SQL Server Fast Track Data Warehouse that includes 12 new reference architectures that feature updated configurations from Bull, Dell and HP based on Intel and AMD processors. The architectures support up to 48 cores per server and up to 48 terabytes of data capacity.
IBM, which signed onto the program in February, will offer three reference configurations based on IBM's X series and Intel processors. Also, EMC will introduce Data Warehouse and BI services for Fast Track.

Electricity through the air

Sony prototype sends electricity through the air

 

Despite the numerous technologies that exist for sending data through the air there's one cable that most gadgets can't do without at some time. The power cable remains a necessary but sometimes unsightly part of many modern electronic appliances -- but now even that might be on the way out.


Sony has developed a prototype power system that can send enough electricity to power a television set wirelessly over a short distance, it said Friday. In tests the company succeeded in sending a conventional 100 volt electricity supply over a distance of 50 centimeters to power a 22-inch LCD television.


UNION Query

SQL: UNION Query


The UNION query allows you to combine the result sets of 2 or more "select" queries. It removes duplicate rows between the various "select" statements.
Each SQL statement within the UNION query must have the same number of fields in the result sets with similar data types.
The syntax for a UNION query is:
select field1, field2, . field_n
from tables
UNION
select field1, field2, . field_n
from tables;


Example #1
The following is an example of a UNION query:
select supplier_id
from suppliers
UNION
select supplier_id
from orders;

In this example, if a supplier_id appeared in both the suppliers and orders table, it would appear once in your result set. The UNION removes duplicates.

Example #2 - With ORDER BY Clause
The following is a UNION query that uses an ORDER BY clause:
select supplier_id, supplier_name
from suppliers
where supplier_id > 2000
UNION
select company_id, company_name
from companies
where company_id > 1000
ORDER BY 2;

Since the column names are different between the two "select" statements, it is more advantageous to reference the columns in the ORDER BY clause by their position in the result set. In this example, we've sorted the results by supplier_name / company_name in ascending order, as denoted by the "ORDER BY 2".
The supplier_name / company_name fields are in position #2 in the result set.

Frequently Asked Questions


Question:  I need to compare two dates and return the count of a field based on the date values. For example, I have a date field in a table called last updated date. I have to check if trunc(last_updated_date >= trun(sysdate-13).
Answer:  Since you are using the COUNT function which is an aggregate function, we'd recommend using a UNION query. For example, you could try the following:
SELECT a.code as Code, a.name as Name, count(b.Ncode)
FROM cdmaster a, nmmaster b
WHERE a.code = b.code
 and a.status = 1
 and b.status = 1
 and b.Ncode <> 'a10'
 and trunc(last_updated_date) <= trunc(sysdate-13)
group by a.code, a.name
UNION
SELECT a.code as Code, a.name as Name, count(b.Ncode)
FROM cdmaster a, nmmaster b
WHERE a.code = b.code
 and a.status = 1
 and b.status = 1
 and b.Ncode <> 'a10'
 and trunc(last_updated_date) > trunc(sysdate-13)
group by a.code, a.name;

The UNION query allows you to perform a COUNT based on one set of criteria.
trunc(last_updated_date) <= trunc(sysdate-13)
As well as perform a COUNT based on another set of criteria.
trunc(last_updated_date) > trunc(sysdate-13)

UNION ALL Query

SQL: UNION ALL Query


The UNION ALL query allows you to combine the result sets of 2 or more "select" queries. It returns all rows (even if the row exists in more than one of the "select" statements).
Each SQL statement within the UNION ALL query must have the same number of fields in the result sets with similar data types.
The syntax for a UNION ALL query is:
select field1, field2, . field_n
from tables
UNION ALL
select field1, field2, . field_n
from tables;


Example #1
The following is an example of a UNION ALL query:
select supplier_id
from suppliers
UNION ALL
select supplier_id
from orders;

If a supplier_id appeared in both the suppliers and orders table, it would appear multiple times in your result set. The UNION ALL does not remove duplicates.

Example #2 - With ORDER BY Clause
The following is a UNION query that uses an ORDER BY clause:
select supplier_id, supplier_name
from suppliers
where supplier_id > 2000
UNION ALL
select company_id, company_name
from companies
where company_id > 1000
ORDER BY 2;

Since the column names are different between the two "select" statements, it is more advantageous to reference the columns in the ORDER BY clause by their position in the result set. In this example, we've sorted the results by supplier_name / company_name in ascending order, as denoted by the "ORDER BY 2".
The supplier_name / company_name fields are in position #2 in the result set.

INTERSECT Query

SQL: INTERSECT Query


The INTERSECT query allows you to return the results of 2 or more "select" queries. However, it only returns the rows selected by all queries. If a record exists in one query and not in the other, it will be omitted from the INTERSECT results.
Each SQL statement within the INTERSECT query must have the same number of fields in the result sets with similar data types.
The syntax for an INTERSECT query is:
select field1, field2, . field_n
from tables
INTERSECT
select field1, field2, . field_n
from tables;


Example #1
The following is an example of an INTERSECT query:
select supplier_id
from suppliers
INTERSECT
select supplier_id
from orders;

In this example, if a supplier_id appeared in both the suppliers and orders table, it would appear in your result set.

Example #2 - With ORDER BY Clause
The following is an INTERSECT query that uses an ORDER BY clause:
select supplier_id, supplier_name
from suppliers
where supplier_id > 2000
INTERSECT
select company_id, company_name
from companies
where company_id > 1000
ORDER BY 2;

Since the column names are different between the two "select" statements, it is more advantageous to reference the columns in the ORDER BY clause by their position in the result set. In this example, we've sorted the results by supplier_name / company_name in ascending order, as denoted by the "ORDER BY 2".
The supplier_name / company_name fields are in position #2 in the result set.

MINUS Query

SQL: MINUS Query


The MINUS query returns all rows in the first query that are not returned in the second query.
Each SQL statement within the MINUS query must have the same number of fields in the result sets with similar data types.
The syntax for an MINUS query is:
select field1, field2, . field_n
from tables
MINUS
select field1, field2, . field_n
from tables;


Example #1
The following is an example of an MINUS query:
select supplier_id
from suppliers
MINUS
select supplier_id
from orders;

In this example, the SQL would return all supplier_id values that are in the suppliers table and not in the orders table. What this means is that if a supplier_id value existed in the suppliers table and also existed in the orders table, the supplier_id value would not appear in this result set.

Example #2 - With ORDER BY Clause
The following is an MINUS query that uses an ORDER BY clause:
select supplier_id, supplier_name
from suppliers
where supplier_id > 2000
MINUS
select company_id, company_name
from companies
where company_id > 1000
ORDER BY 2;

Since the column names are different between the two "select" statements, it is more advantageous to reference the columns in the ORDER BY clause by their position in the result set. In this example, we've sorted the results by supplier_name / company_name in ascending order, as denoted by the "ORDER BY 2".
The supplier_name / company_name fields are in position #2 in the result set.

UPDATE Statement

SQL: UPDATE Statement


The UPDATE statement allows you to update a single record or multiple records in a table.
The syntax for the UPDATE statement is:
UPDATE table
SET column = expression
WHERE predicates;


Example #1 - Simple example
Let's take a look at a very simple example.
UPDATE suppliers
SET name = 'HP'
WHERE name = 'IBM';

This statement would update all supplier names in the suppliers table from IBM to HP.

Example #2 - More complex example
You can also perform more complicated updates.
You may wish to update records in one table based on values in another table. Since you can't list more than one table in the UPDATE statement, you can use the EXISTS clause.
For example:
UPDATE suppliers
SET supplier_name = ( SELECT customers.name
FROM customers
WHERE customers.customer_id = suppliers.supplier_id)
WHERE EXISTS
  ( SELECT customers.name
    FROM customers
    WHERE customers.customer_id = suppliers.supplier_id);
Whenever a supplier_id matched a customer_id value, the supplier_name would be overwritten to the customer name from the customers table.
Learn more about the EXISTS condition.

Practice Exercise #1:
Based on the suppliers table populated with the following data, update the city to "Santa Clara" for all records whose supplier_name is "NVIDIA".
CREATE TABLE suppliers
( supplier_id number(10) not null,
  supplier_name varchar2(50) not null,
  city varchar2(50),
  CONSTRAINT suppliers_pk PRIMARY KEY (supplier_id)
);



INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5001, 'Microsoft', 'New York');

INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5002, 'IBM', 'Chicago');

INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5003, 'Red Hat', 'Detroit');

INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5004, 'NVIDIA', 'New York');

Solution:
The following SQL statement would perform this update.
UPDATE suppliers
SET city = 'Santa Clara'
WHERE supplier_name = 'NVIDIA';

The suppliers table would now look like this:
SUPPLIER_ID SUPPLIER_NAME CITY
5001 Microsoft New York
5002 IBM Chicago
5003 Red Hat Detroit
5004 NVIDIA Santa Clara

Practice Exercise #2:
Based on the suppliers and customers table populated with the following data, update the city in the suppliers table with the city in the customers table when the supplier_name in the suppliers table matches the customer_name in the customers table.
CREATE TABLE suppliers
( supplier_id number(10) not null,
  supplier_name varchar2(50) not null,
  city varchar2(50),
  CONSTRAINT suppliers_pk PRIMARY KEY (supplier_id)
);



INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5001, 'Microsoft', 'New York');

INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5002, 'IBM', 'Chicago');

INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5003, 'Red Hat', 'Detroit');

INSERT INTO suppliers (supplier_id, supplier_name, city)
VALUES (5005, 'NVIDIA', 'LA');


CREATE TABLE customers
( customer_id number(10) not null,
  customer_name varchar2(50) not null,
  city varchar2(50),
  CONSTRAINT customers_pk PRIMARY KEY (customer_id)
);



INSERT INTO customers (customer_id, customer_name, city)
VALUES (7001, 'Microsoft', 'San Francisco');

INSERT INTO customers (customer_id, customer_name, city)
VALUES (7002, 'IBM', 'Toronto');

INSERT INTO customers (customer_id, customer_name, city)
VALUES (7003, 'Red Hat', 'Newark');

Solution:
The following SQL statement would perform this update.
UPDATE suppliers
SET city = ( SELECT customers.city
FROM customers
WHERE customers.customer_name = suppliers.supplier_name)
WHERE EXISTS
  ( SELECT customers.city
    FROM customers
    WHERE customers.customer_name = suppliers.supplier_name);
The suppliers table would now look like this:
SUPPLIER_ID SUPPLIER_NAME CITY
5001 Microsoft San Francisco
5002 IBM Toronto
5003 Red Hat Newark
5004 NVIDIA LA