You are on page 1of 10

1. What are the functions used for file upload?

4721
Answer:

1. bool move_uploaded_file ( string $filename ,


string $destination )

2.bool copy ( string $source , string $dest [,


resource $context ] )

2. What is DNS?
4425. Define DNS.
Answer: The Domain Name System (DNS) allows to use
domain names (e.g. yahoo.com) in place of the
corresponding IP address, such as 192.0.32.166.

3. Mention five Internet services?


4500. Name five internet services that commonly operate on
a particular communications port.

Answer: 1. HTTP - Hyper Text Transfer Protocol


2. FTP - File Transfer Protocol
3. POP3 - Post Office Protocol
4. IMAP - Internet Message Access Protocol
5. SSH - Secure SHell

4. Explain the parameters of PHP’s


mail function.4433
Answer:
The PHP mail() function is used to send emails from
inside a script.
Prototype:

boolean mail(string to, string subject, string


message [, string addl_headers [, string
addl_params]])

Parameter Description
To Required. Specifies the receiver / receivers of the email
Required. Specifies the subject of the email. Note: This parameter
Subject
cannot contain any newline characters
Required. Defines the message to be sent. Each line should be
Message
separated with a LF (\n). Lines should not exceed 70 characters
Optional. Specifies additional headers, like From, Cc, and Bcc. The
Headers
additional headers should be separated with a CRLF (\r\n)
parameters Optional. Specifies an additional parameter to the sendmail program

Example:

<?php

mail("client@example.com","This is a
subject","This is the mail
body","from:admin@example.com\r\n");

?>
5. Why HTTP is called stateless
protocol? 4727
Answer:
HTTP is called stateless protocol because each request
is processed without any knowledge of any prior or
future requests.
6. How many ways session handling can
be done? 4728
Answer: Session handling can be handled with the
following:

1. Use of cookies : the practice of storing bits of


information on the client's machine.
2. Use of session ID(SID) : Assigning each site
visitor a unique identifying attribute.

7. What are web services?


4570. What do you mean by web service?
Answer:
Web service: Web services are typically application
programming interfaces (APIs) or web APIs that are
accessed via Hypertext Transfer Protocol (HTTP) and
executed on a remote system hosting the requested
services.

8. What are the benefits of using web


services? 9489
A) The ability to treat software as a service
B) Significantly improved Enterprise Application
Integration (EAI)
C) Global reusability
D) Ubiquitous accessibility
4573. What are the advantages of web service?
Answer:
Advantage:
1. The ability to treat software as a service.
2. Significantly imporved enterprise application
integration (EAI) process.
3. Global reuseability.
4. Ubiquitous accessibility.
9. What is RSS feed?
4571. What do you mean by RSS?
Answer: RSS ( Really Simple Syndication) is a family of
web feed formats used to publish frequently updated
works—such as blog entries, news headlines, audio, and
video—in a standardized format: XML.

10. What is data encryption?4726


Answer:
Data Encryption: Data encryption can be defined as the
translation of data into a format that is intended to
be unreadable by anyone except the intended party. The
intended party can then decode, or decrypt, the
encrypted data through the use of some secret,
typically a secret key or password.

9498. Define Encryption.

Answer: Encryption can be defined as the translation of


data into a format that is intended to be unreadable by
anyone except the intended party.
The intended party can then decode, or decrypt, the
encrypted data through the use of some secret -
typically a secret key or password.

11. What is query caching? 4434


Answer: Query caching, available with the version 4.0.1
release, greatly improves the performace of selection
queries by storing query results in memory and
retrieving those results directly, rather than
repeatedly querying the database for the same result
set.
12. What is storage engines? 4729
Answer:
The storage engines manage data storage and index
management for MySQL. The MySQL server communicates
with the storage engines through a defined API.
Example of some storage engines are: InnoDB, MyISAM,
MEMORY etc.

13. What are the advantages of Innodb


table?(book page no:531)

Advantages of InnoDB
1. InnoDB should be used where data integrity comes a priority because it inherently takes care of
them by the help of relationship constraints and transactions.
2. Faster in write-intensive (inserts, updates) tables because it utilizes row-level locking and only
hold up changes to the same row that’s being inserted or updated.

14. What are the difference between


primary key and unique? 4730
Answer:
The PRIMARY KEY attribute is used to guarantee
uniqueness for a given row. No values residing in a
column designated as a primary key are repeatable or
nullable within that column whereas a column assigned
the UNIQUE attribute will ensure that all values
possess distinct values, except that NULL values are
repeatable.

15. What are the purposes of GRANT and


REVOKE commands? 4731
Answer: The GRANT and REVOKE commands are used to
manage access privileges. GRANT command needs to assign
new privileges to a user or group of users whereas the
REVOKE command is responsible for deleting previously
granted privileges from user or group of users.

example:
mysql> GRANT select,insert ON library.book TO
jone@localhost IDENTIFIED BY 'open123';
mysql> REVOKE insert ON library.book TO jone@localhost;

16. What is the benefit of using


prepare statement? 4732
Answer:
It is useful when we need to repeatedly execute the
query with iteration using different parameters.

Prepared statement:
1. Significantly lower cost of overhead
2. Fewer lines of code.

17. What are the advantages of stored


routine? 4733
 Answer:
Stroed routines have a number of advantages,
which are:

1. Consistency- prevent redundant development process


2. Performance- maintaining queries centrally.
3. Security- access of sensitive data can be restricted.
4. Architecture

18. What are the benefits of using


triggers? 4722
Answer:
Triggers have many benefits:

a. Audit trails: Special logging table that lets us


quickly tabulate and display the results to an
impatient executive.
b. Validation: We can use triggers to validate data
before updating the database.
c. Referential integrity enforcement: Table
relationships remain stable throughout the lifetime of
a project

19. What are the advantages of using


view? 4723
Answer:

Views can be quite advantages for a number of reasons:

1. Simplicity: Saving the hassle of repeatedly


querying multiple tables to retrieve this
information.

2. Security: Quite certain some information is


inaccessible to third parties, such as the SSNs and
salaries of employees.

3. Maintainability: A view abstracts the gory details


of a query.

20. What is cursor? Why is it used?


4725
Answer: Iterating through a result set. Known as a cursor,
it allows us to retrieve each row in the set separately and
perform multiple operations on that row without warring
about affecting other rows in the set.

21. What are the advantages of using


indexes? 4734
Answer: 1. It speeding database queries.
2. Input criteria results in vast increases in
performance over searching the entire unindexed table.

22. What is transaction? 4724


Answer: A transaction is an ordered group of database
operations that are treated as a single unit.
Successful transaction will be committed and
unsuccessful transaction will be rolled back.

23. How can you export data in mysql?


24. Difference between before trigger
and after trigger? 4735
Answer: Before trigger when validating or modifying data
that we intend to insert or update. On the other hand, an
after trigger should be used when data is to be propagated
or verified against other tables, and for carrying out
calculations.

25. What are the five items of the


$_FILES Array?( book page no:322)
26. What is the difference between
fetch_row () and fetch_array()?4746
Answer:
fetch_row(): This function retrieves an entire row of
data from result set, placing the values in an indexed
array.

fetch_array(): This function is really just an enhanced


version of fetch_row(), offering the opportunity to
retrieve each row of the result set as an associative
array, a numerically indexed array, or both.

27. What is binding variables? 4747


Answer: Binding variables is a variable to which we can
bind any table field to it so that if we update binding
variable that will effect to table field directly.
However binding can be one or two way. In two way
binding we can read-write data to table field with
binding variable and one way binding is read-only.

28. What is the difference between


MYISAM and InnoDB engine? 4600
Answer:
MyISAM:
1. MyISAM become MYSQL's default storage engine as of
version 3.23.
2. MyISAM tables are operating system independent.
3. Capable of sorting more data, but at a cost of less
storage space than counterpart.
4. Three MyISAM formats: static, dynamic, and compress
are available.

InnoDB:
1. Robust transactional storage engine
2. Working with large data stores.
3. It has been available to MySQL users since version
3.23 and effective solution for transactional
applications.

29. What are the functions of --execute


and --force option of mysql? 4748
Answer: --execute:
Executes a query without having to actually enter the
client interface. We can execute multiple Queries with
this option by separating each with a semicolon.

--force:
When we used noninteractive mode mysql can read and
execute queries found in a text file
30. What are the purposes of
INFORMATION_SCHEMA database? 4745
Answer: INFORMATION_SCHEMA offers a solution for using
typical SELECT queries to learn more about databases
and various server settings. Consisting of 16 tables,
it\'s possible to learn about practically every aspect
of installation.

Topics
1. File upload
2. DNS
3. Internet services
4. PHP’s mail function
5. HTTP
6. Session handling
7. Web services
8. RSS feed
9. Data encryption
10. Query caching
11. Storage engines
12. Innodb table
13. Primary key and unique
14. GRANT and REVOKE commands
15. Prepare statement
16. Stored routine
17. Trigger
18. View
19. Cursor
20. Export data in mysql
21. Trigger and after trigger
22. $_FILES Array
23. fetch_row () and fetch_array()
24. Binding variables
25. MYISAM and InnoDB engine
26. --execute and --force option of mysql
27. INFORMATION_SCHEMA database

You might also like