Saturday, May 08, 2010

Java Fundamental-IX

1. Are JavaBeans J2EE components?
NO. JavaBeans components are not considered J2EE components by the J2EE specification. JavaBeans components written for the J2EE platform have instance variables and get and set methods for accessing the data in the instance variables. JavaBeans components used in this way are typically simple in design and implementation, but should conform to the naming and design conventions outlined in the JavaBeans component architecture.

2. Is HTML page a web component?
NO. Static HTML pages and applets are bundled with web components during application assembly, but are not considered web components by the J2EE specification. Even the server-side utility classes are not considered web components, either.

3. What is the container?
A container is a runtime support of a system-level entity. Containers provide components with services such as lifecycle management, security, deployment, and threading.

4. What is the web container?
Servlet and JSP containers are collectively referred to as Web containers.

5. What is the thin client?
A thin client is a lightweight interface to the application that does not have such operations like query databases, execute complex business rules, or connect to legacy applications.

6. What are types of J2EE clients?
o Applets
o Application clients
o Java Web Start-enabled rich clients, powered by Java Web Start technology.
o Wireless clients, based on Mobile Information Device Profile (MIDP) technology.

7. What is deployment descriptor?
A deployment descriptor is an Extensible Markup Language (XML) text-based file with an .xml extension that describes a component's deployment settings. A J2EE application and each of its modules has its own deployment descriptor.

8. What is the EAR file?
An EAR file is a standard JAR file with an .ear extension, named from Enterprise Archive file. A J2EE application with all of its modules is delivered in EAR file.

9. What are JTA and JTS?
JTA is the abbreviation for the Java Transaction API. JTS is the abbreviation for the Java Transaction Service. JTA provides a standard interface and allows you to demarcate transactions in a manner that is independent of the transaction manager implementation. The J2EE SDK implements the transaction manager with JTS. But your code doesn't call the JTS methods directly. Instead, it invokes the JTA methods, which then call the lower-level JTS routines.
Therefore, JTA is a high level transaction interface that your application uses to control transaction. And JTS is a low level transaction interface and EJBs uses behind the scenes (client code doesn't directly interact with JTS. It is based on object transaction service (OTS) which is part of CORBA.

10. What is JAXP?
JAXP stands for Java API for XML. XML is a language for representing and describing text-based data which can be read and handled by any program or tool that uses XML APIs.

Sunday, May 02, 2010

Java Fundamental-VIII

1. What is J2EE?
J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multi tiered, and web-based applications.

2. What is the J2EE module?
A J2EE module consists of one or more J2EE components for the same container type and one component deployment descriptor of that type.

3. What are the components of J2EE application?
A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components. The J2EE specification defines the following J2EE components:
o Application clients and applets are client components.
o Java Servlets and Java Server Pages TM (JSPTM) technology components are web components.
o Enterprise JavaBeansTM (EJBTM) components (enterprise beans) are business components.
o Resource adapter components provided by EIS and tool vendors.

4. What are the four types of J2EE modules?
1. Application client module
2. Web module
3. Enterprise JavaBeans module
4. Resource adapter module

5. What does application client module contain?
The application client module contains:
o class files,
o an application client deployment descriptor.
Application client modules are packaged as JAR files with a .jar extension.

6. What does Enterprise JavaBeans module contain?
The Enterprise JavaBeans module contains:
o class files for enterprise beans
o An EJB deployment descriptor.
EJB modules are packaged as JAR files with a .jar extension.

7. What does resource adapt module contain?
The resource adapt module contains:
o all Java interfaces,
o classes,
o native libraries,
o other documentation,
o A resource adapter deployment descriptor.
Resource adapter modules are packages as JAR files with a .rar (Resource adapter Archive) extension.

8. Is J2EE application only a web-based?
NO. A J2EE application can be web-based or non-web-based. If an application client executes on the client machine, it is a non-web-based J2EE application. The J2EE application can provide a way for users to handle tasks such as J2EE system or application administration. It typically has a graphical user interface created from Swing or AWT APIs, or a command-line interface. When user request, it can open an HTTP connection to establish communication with a Servlet running in the web tier.

Wednesday, April 28, 2010

Database System-V

1. What is View?
A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database . The data accessed through a view is actually constructed using standard T-SQL select command and can come from one to many different base tables or even other views.

2. What is Index?
An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes, they are just used to speed up queries. Effective indexes are one of the best ways to improve performance in a database application.
A table scan happens when there is no index available to help a query. In a table scan SQL Server examines every row in the table to satisfy the query results. Table scans are sometimes unavoidable, but on large tables, scans have a terrific impact on performance. Clustered indexes define the physical sorting of a database table’s rows in the storage media. For this reason, ea ch database table may have only one clustered index. Non-clustered indexes are created outside of the database table and contain a sorted list of references
to the table itself.

3. What is the difference between clustered and a non-clustered index?
A clustered index is a special type of index that reorders the wa y records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages. A nonclustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a nonclustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.

4. What are the different index configurations a table can have?
A table can have one of the following index configurations:
a. No indexes
b. A clustered index
c. A clustered index and many nonclustered indexes
d. A nonclustered index
e. Many nonclustered indexes

5 .What is cursors?
Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time. In order to work with a cursor we need to perform some steps in the following order:
a. Declare cursor
b. Open cursor
c. Fetch row from the cursor
d. Process fetched row
e. Close cursor
f. Deallocate cursor

Monday, April 19, 2010

Database System-IV

1. What is RDBMS?
Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained a cross and among the data and tables. In a relational database, relationships between data items are expressed by means of tables. Interdependencies among these tables are expressed by data values rather than by pointers. This allows a high degree of data independence. An RDBMS ha s the capability to recombine the data items from different files, providing powerful tools for data usage.

2. What is normalization?
Database normalization is a data design and organization process applied to data structures based on rules that help build relational databases. In relational database design, the process of organizing data to minimize redundancy. Normalization usually involves dividing a database into two or more tables and defining relationships between the tables. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships.

3. What are different normalization forms?
1NF: Eliminate Repeating Group
Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain.

2NF: Eliminate Redundant Data
If an attribute depends on only part of a multi-valued key, remove it to a separate table.

3NF: Eliminate Columns Not Dependent On Key
If attributes do not contribute to a description of the key, remove them to a separate table. All attributes must be directly dependent on the primary key

BCNF: Boyce-Codd Normal Form
If there are non-trivial dependencies between candidate key attributes, separate them out into distinct tables.

4NF: Isolate Independent Multiple Relationships
No table may contain two or more 1:n or n:m relationships that are not directly related.

5NF: Isolate Semantically Related Multiple Relationships
There may be practical constrains on information that justify separating logically related many-to-many relationships.

ONF: Optimal Normal Form
A model limited to only simple (elemental) facts, as expressed in Object Role Model notation.

DKNF: Domain-Key Normal Form
A model free from all modification anomalies.

Remember, these normalization guidelines are cumulative. For a database to be in 3NF, it must first
fulfill all the criteria of a 2NF and 1NF database.

4. What is Stored Procedure?
A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the database.
e.g. sp_helpdb, sp_renamedb, sp_depends etc.

5. What is Trigger?
A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE)
occurs. Triggers are stored in and managed by the DBMS.Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed; the DBMS automatically fires the trigger as a result of a data modification to the associated table.
Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at the database level. Stored procedures, however, are not event-drive and are not atta ched to a specific table as triggers are. Stored procedures are explicitly executed by invoking a CALL to the procedure while triggers are implicitly executed. In addition, triggers can also execute stored procedures.
Nested Trigger: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger.

Wednesday, April 14, 2010

IT Fundamental - IX

1. Array is:
(a) linear data structure
(b) non-linear structure
(c) none of the above
(d) All of the above

2. A data structure in which elements are added and removed from only one end, is known as:
(a) Array
(b) Stack
(c) Queue
(d) None of the above

3. A diamond-shaped box in an Entity-Relationship diagram refers to:
(a) Entity
(b) Relationship
(c) Attribute
(d) Domain

4. The principle means of identifying entities within an entity set is:
(a) Primary Key
(b) Record
(c) Attribute
(d) Tuple

5. Modem refers to:
(a) Modulator
(b) Modulation
(c) Demodulator
(d) Modulator and Demodulator

6. C language is available for which of the following Operating Systems?
(a) DOS
(b) Windows
(c) Unix
(d) All of the above

7. Which of the following have the fastest access time?
(a) Magnetic Tapes
(b) Magnetic Disks
(c) Semiconductor Memories
(d) Compact Disks

8. DMA stands for:
(a) Direct Memory Allocation
(b) Distinct Memory Allocation
(c) Direct Memory Access
(d) Distinct Memory Access

9. Array subscripts in C always start at:
(a):1
(b) 0
(c) 1
(d) Value provided by user

10. Which type of commands in DOS needs additional files for their execution?
(a) Batch Commands
(b) Internal Commands
(c) External Commands
(d) Main Commands

Tuesday, April 06, 2010

IT Fundamental - VIII

1. What is the name of the software that allows us to browse through web pages?
(a) Browser
(b) Mail Client
(c) FTP Client
(d) Messenger

2. What is the address given to a network called?
(a) System Address
(b) SYSID
(c) Process ID
(d) IP Address

3. Which one of the following is a valid DOS command?
(a) LIST *.*
(b) LIST???.???
(c) RECOVER A:
(d) RENAME A:SAMPLE.TXT C:TEST.DOC

4. All system settings in WINDOWS are stored in:
(a) CONTROL.INI
(b) MAIN.INI
(c) SYSTEM.INI
(d) SETTING.INI

5. Which number system is usually followed in a typical 32-bit computer?
(a) 2
(b) 10
(c) 16
(d) 32

6. Which of the following is not an output device:
(a) Printer
(b) Scanner
(c) Flat Screen
(d) Touch Screen

7. A microprocessor is a processor with reduced
(a) instruction set
(b) power requirement
(c) MIPS performance
(d) none of the above

8. Which of the following is not an output of an assembler?
(a) executable program
(b) source listing with line numbers and errors
(c) a symbol table
(d) object program

9. Which layer of OSI model is responsible for routing and flow control:
(a) Presentation
(b) Transport
(c) Network
(d) Data Link

10. Arrays are passed as arguments to a function by
(a) value
(b) reference
(c) both a and b
(d) none of the above

Wednesday, March 24, 2010

IT Fundamental - VII

1. Which of the following arrangements of general-purpose data structures is from slowest to fastest for the purpose of finding objects according to a key value:
a. sorted arrays, unsorted linked lists, hash tables, binary search trees
b. sorted arrays, binary search trees, linked lists, hash tables
c. hash tables, binary search trees, unsorted arrays, sorted linked lists
d. sorted linked lists, sorted arrays, binary search trees, hash tables

2. Which of the following arrangements of general-purpose data structures is from slowest to fastest for the purpose of storing objects by key value (not necessarily in order):
a. unsorted arrays, sorted linked lists, hash tables, binary search trees
b. sorted arrays, binary search trees, linked lists, hash tables
c. hash tables, binary search trees, sorted arrays, sorted linked lists
d. unsorted arrays, linked lists, binary search trees, hash tables

3. In an abstract data type, access is often limited to certain items. Which of the following is not such an abstract data type?
a. binary search tree
b. priority queue
c. queue
d. stack

4. Which of the following is not a basic data structure that could be used to implement an abstract data type?
a. array
b. linked list
c. hash table
d. heap

5. Which of the following statements is true?
a. An abstract data type can be conveniently searched for an item by key.
b. An abstract data type can be conveniently traversed.
c. An abstract data type is an interface within a program that simplifies problems.
d. An abstract data type is a database for direct user-accessible data.

6. Which of the following methods of implementing a priority queue is best when both insertion and deletion need to be reasonably fast?
a. ordered array
b. ordered linked list
c. heap
d. binary search tree

7. If the amount of data to be stored in a stack cannot be predicted, the best data structure to implement the stack is:
a. hash table
b. binary search tree
c. linked list
d. unordered array

8. Which of the following statements is true regarding a queue?
a. It may be implemented either by an array or a linked list.
b. It may be implemented by a heap because first in is first out.
c. It may be implemented by a linked list because insertions and deletions may be from the same end.
d. It may be implemented by an array without providing for wrap-around.

9. Which of the following sort algorithms is not an O(n2) sort?
a. shell sort
b. insertion sort
c. selection sort
d. bubble sort

10. Which of the following is true regarding the efficiency of the shell sort?
a. It is slower than O(n2).
b. It is faster than O(n*log2 n).
c. It is not as efficient as the insertion sort.
d. It has not been established theoretically, i.e. as a single function of n.

Friday, February 26, 2010

IT Fundamental - VI

1. Database software allows users to __________.
a. add, change, and delete data
b. sort and retrieve data from the database
c. create forms and reports using the data in the database
d. all of the above

2. The results of presentation graphics software programs normally are viewed as __________.
a. macros
b. audience handouts
c. slides
d. notes pages

3. A clip art/image gallery can be stored on a __________.
a. hard disk
b. CD-ROM
c. DVD-ROM
d. all of the above

4. A(n) __________ is a PIM feature that can be used to record ideas, reminders, and other important information.
a. appointment calendar
b. address book
c. notepad
d. worksheet

5. Integrated software is __________.
a. less expensive than a less powerful software suite
b. more expensive than a less powerful software suite
c. less expensive than a more powerful software suite
d. more expensive than a more powerful software suite

6. Popular software suites used in schools usually include all of the following applications except __________.
a. word processing
b. spreadsheet
c. calendar
d. database

7. Integrated software and software suites offer all of the following advantages except __________.
a. lower cost
b. ease of use
c. higher cost
d. applications use a similar interface

8. Microsoft FrontPage and Netscape Composer are examples of __________ software.
a. educational
b. Web page authoring
c. reference
d. personal computer entertainment

9. On-screen talking calculators, speech synthesis software programs, and text enlargement software are examples of __________ software.
a. special needs
b. home design/landscaping
c. reference
d. personal computer entertainment

10. Tutorials are __________.
a. answers to questions that people frequently ask about an application
b. the electronic equivalent of a user manual, usually integrated into an application software package
c. step-by-step instructions using real examples to show how to use an application
d. automated assistants that help complete a task by asking questions and performing actions based on the answers

Search Aptipedia