Oct 19, 2014

Difference between locks, latches, enqueues and semaphores in Oracle

Locks and Latches: There are several processes inside Oracle System Global Area that needs to be accessed concurrently by many different database processes. And it is very important that only one process is able to modify particular data structure at a time. Oracle does this with the help of Locks and Latches.

Latches: Latches are the more restrictive mechanism, because they do not allow multiple processes to inspect the protected data structure at the same time. Latches do not support queuing. Oracle uses latch for the data is accessed in details.

Locks: Locks allow for better concurrency, because they may be held in a shared mode when the data structure is simply being inspected. Queuing is supported by Latch. Locks are used by Oracle for performance tuning.

Enqueues: Many of the Locks in Oracle are known as Enqueues locks. To enqueue a lock request is to place that request on the queue for its resource.

Semaphores: Inside Oracle database there are many processes or threads are running and for successful running they need to communicate with each other. The process through which they communicate with each other is known as semaphores. It is just like a signal which tells the thread that when to run and stop. There is a semaphore for every Oracle server process.

Difference between OLTP and OLAP in Oracle

OLTP>  (On-line Transaction Processing) is characterized by a large number of short on-line transactions (INSERT, UPDATE, DELETE). The main emphasis for OLTP systems is put on very fast query processing, maintaining data integrity in multi-access environments and an effectiveness measured by number of transactions per second. In OLTP database there is detailed and current data, and schema used to store transactional databases is the entity model (usually 3NF).

OLAP>  (On-line Analytical Processing) is characterized by relatively low volume of transactions. Queries are often very complex and involve aggregations. For OLAP systems a response time is an effectiveness measure. OLAP applications are widely used by Data Mining techniques. In OLAP database there is aggregated, historical data, stored in multi-dimensional schemas (usually star schema).

Oct 9, 2014

Deference between Listener.ora, tnsnames.ora and sqlnet.ora in Oracle

Listener.ora: >  When an instance starts, a listener process establishes a communication pathway to the Oracle
database. The listener is then able to accept database connection requests.

Tnsnames.ora: > This is a configuration file that contains net service names mapped to listener protocol addresses, or net service names mapped to connect descriptors for the local naming method.

Sqlnet.ora: > This file is the profile configuration file. It resides on the client machines and the database server. Profiles are stored and implemented using this file. The database server can be configured with access control parameters in the sqlnet.ora file. These parameters specify whether clients are allowed or denied access based on the protocol.

Oct 1, 2014

Difference between sqlnet.ora & tnsnames.ora in oracle

tnsnames.ora: > This tnsnames.ora file is a configuration file that contains net service names mapped to connect descriptors for the local naming method, or net service names mapped to listener protocol addresses.

sqlnet.ora:> The sqlnet.ora file is the profile configuration file. It resides on the client machines and the database server. Profiles are stored and implemented using this file. The database server can be configured with access control parameters in the sqlnet.ora file. These parameters specify whether clients are allowed or denied access based on the protocol.

All Shapes in C++ Language

C++ Shapes Code

Draw hollow diamond shape in c++ code in which user enter its desire size of diamond 

Using nested for loop and asterisk

like below image: click here to get code
Draw hollow diamond shape in c++ code in which user enter its desire size of diamond

 

Draw inverted triangle on output console using nested for loop and asterisk '*' character

Like Below Image click here or image to find code 

http://fahad-cprogramming.blogspot.com/2014/02/inverted-triangle-shape-in-c-code-using.html

inverted triangle c++ code

 

write a c++ program which draw a hollow triangle on output console using nested for loop and asterisk character

Like Below image Click here to get code

http://fahad-cprogramming.blogspot.com/2014/02/hollow-triangle-shape-in-c-programing.html

draw a hollow triangle


 

write a C++ code which draw an isosceles triangle using nested for loop

Like Below Image click here to get code

 which draw an isosceles triangle using nested for loop

which draw an isosceles triangle using nested for loop

 

 write a program to draw Upside down filled isosceles triangle code  using for loop C++ code
Like Below Image click here to get code
 upside down filled isosceles triangle code C++ sample image for output

upside down filled isosceles triangle code C+





C++ code to print right triangle pattern using for loop
Click on image to view code:


 code to print right triangle pattern using for loop


C++ Code Box Shape : 
Click on image to view full code 
box shape using for loop 











 Hollow Box shape using for loop and if else statement

sample output : click on image to view full code
   \for loop c++ shapes code



C++ SHAPES:

CODE SHAPES 





USING NESTED FOR  “*”.

*

**

***

****

*****

CODE

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=1; i<=5; i++)

   {

      for(int j=1; j<=i; j++)

      {

cout<<"*";

      }

cout<<endl<<endl;

  }

   getch();

}

C++ SHAPES:

CODE SHAPE USING NESTED FOR  “*”.

*****

****

***

**

*

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=5; i>=1; i--)

   {

      for(int j=1; j<=i; j++)

      {

cout<<"*" ;

      }

cout<<endl<<endl;

   }

   getch();

}

C++ SHAPES:

CODE SHAPES USING NESTED FOR  “*”.

           *

      **

    ***

  ****

*****

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=1; i<=5; i++)

   {

      for(int k=5; k>i;  k--)

      {

      cout<<" ";

      }

      for(int j=1; j<=i; j++)

      {

cout<<"*";

      }

cout<<endl<<endl;

   }

   getch();

}

C++ SHAPES:

CODE SHAPES USING NESTED FOR  “*”.

 *****

   ****

     ***

       **

         *

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=5; i>=1; i--)

   {

      for(int k=5; k>i;  k--)

      {

         cout<<" ";

       }

      for(int j=1; j<=i; j++)

      {

cout<<"*";

      }

cout<<endl;

   }

   getch();

}

CODE SHAPES USING NESTED FOR  “*”.

1*****

12****

123***

1234**

12345*

123456

#include<iostream.h>

#include<conio.h>

void main()

{

   clrscr();

   for(int i=1; i<=6; i++)

   {

      for(int k=1,a=1; k<=i; k++)

      {

       cout<<a; a++;

      }

      for(int j=5; j>=i; j--)

      {

cout<<"*";

      }

cout<<endl<<endl;

   }

   getch();

}