Professional Documents
Culture Documents
$$$$$ DBMS stands for Database Management System, which is a general term for a set
of software dedicated to controlling the storage of data.
RDMBS stand for Relational Database Management System. This is the most common
form of DBMS. Invented by E.F. Codd, the only way to view the data is as a set of tables.
Because there can be relationships between the tables, people often assume that is what
the word "relational" means. Not so. Codd was a mathematician and the word "relational"
is a mathematical term from the science of set theory. It means, roughly, "based on
tables".
$$$$$ The main advantage of an RDBMS is that it checks for referential integrity
(relationship between related records using Foreign Keys). You can set the constraints in
an RDMBS such that when a particular record is changed, related records are
updated/deleted automatically.
$$$$$ The difference is dbms has no tables while rdbms has and also it describes about
the relationships among the tables.
DBMS for small organizations where rdbms for large amount of data.
In DBMS only one user can access the same database, at the same time. In RDBMS
many users simultaneously access the same database
RDBMS is more secure than DBMS
In DBMS store and retrieve small amount of Data In RDBMS store and retrieve large
amount of Data
$$$$$ 1. Dbms is a single user system rdbms is a multi-user system 2. Dbms stores do
not store data in the form of tables while rdbms stores it in the form of tables. 3. Most of
dbms are not supporting client/server architecture as it is supported by rdbms. 4. Most
dbms do not support distributed databases.
-----------------------------------------------------------------------------------------------------------
-
###### What is meant by Open Source?
Open source doesn't just mean access to the source code. The distribution terms of open-
source software must comply with the following criteria:
1. Free Distribution.
2. Source Code.
3. Derived Works.
4. Integrity of Author’s Source Code.
5. No Discrimination against Persons or Groups.
6. No Discrimination against fields of Endeavor.
7. Distribution of license.
8. License Must Not Be Specific to a Product.
9. License Must Not Restrict Other Software.
10. License Must Be Technology-Neutral.
-----------------------------------------------------------------------------------------------------------
-
##### What is the difference between a Webserver and an Application Server?
$$$$$ A Web server serves pages for viewing in a Web browser, while an application
server provides methods that client applications can call.
A Web server exclusively handles HTTP requests, whereas an application server
serves business logic to application programs through any number of protocols.
$$$$$ Webserver serves pages for viewing in web browser, application server provides
exposes business logic for client applications through various protocols
Webserver exclusively handles http requests. Application server serves business
logic to application programs through any number of protocols.
Webserver delegation model is fairly simple, when the request comes into the
webserver; it simply passes the request to the program best able to handle it (Server
side program). It may not support transactions and database connection pooling.
Application server is more capable of dynamic behavior than webserver. We can
also configure application server to work as a webserver. Simply application server is
a superset of webserver.
Web Server serves static HTML pages or gifs, jpegs, etc., and can also run code
written in CGI, JSP etc. A Web server handles the HTTP protocol. E.g. of some web
server are IIS or apache.
An Application Server is used to run business logic or dynamically generated
presentation code. It can either be .NET based or J2EE based (BEA Weblogic Server,
IBM Websphere, JBoss).
A J2EE application server runs servlets and JSPs (infact a part of the app server
called web container is responsible for running servlets and JSPs) that are used to
create HTML pages dynamically. In addition, J2EE application server can run EJBs -
which are used to execute business logic.
An Application server has a 'built-in' web server; in addition to that it supports other
modules or features like e-business integration, independent management and
security module etc.
-----------------------------------------------------------------------------------------------------------
-
##### Difference between a Servlet and an Applet?
$$$$$ Applet is a part of Core JAVA and Servlet of Advance Java. Applet is client side
program and Servlet is Server side. When Applet runs it take the resources of client
whereas Servlet is processed at server.
An Applet's class, jar files can be accessed and downloadable by client but not so in case
of servlet.
Applets can run under any web browser their execution is dependent on Client as they
require JRE Whereas Servlets do not require any thing specific at client side, as they
require java enabled web/application Server.
$$$$$ Servlet is the server side component and the applet is the client side component.
Applet makes the request to the servlet and servlet is the server, which respond that
request.
$$$$$ Servlet doesn't have GUI, while applet have GUI. Applets are very heavy to
handle as compared to servlet. Servlets are for server side and applet are for client view
and use the methods overridden from the List. This makes the code easier to change
whenever you change your mind.
Vector and ArrayList are very similar. Both of them represent a 'growable array', where
you access to the elements in it through an index.
ArrayList it's part of the Java Collection Framework, and has been added with version
1.2, while Vector it's an object that is present since the first version of the JDK. Vector,
anyway, has been retrofitted to implement the List interface.
While the iterators that are returned by both classes are fail-fast (they cleanly
thrown a ConcurrentModificationException when the original object has been
modified), the Enumeration returned by Vector are not.
Unless you have strong reason to use a Vector, the suggestion is to use the ArrayList.
-----------------------------------------------------------------------------------------------------------
-
##### Explain the difference between a procedure and a function?
$$$$$ The difference between functions and procedures is really quite simple: functions
return a value, while procedures don't. However, any function can be treated as a
procedure by simply discarding its value.
Type 2:
A native-API partly Java technology-enabled driver converts JDBC calls into calls on the
client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge
driver, this style of driver requires that some binary code be loaded on each client
machine.
Type 3:
A net-protocol fully Java technology-enabled driver translates JDBC API calls into a
DBMS-independent net protocol which is then translated to a DBMS protocol by a
server. This net server middleware is able to connect all of its Java technology-based
clients to many different databases. The specific protocol used depends on the vendor. In
general, this is the most flexible JDBC API alternative. It is likely that all vendors of this
solution will provide products suitable for Intranet use. In order for these products to also
support Internet access they must handle the additional requirements for security, access
through firewalls, etc., that the Web imposes. Several vendors are adding JDBC
technology-based drivers to their existing database middleware products.
Type 4:
A native-protocol fully Java technology-enabled driver converts JDBC technology calls
into the network protocol used by DBMSs directly. This allows a direct call from the
client machine to the DBMS server and is a practical solution for Intranet access. Since
many of these protocols are proprietary the database vendors themselves will be the
primary source for this style of driver. Several database vendors have these in progress.
##### What is the difference between Servlet Context and Servlet Config?
$$$$$
Downcasting is not always safe, and you have to explicitly cast the object.
void foo(Object o)
{
Integer i = (Integer)o; //might not work depending on what o is
}
Assume we had decided to go ahead and allow the finalize method to be private.
Consider the following classes
public class SuperClass
{
private HeavyResource resource = new HeavyResource();
public SubClass(){
super(); //Added for clarity
}
public SubClass(){
super(); //Added for clarity
}
##### What is the difference between POP(Procedure Oriented Programming) and OOP?
$$$$$ 1. In POP, importance is given to the sequence of things to be done and in OOP,
importance is given to the data.
2. In POP, larger programs are divided into functions and in OOP, larger programs are
divided into objects.
3. In POP, most functions share global data. In OOP mostly the data is private and only
functions inside the object can access the data.
4. POP follows a top down approach in problem solving while OOP follows a bottom up
approach.
$$$$$ the difference between the two is that sendRedirect always sends a header back to
the client/browser. This header then contains the resource (page/servlet) which u wanted
to be redirected. The browser uses this header to make another fresh request. Thus
sendRedirect has a overhead as to the extra remote trip being incurred it is like any other
Http request being generated by your browser. The advantage is that u can point to any
resource(whether on the same domain or some other domain) e.g. if sendRedirect was
called at www.mydomain.com then it can also be used to redirect a call to a resource on
www.theserverside.com.
Where as in case of forward() call, the above is not true, resources from the server, where
the fwd., call was made, can only be requested for, but the major diff between the two is
that forward just routes the request to the new resources which u specify in your forward
call. that means this route is made by the servlet engine at the server level only, no
headers are sent to the browser which makes this very efficient, also the request and
response objects remain the same both from where the forward call was made and the
resource which was called.