Database Administration Questions


Q:

What is the difference between creating String as new() and literal ?

Answer

When we create string with new() Operator, it’s created in heap and not added into string pool while String created using literal are created in String pool itself which exists in PermGen area of heap.



String s = new String("Test");

does not put the object in String pool , we need to call String.intern() method which is used to put them into String pool explicitly. its only when you create String object as String literal e.g. String s = "Test" Java automatically put that into String pool.

Report Error

View answer Workspace Report Error Discuss

1 2147
Q:

What is immutable object? Can you write immutable object ?

Answer

Immutable classes are Java classes whose objects can not be modified once created. Any modification in Immutable object result in new object. For example is String is immutable in Java. Mostly Immutable are also final in Java, in order to prevent sub class from overriding methods in Java which can compromise Immutability. You can achieve same functionality by making member as non final but private and not modifying them except in constructor.

Report Error

View answer Workspace Report Error Discuss

3 2850
Q:

Which two method you need to implement for key Object in HashMap ?

Answer

In order to use any object as Key in HashMap, it must implements equals and hashcode method in Java.

Report Error

View answer Workspace Report Error Discuss

4 6061
Q:

Explain what is injector ?

Answer

1.  An injector is a service locator.
2.  It is used to retrieve object instances as defined by provider, instantiate types, invoke methods and load modules.
3. There is a single injector per Angular application, it helps to look up an object instance by its name.

Report Error

View answer Workspace Report Error Discuss

3 3592
Q:

How can you make sure your dependencies are safe ?

Answer

When writing Node.js applications, ending up with hundreds or even thousands of dependencies can easily happen.
For example, if you depend on Express, you depend on 27 other modules directly, and of course on those dependencies' as well, so manually checking all of them is not an option!


The only option is to automate the update / security audit of your dependencies. For that there are free and paid options:


1. npm outdated
2. Trace by RisingStack
3. NSP
4. GreenKeeper
5. Snyk

Report Error

View answer Workspace Report Error Discuss

1 4319
Q:

A piece of icon or image on a web page associated with another webpage is called

A) url B) plugin
C) hyperlink D) none of the mentioned
 
Answer & Explanation Answer: C) hyperlink

Explanation:

In computing, a hyperlink, or simply a web link, is an icon or reference to data that links to another file or object that the reader can follow by clicking. The text which contains hyperlinks is called as hypertext.

 

A_piece_of_icon_or_image_on_a_web_page_associated_with_another_webpage_is_called1563599363.jpg image

Report Error

View Answer Report Error Discuss

13 16441
Q:

Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables ?

A) Data Manipulation Language(DML) B) Data Definition Language(DDL)
C) Both A & B D) None
 
Answer & Explanation Answer: B) Data Definition Language(DDL)

Explanation:

The Data Definition Language (DDL) is used to manage table and index structure.

CREATE,

ALTER,

RENAME,

DROP and

TRUNCATE

statements are the names of few data definition elements.

Report Error

View Answer Report Error Discuss

Filed Under: SQL
Job Role: IT Trainer , Database Administration , Analyst

4 13044
Q:

Which operator performs pattern matching ?

A) LIKE operator B) EXISTS operator
C) BETWEEN operator D) None of these
 
Answer & Explanation Answer: A) LIKE operator

Explanation:

LIKE is a keyword that is used in the WHERE clause. Basically, LIKE allows us to do a search based operation on a pattern rather than specifying exactly what is desired (as in IN) or spell out a range (as in BETWEEN).

 

The syntax is as follows:
SELECT "column_name"
FROM "table_name"
WHERE "column_name" LIKE {PATTERN}

 

{PATTERN} often consists of wildcards.

 

In SQL, there are two wildcards:


% (percent sign) represents zero, one, or more characters.

_ (underscore) represents exactly one character.

 

More :: Certification Questions on SQL

Report Error

View Answer Report Error Discuss

28 36914