Tuesday, December 20, 2011

Database Concepts Quiz

1. Which of following represent logical storage of data?
Option :
a. Table
b. View
c. None.
d. Index
Ans: b

2. Which SQL statement is used to extract data from a database?
option:
a. SELECT
b. EXTRACT
c. OPEN
d. GET
Ans: a

3. With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
Options:
a. SELECT * FROM Persons SORT 'FirstName' DESC
b. SELECT * FROM Persons SORT BY 'FirstName' DESC
c. SELECT * FROM Persons ORDER BY FirstName DESC
d. None of the above
e. SELECT * FROM Persons ORDER FirstName DESC

Ans: c

4. With SQL, how can you return the number of records in the "Persons" table?
Options:
a. SELECT COUNT(*) FROM Persons
b. SELECT COLUMNS(*) FROM Persons
c. None of the above
d. SELECT COLUMNS() FROM Persons
e. SELECT COUNT() FROM Persons
Ans : a
5. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?
Options:
a. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
b. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
c. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
d. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
Ans: d

Sunday, December 4, 2011

Communication Quiz (VOCABULARY) in TCS ASPIRE

Each project will have a set of predefined deliverableswhich have to be submitted according to timelines. If thetimelines are not met, the net result is a slippage. Alldeliverablesshould be stored in a document repository. Resources are deployed in projects but the actual work will start when they are allocated specific tasks. Resources should anticipatechanges to the requirements and should have proper response to the enquiries made by the customer. The tasks should be carried out as per the priority and issues should be tracked as per the severityattached to the issue. There should be proper mentoring of the junior associates and the outputs of the associates should be consistent in quality standards and should containreliableinformation. There should be proper monitoring of progress of the deliverables and each deliverable has to go through a strict review process. Defects are logged during the review and various metrices are collected as part of the review process. During the course of project delivery, the project manager should ensure proper utilization of resources and there should be a collaborative effort amongst all team members. A good PM should be a good strategistand must be a/an mentorto all associates. All team members are expected to achieve thetargets set for them. Based on the targets, there will be a/anappraisal at the end of each year.

Friday, November 25, 2011

Unix Assignment2- Solutions

UNIX

1. Create a tree structure named ‘training’ in which there are 3 subdirectories – ‘level 1’,’ level2’ and ‘cep’. Each one is again further divided into 3. The ‘level 1’ is divided into ‘sdp’, ‘re’ and ‘se’. From the subdirectory ‘se’ how can one reach the home directory in one step and also how to navigate to the subdirectory ‘sdp’ in one step? Give the commands, which do the above actions?

Ans : To navigate from 'se' to home directory,in one step,the command is : cd

To navigate from 'se' to 'sdp',in one step,the command is : cd ../b

2. How will you copy a directory structure dir1 to dir2 ? (with all the subdirectories)

Ans : cp –R dir1 dir2

3. How can you find out if you have the permission to send a message?

Ans : ls -l ( To check access permissions)

4. Find the space occupied ( in Bytes) by the /home directory including all its subdirectories.

Ans : du -s -b

5. What is the command for printing the current time in 24-hour format?

Ans : date +%T

6. What is the command for printing the year, month, and date with a horizontal tab between the fields?

Ans : date +%Y%t%B%t%e

7. Create the following files: chapa, chapb, chapc, chapd, chape, chapA, chapB, chapC, chapD, chapE, chap01, chap02, chap03, chap04, chap05, chap11, chap12, chap13, chap14, and chap15.

Ans :The general syntax is :

cat > filename

Type the contents of file

Press Ctrl+D

cat > chapa

Type the contents of file

Ctrl+D

Cat > chapb

Type the contents of file

Ctrl+D

Cat > chapc

Type the contents of file

Cat > chapd

Type the contents of file

Ctrl+D

Cat > chape

Type the contents of file

Ctrl+D

Cat > chapA

Type the contents of file

Ctrl+D

Cat > chapB

Type the contents of file

Ctrl+D

Cat > chapC

Type the contents of file

Ctrl+D

Cat > chapD

Type the contents of file

Ctrl+D

Cat > chapE

Type the contents of file

Ctrl+D

Cat > chap01

Type the contents of file

Ctrl+D

Cat > chap02

Type the contents of file

Ctrl+D

Cat > chap03

Type the contents of file

Ctrl+D

Cat > chap04

Type the contents of file

Ctrl+D

Cat > chap05

Type the contents of file

Ctrl+D

Cat > chap11

Type the contents of file

Ctrl+D

Cat > chap12

Type the contents of file

Ctrl+D

Cat > chap13

Type the contents of file

Ctrl+D

Cat > chap14

Type the contents of file

Ctrl+D

Cat> chap15

Type the contents of file

Ctrl+D

8. With reference to question 7, What is the command for listing all files ending in small letters?

Ans : find –name “*[a-z].*”

9. With reference to question 7, What is the command for listing all files ending in capitals?

Ans : find –name “*[A-Z].*”

10. With reference to question 7, What is the command for listing all files whose last but one character is 0?

Ans : find –name “*0?.*”

11. With reference to question 7, What is the command for listing all files which end in small letters but not ‘a’ and ‘c’?

Ans: find –name “*[b d-z].*”

12. In an organisation one wants to know how many programmers are there. The employee data is stored in a file called ‘personnel’ with one record per employee. Every record has field for designation. How can grep be used for this purpose?

Ans : grep -c "programmers" personnel

13. In the organisation mentioned in question 12 how can sed be used to print only the records of all employees who are programmers.

Ans : sed -n /programmers/p personnel

14. In the organisation mentioned in question 12 how can sed be used to change the designation ‘programmer’ to ‘software professional’ every where in the ‘personnel’ file

Ans : sed 's/programmer/software professional/g' personnel

15. Find out about the sleep command and start five jobs in the background, each one sleeping for 10 minutes.

Ans :sleep 10m & sleep 10m & sleep 10m & sleep 10m & sleep 10m &

16. How do you get the status of all the processes running on the system? i.e. using what option?

Ans : ps -e

Unix Assignment1- Solutions

UNIX ASSIGNMENT

Question 1: Write a command to list all the files inside a folder i.e. if there is a folder inside a folder then it should list all files inside the sub-folder which is inside the folder to be listed.

Answer 1: ls –R

Question 2: Search all the files which contains a particular string, say “include” within a folder.

Answer 2: for i in *.*; do grep -l include $i; done

Question 3: Rename all the files within a folder with suffix “Unix_” i.e. suppose a folder has two files a.txt and b.pdf than they both should be renamed from a single command to Unix_a.txt and Unix_b.pdf

Answer 3: for i in *.*; do mv $i Unix_$i; done ;

Question 4: Rename all files within a folder with the first word of their content(remember all the files should be text files. For example if a.txt contains “Unix is an OS” in its first line then a.txt should be renamed to Unix.txt

Answer 4 : for i in *.txt; do j= "$(head -1 $i | cut -f1-d" ").txt"; mv "$i" "$j"; done

Question 5 : Suppose you have a C project in a folder called “project”, it contains .c and .h files, it also contains some other .txt files and .pdf files. Write a Linux command that will count the number of lines of your text files. That means total line count of every file. (remember you have to count the lines in .txt files only)

Answer 5 : wc -l *.txt

Question 6 : Rename all files which contain the sub-string 'foo', replacing it with 'bar' within a given folder.

Answer 6 :for i in ./*foo*; do mv "$i" "${i//foo/bar}";done

Question 7 : Show the most commonly used commands from “history”. [hint: remember the history command, use cut, and sort it.

Answer 7 : history |cut -f6- -d" " | sort

Wednesday, November 23, 2011

TCS ASPIRE Communication Assignment for group 6,7 and 8

Remember the basic rules of writing.
Use proper punctuations.
Watch out for the spelling &
Use CAPITAL LETTERS wherever appropriate!

1. I returned back from my home on 2'o clock at Wednesday.
I returned from my home at 2'o clock on Wednesday.

2. Myself Divya, I am coming from Chennai.
I am Divya and I come from Chennai.

3. We all of us visited many places last year.
We visited many places last year
.
4. I have earned many friends in my college here.

I have made many friends in my college.

5. English is been spoken across the world.
English is spoken across the world.

6. When I was in my tenth class,I use to go to play cricket.
When I was in the tenth standard, I used to play cricket.

7. Most directors do not mind to give chance to new actors.
Most directors do not mind giving a chance to new actors.

8. If I were a Prime Minister of this country,I changed the education systems first.
If I were the Prime Minister of this country, I would have changed the education system.

9. The best part I liked about the movie were the action scenes.
The best part I liked about the movie was the action scenes.

10. My most saddest moment was when I did not got through the interview.
My saddest moment is when I did not get through the interview.

11. In the schools the English should be taught by qualified teachers.
In schools, English should be taught by qualified teachers.

12. After our discussion,I am understanding you better now.
After our discussion, I understand you better.

13. He can be able to sing very well.
He can sing very well.

14. We are having many beautiful beaches in city.
We have many beautiful beaches in the city.

15. An interesting incident happened with me in starting.
In the beginning, an interesting incident happened to me.

16. I went to library to get as many informations as possible.
I went to a library to get as much information as possible.

17. I can't cope up with a lot of stress.
I can't cope with a lot of stress.

18. I'm not speaking to nobody in this class.
I'm not speaking to anybody in this class.

19. In this days youth are addicted at social networking.
In these days the youth are addicted to social networking.

20. Its a big relief that I did not screw up my lab exams.
It's a big relief that I did not make a mess of my lab exams.

Tuesday, November 22, 2011

TCS Salary Hike April 2012 – An Estimate



This study has been prepared on the famous Newton’s Algorithm - Newton–Raphson Method along with Linear Interpolation, Current IT Market Scenario and Macro Level Challenges which IT Companies normally suffer with.

The study takes into consideration that most of us would be placed in Band B or Band C. As, people hardly get Band A in TCS with 3 Years Experience. The study fails for Band D because TCS has an unusual process of decreasing the salary rather than increasing it. So by means if you happen to have a Band D (unfortunately) your experience would have increased with a negative hike in salary. It’s weird but TRUE.

The graphs and tables below show a comparative study of estimated salary hike in April 2012 across different TCS Bands for people having 3 Years Experience:

Ø Moving from Band B to Band B

Description

Salary (Lakhs)

Band

%Hike

Joined TCS

3.15

C

7.93

Hike After Recession

3.40

C

17.64

Apr’10

4.00

B

18

Apr’11

4.72

B

13

Apr’12

5.33


The analysis found that there would be an estimated salary %Hike of around 13% with final salary falling around 5.33 Lpa.

Ø Moving from Band C to Band C

Description

Salary (Lakhs)

Band

%Hike

Joined TCS

3.15

C

7.93

Hike After Recession

3.40

C

17.64

Apr’10

4.00

C

8.75

Apr’11

4.35

C

11.44

Apr’12

4.84










The analysis found that there would be an estimated salary %Hike of around 11.44% with final salary falling around 4.84 Lpa.

And finally the Blockbuster:

Ø Moving from Band C to Band B

Description

Salary (Lakhs)

Band

%Hike

Joined TCS

3.15

C

7.93

Hike After Recession

3.40

C

17.64

Apr’10

4.00

C

8.75

Apr’11

4.35

C

22.52

Apr’12

5.33









A whooping estimated salary %Hike of around 22.52% with final salary falling around 5.33 Lpa. Even the graph has Skyrocketed.

Please note this is a salary estimate and has to be kept in the bracket of ± 2% Deviation. So if you happen to get a salary hike in TCS more than the ones which are mentioned above than that’s Great!! What needs to be seen is Can an Organization with 2.4 Lakhs (as on Q2-11) Workforce keep its Employees Happy??

If by any means the salary hike is less than what is mentioned above then start preparing your resumes, get those posted on job portals or get yourselves a reference for a company because you are not getting the correct price of the invaluable talent you carry.

In the end, I happen to remember the Royal Stag tagline It's Your Life Make It Large.

Please feel free to drop in your valuable comments. The highly anticipated post Realizing Your Potential While Experiencing Uncertainty would be out soon.