-
What’s the difference between
primary key and unique key? Ans:Both
Primary & Unique keys are Indexes.
Index:
An index is a structure in a table
that orders the data. It allows the
database to access data quickly (In
MySQL its implemented using B-tree
algorithms).
Primary Key:
This is an index that cannot be
NULL, Primary Keys are used in
building relationships between
tables in a database. (an index is
automatically created on the primary
key). The difference between primary
and ordinary keys is that there can
be multiple keys, but only one
primary key.
Unique Key:
Unique and Index are same, the
difference is, in Unique, duplicate
are not allowed in any circumstances
and that is enforced by database
server. Primary key(s) qualify to be
Unique on basis
of their uniqueness.
In case, your table has 2 primary
keys means that the 2 fields
together form one unique key. Each
field by itself may have repeating
values, but both primary keys
combined together must be unique.
-
-
The Perl script on the site is
working slow. What’s your plan of
attack?
-
Name several reasons why a Web site
would not work entirely.
-
Write an SQL statement that would
select only the customers who made
multiple orders within a single
week.
-
What version control systems do you
use?
-
How do you configure the maximum
number of processes in Apache?
Ans:This arrangement uses more
advanced mod_rewrite features to get
the translation from virtual host to
document root from a separate
configuration file. This provides
more flexibility but requires more
complicated configuration.
The vhost.map file contains
something like this:
www.customer-1.com
/www/customers/1
www.customer-2.com
/www/customers/2
# …
www.customer-N.com
/www/customers/N
The http.conf contains this:
RewriteEngine on
RewriteMap lowercase int:tolower
# define the map file
RewriteMap vhost txt:/www/conf/vhost.map
# deal with aliases as above
RewriteCond %{REQUEST_URI} !^/icons/
RewriteCond %{REQUEST_URI} !^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}}
^(.+)$
# this does the file-based remap
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/docs/$1
RewriteCond %{REQUEST_URI} ^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}}
^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/cgi-bin/$1
[T=application/x-httpd-cgi]
-
How much memory do you need for Web
server app? Describe your logic of
calculating this number.
-
What are response codes 302 and 303?
-
How do you delete all files with
file extension temp recursively on a
Linux box?
-
What Perl tools do you use for
coding, testing, debugging?
-
Do you use DHTML and JavaScript?
Describe the projects you’ve used
them in.