Thursday, January 25, 2007

query that will display ...

create a query that will display the total no.of employees and, of that total, the no.of employees hired in 1995,1996,1997, and 1998. create appropriate column headings.

select Count(*) as NumberOfEmployees,

EmployeesHiredIn1995_1996_1997_1998 =

(select count(*) from employees

where hiredate like '%1995%'

or hiredate like '%1996%'

or hiredate like '%1997%'

or hiredate like '%1998%')

from employees


SOURCE : www.referjava.com

Is Oracle is a Multidimensional database? If yes How?

Yes, Oracle is a Multidimensional database, as it provides much faster response time for analytical queries.Data in a multi-dimensional database is stored as business people views it, allowing them to slice and dice the data to answer business questions

this statement is supported by the prescence of cube and rollup operators in oracle 9i which indicates that it is a multidimensional dbs.

SOURCE : www.referjava.com

difference between varchar and varchar2

varchar means fixed length char, supported by MSSQL server 2000

varchar2 means variable length char, supported by Oracle.

SOURCE : www.referjava.com

Difference between oracle8i and oracle9i

The biggest difference between Oracle8i and Oracle9i is that Oracle9i lets You resize the SGA memory areas dynamically i.e., the Database Buffer Cache DB_CACHE_SIZE or the SHARED_POOL_SIZE, etc., can be resized when the database is up and running. The same is not possible with Oracle8i. You can get more information from OTN.


SOURCE : www.referjava.com

diff bet'n "NULL in C" and "NULL in Oracle

Null in C is Nothing or Void which can be compared with normal operators but inoracle Null can't be compared with normal operators like '=' or greater than or smallerthan.so be careful in using this feature of oracle because it can lead to several problems as like if u compared a password with oracle internal password and a user supplies a nullin password ur comparison may false like if INPUT_PASSWORD<>ORIGINAL_PASSWORD then raise_application_error(-20225,'"Incorrect Password");

NULL in SQL in an unknown value. It neither zero nor any valid value. It cannot be mapulated, but it can only be compared.



SOURCE : www.referjava.com

diffrence between and constraints and triggers

Constraints are used to maintain the integrity and atomicity of database .in other words it can be said they are used to prevent invalid data entry . the main 5 constraints are
NOT NULL,PRIMARY KEY,FOREIGN KEY,UNIQUE KEY and CHECK

Triggers are bascically stored procedures which automaticallly fired when any insert,update or delete is issued on table.

SOURCE : www.referjava.com

diff bet'n JNDI lookup(), list(), listBindings() & search

lookup() attempts to find the specified object in the given context. I.e., it looks for a single, specific object and either finds it in the current context or it fails.

list() attempts to return an enumeration of all of the NameClassPair's of all of the objects in the current context. I.e., it's a listing of all of the objects in the current context but only returns the object's name and the name of the class to which the object belongs.

listBindings() attempts to return an enumeration of the Binding's of all of the objects in the current context. I.e., it's a listing of all of the objects in the current context with the object's name, its class name, and a reference to the object itself.

search() attempts to return an enumeration of all of the objects matching a given set of search criteria. It can search across multiple contexts (or not). It can return whatever attributes of the objects that you desire. Etc. It's by far the most complex and powerful of these options but is also the most expensive.


SOURCE : www.referjava.com