Database Administration Questions


Q:

What is an error-first callback ?

Answer

Error-first callbacks are used to pass errors and data as well. You have to pass the error as the first parameter, and it has to be checked to see if something went wrong. Additional arguments are used to pass data.


 


fs.readFile(filePath, function(err, data) {
if (err) {
// handle the error, the return is important here
// so execution stops here
return console.log(err)
}
// use the data object
console.log(data)
})

Report Error

View answer Workspace Report Error Discuss

2 3199
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 3176
Q:

A man and his son are in a terrible accident and are rushed to the hospital in critical care. The doctor looks at the boy and exclaims "I can't operate on this boy, he's my son!" How could this be?

Answer

This is only possible when that doctor is boy's mother.

Report Error

View answer Workspace Report Error Discuss

15 3171
Q:

Two main measures for the efficiency of an algorithm are

A) Time and Space B) Complexity and Memory
C) Data and Space D) Memory and Processor
 
Answer & Explanation Answer: A) Time and Space

Explanation:

Two main measures for the efficiency of an algorithm are Time and Space.

Report Error

View Answer Report Error Discuss

1 3168
Q:

The network layer concerns with

A) Packets B) Frames
C) Bytes D) All of the above
 
Answer & Explanation Answer: A) Packets

Explanation:

The network layer concerns with the packets. It brings the packets from the source to the destination.

Report Error

View Answer Report Error Discuss

5 3153
Q:

Which sentence contains both an adverb and a conjunction?

A) Adam crept silently up the stairs, but couldn't slow his heartbeat. B) The storm caused flooding as predicted.
C) Sneha was a kind person, but she hated people who spread rumors. D) Do you want the shrimp or the crab?
 
Answer & Explanation Answer: A) Adam crept silently up the stairs, but couldn't slow his heartbeat.

Explanation:

The sentence which contains both an adverb and a conjunction is "Adam crept silently up the stairs, but couldn't slow his heartbeat."

 

Here, Adverb - Silently and Conjunction - But.

Report Error

View Answer Report Error Discuss

5 3143
Q:

Representation level data models provide the concepts that are close to the way many users perceive data

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

High level data models provide the concepts that are close to the way many users perceive data

Report Error

View Answer Workspace Report Error Discuss

Subject: Database
Job Role: Database Administration

0 3143
Q:

The following bar graph shows the percentage of chairs produced by two companies Neel Kamal and Raj Kamal during five different years. Bar graph also shows the total no. of chairs produced in different years associated with it. Study the graph carefully to answer the following questions.

bar_g1527828671.jpg image

Question 1)  Find the average no. of chairs produced by Raj Kamal in the years 2004, 2006 and 2007 together.

 

Question 2)  What is the ratio of no. of chairs produced by Neel Kamal in the years 2007 and 2008 together to that by Raj Kamal in the same years together?

 

Question 3)  If 12% chairs out of total chairs produced in the year 2008 were defective and in them ratio of defective chairs by Raj Kamal and Neel Kamal is 2 : 3 then find the no. of defective chairs produced by Neel Kamal in the year 2008.

Answer

Answer 1)  


1/3 x (54 x 150 + 60 x 300 + 36 x 450)


= 1/3 x 42300


= 14100.


 


Answer 2)


Required ratio of chairs = 64 x 450 + 56 x 50036 x 450 + 44 x 500


= 56800/38200


= 284/191.


 


Answer 3)


 


Required number of chairs =  35 x 12100 x 50000
= 3600.


 

Report Error

View answer Workspace Report Error Discuss

7 3139