Set - 9

Question 1 :

How can increase the performance of MySQL select query?

Answer :

We can use LIMIT to stop MySql for further search in table after we have received our required no. of records, also we can use LEFT JOIN or RIGHT JOIN instead of full join in cases we have related data in two or more tables.

Question 2 :

How can we change the name of a column of a table?

Answer :

MySQL query to rename table: RENAME TABLE tbl_name TO new_tbl_name
ALTER TABLE tableName CHANGE OldName newName.

Question 3 :

When you want to show some part of a text displayed on an HTML page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?

Answer :

There are 2 ways to show some part of a text in red:

1. Using HTML tag <font color="red">
2. Using HTML tag <span style="color: red">

Question 4 :

When viewing an HTML page in a Browser, the Browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?

Answer :

When you use the metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet Files folder. 

A page that Internet Explorer is browsing is not cached until half of the 64 KB buffer is filled. Usually, metatags are inserted in the header section of an HTML document, which appears at the beginning of the document. When the HTML code is parsed, it is read from top to bottom. When the metatag is read, Internet Explorer looks for the existence of the page in cache at that exact moment. If it is there, it is removed. To properly prevent the Web page from appearing in the cache, place another header section at the end of the HTML document.

Question 5 :

What are the different ways to login to a remote server? Explain the means, advantages and disadvantages? 

Answer :

There is at least 3 ways to logon to a remote server:
Use ssh or telnet if you concern with security
You can also use rlogin to logon to a remote server.