Monday, June 29, 2020

Architecture of Oracle 11g: Part 1


It is basically divided into the following three major parts: 

1. Memory Structure

2. Logical Database Structure

3. Physical Structure

The memory structure of the 11g architecture means segregation of Logical Memory for various Processes of Oracle. Whenever the Oracle instance is started it acquires the memory set for it via the MEMORY_TARGET and MEMORY_MAX_TARGET parameters (Automatic Memory Management must be enabled for this during installation) through the Oracle Universal Installer (OUI), a Java API for Oracle DB installs.  With no further ado, let's focus on the memory structure.

The Oracle Memory Structure is primarily allocated into the two parts:

1. System Global Area (SGA)  2. Program Global Area (PGA)




Let's explain the SGA first.

The SGA or System Global Area is the most vital of them.

It is manually managed by "SGA_TARGET" parameters.

The SGA itself is further sectioned into the following:

1. Shared Pool: SHARED_POOL_SIZE

2. Data Buffer Cache: DB_CACHE_SIZE

3. Redo Log Buffer:  LOG_BUFFER

4. Large Pool: LARGE_POOL_SIZE

5. Java Pool: JAVA_POOL_SIZE

6. Streams Pool: STREAMS_POOL_SIZE

7. Sort Extent Pool

8. Flash Back Buffer


The following explains the preceding topics in detail.

1. SHARED POOL

A Shared Pool is a very vital part of SGA and its configuration is what makes the response on the Oracle DB quick, prevents unnecessary I/O Hits and CPU utilization. The Shared Pool itself consists of the following:

 

Ø Library Cache

It's the heart and soul of SQL and PL/SQL statement execution. It does what is known as "Hard Parsing" and "Soft Parsing".
Hard Parsing occurs only if the execution plan of the SQL query does not already exist in the library cache. It takes time for such queries to execute and if the size of the Shared Pool is not configured appropriately then it affects the DB performance. When the same query is repeatedly fired by the same or various users, the Least Recently Used algorithm is used to create space in the library cache for continuously hitting new and existing queries.
Soft Parsing is the best option for the fastest execution of the query since it takes the already present execution plan from the library cache and the processing time is drastically improved. Thus an appropriate size of the library cache will help not an early phase out of the SQL, PL/SQL statement.

Ø Data Dictionary Cache

Data Dictionary is the collection of data about the data, in other words it is the meta data for the DB objects like tables, views, indexes, table spaces and so on.
Other than that it is used to cache the user names, their roles privileges and so. It also acts as an authenticator for the privileges if the specific user querying the table actually has the rights to do so. If any information is not present in the Data Dictionary cache then it is read from the Data Dictionary and that is a costlier miss than the library caches miss.
 

Ø Result cache

This area is newly introduces into the 11g version. This cache is used to store the result set returned from the SQL query. Thus the next time the same query is executed the result is directly displayed with a hit on the DB for data. To use this feature the RESULT_CACHE_MODE parameter must be initialized via the PL/SQL package DBMS_RESULT_CACHE or through the Enterprise Manager.

 

2. DATA BUFFER CACHE

The Data Buffer Cache, as the name suggests, holds the data read by the server process from the data files. If the data is not present in the Data Buffer Cache and the response time is increased for it then it will first read the data into buffer cache then display it. Thus, the larger the buffer cache, the fewer the disk reads and writes are needed and the better the performance of the database. There can be a free buffer area and dirty buffer area that is the data under manipulation and the pinned data that is currently in use by the active buffer. Further this buffer cache uses a complex combination of algorithms like LRU and Touch count. Also we can create multiple Data Buffer Caches and use the ALTER TABLE or ALTER INDEX command to modify the type of buffer pool that a table or an index should use. DB_CACHE_SIZE is the parameter to set the Data Buffer size. The keep and the recycle buffer pools are purely optional, while the default buffer pool is mandatory. DB_KEEP_CACHE_SIZE helps to maintain the data blocks in memory. We may have small tables that are frequently accessed, so we can assign the tables to the keep buffer cache when they are created.

DB_RECYCLE_CACHE_SIZEIt helps to remove the data from the cache immediately after use. It will cycle out the object from the cache as soon as the transaction is over. This is ideal for large tables where transactions are not constant. 

 

3. REDO LOG BUFFER

It is set by the LOG_BUFFER initialization parameter and it's a circular buffer in SGA. The size of the Redo log buffer is just a couple of MBs and if it's once fixed then it cannot be dynamically resized like other parameters. The Log writer flushes the redo log to the disk for the following circumstances:

· The user commits a transaction.

· The redo log buffer is 1/3rd full.

· The database buffer cache is running low on space and thus the DB writer instruct the log writer process to flush the log buffer contents to disk to make space for the new data.

 

4.  LARGE POOL

It is an optional memory pool, it's useful only:

· When parallel quires are fired on the database.

· As session memory on shared servers environment.

· For backup and restore using the RMAN facility of Oracle.

The size of the Large pool is set by the LARGE_POOL_SIZE parameter.

5.  Java POOL

This memory space is configured for the database using Java code. This segregation helps to provide a definitive space for a Java app to run without affecting other functionality. It has reserved memory for the Java Virtual Machine (JVM).

 

6. THE STREAMS POOL
The STREAMS_POOL_SIZE initialization parameter helps set the stream pool component. It is useful for data sharing among various databases and various applications. If the automatic shared memory management option is enabled then the space allocated is almost 10 percent of the shared pool size.

 

7.  SORT EXTEND POOL

In a shared server scenario the sort extent pool is used to direct the extent of Sort segments within the temporary tables pace as may be requested by the user process. In a dedicated server scenario the sort extent pool resides in the PGA. V$SORT_SEGMENT contains the information about the sort extent pool that may help us decide to size our extent properly.

 

8.  FLASH BACK POOL

A Flash Back Buffer is used for the following purposes:

· Flash Back Query: It includes flashback query to retrieve data from previously fired queries.

· Flash Back version queries: It displays the various version of data rows along with the first and last execution time of a specific transaction leading to the creation of that row.

· Flash Back Transaction Query: It helps to retrieve historical data for any transaction so that we can undo them.

· Flash Back Table: This feature can be used to reinstate any table to its earlier version.

· Flash Back Database: As the name states. It is used for the recovery of the entire database to a specific time in the past.

· Flash Back Drop: This feature is quite handy if we accidentally drop a table and thus simply want to recover it. The DBMS_FLASHBACK parameter initializes it.

Saturday, June 27, 2020

What is Oracle Database?


ummary: in this tutorial, you will have an overview of the Oracle Database, its features, andWhat is a database

A database is an organized collection of structured data stored electronically in a computer system.

When the computer was first invented, it was mainly used for scientific researches to perform calculation quickly.

Since the computer was adopted more and more, the requirements were also increased to require the computer to store a larger volume of data for fast retrieval.

Before the database system was invented, the flat file structure was commonly used to store data. For example, here is the comma-separated value (CSV) file that stores employee information:

first name, last name, phone
John, Doe, (408)-245-2345
Jane, Doe, (503)-234-2355
...

The CSV file has three columns which are known as fields and rows which are known as records. When the number of rows in the flat file is increased e.g., million rows, it becomes unmanageable.

In the 1970s, Dr. Ted Codd, a computer scientist, invented the relational model for database management. The relational model deals with many issues caused by the flat file model. According to his model, data is organized in entities and attributes, instead of combining everything in a single structure.

An entity is a person, place, or thing and attributes describe the person, place, and thing. For example, you can use the relational model to organize the employee information into an employee entity with the attributes: first name, last name, and phone:

what is oracle database - employee entity

Each employee may have one or more contacts, you can create a contact entity and relate the employee entity to the contacts entity through a relationship called one-to-many.

what is oracle database - relationship

By the way, we often refer the entities as tables, records as rows and fields as columns.

The relational model is better than the flat file model because it removes the duplicate data e.g. if you put employee and contact information on the same file. The employee, who has more than one contact, will appear in multiple rows.

The Relational Database Management System, or RDBMS in short, manages relational data. Oracle Database is an RDBMS with the largest market share.

oracle tutorial

Besides the Oracle Database, there are other RDBMS products available. Here are some notable ones:

  • Db2 from IBM.
  • SQL Server from Microsoft.
  • MySQL – the most popular open-source database, also from Oracle.
  • PostgreSQL – the most advanced open source database.

Oracle Database features

Oracle Database allows you to quickly and safely store and retrieve data. Here are the integration benefits of the Oracle Database:

  • Oracle Database is cross-platform. It can run on various hardware across operating systems including Windows Server, Unix, and various distributions of GNU/Linux.
  • Oracle Database has its networking stack that allows application from a different platform to communicate with the Oracle Database smoothly. For example, applications running on Windows can connect to the Oracle Database running on Unix.
  • ACID-compliant – Oracle is ACID-compliant Database that helps maintain data integrity and reliability.
  • Commitment to open technologies – Oracle is one of the first Database that supported GNU/Linux in the late 1990s before GNU/Linux become a commerce product. It has been supporting this open platform since then.

Oracle Database has several structural features that make it popular:

  • Logical data structure – Oracle uses the logical data structure to store data so that you can interact with the database without knowing where the data is stored physically.
  • Partitioning – is a high-performance feature that allows you to divide a large table into different pieces and store each piece across storage devices.
  • Memory caching – the memory caching architecture allows you to scale up a very large database that still can perform at a high speed.
  • Data Dictionary is a set of internal tables and views that support administer Oracle Database more effectively.
  • Backup and recovery – ensure the integrity of the data in case of system failure. Oracle includes a powerful tool called Recovery Manager (RMAN) – allows DBA to perform cold, hot, and incremental database backups and point-in-time recoveries.
  • Clustering – Oracle Real Application Clusters (RAC) – Oracle enables high availability that enables the system is up and running without interruption of services in case one or more server in a cluster fails.

Oracle Database Editions

Oracle provides three main editions of Oracle Databases as follows:

1) Enterprise Edition (EE) is the common and expensive edition of the Oracle Database. It has the following characteristics:

  • No maximum number of CPUs
  • No limits on memory or database size
  • Include premium features that are not available in other editions.

2) Standard Edition (SE) is a limited edition of the Enterprise Edition that has the following characteristics:

  • Limited to four or fewer CPUs
  • No limit on memory or database size
  • Include many features, but no as many as EE

3) Expression Edition (XE) is a free-to-use version of the Oracle Database that available on both Windows and GNU/Linux platforms. These are the features of Oracle Database XE 18c:

  • Limited to 2 CPUs
  • Can use the maximum of 2GB of RAM, and has 12GB of user data.
  • Very limited features

Thursday, June 25, 2020

AAVU Cow Gomatha గోవు




గోవు గురించి తెలియనివారు ఉండరు. ఎందుకంటే దీనివలన కలిగే ప్రయోజనాలు చాలా ఎక్కవ. గోవును హిందువులు ఆరాధ్య దైవంగా భావిస్తారు. గోవు నుంచి వచ్చే మూత్రం సేవించడం వలన కాలేయ పనితీరు మెరుగుపడుతుంది. ఇది రోగనిరోధక శక్తిని పెంచుతుంది. ఆవు పాలకు విషాన్ని హరించే గుణం ఉంది. గోవు వలన మనకు కలిగే ఆరోగ్య ప్రయోజనాలేంటో ఇప్పుడు తెలుసుకుందాం.

1. ఆవు పేడలో కలరా వ్యాధిని వ్యాపింపచేసే క్రిములను నాశనం చేసే శక్తి ఉంది. ఆవు నెయ్యి మేధస్సును వృద్ధి చేస్తుంది.

2. ఆవు నెయ్యితో హోమం చేయడం వలన వాతావరణంలో ఉన్న క్రిములు చనిపోతాయి. పర్యావరణ పరిరక్షణలో గోవుపాత్ర ఎంతో ఉంది.

3. గోవుని ప్రతి నిత్యం పూజించటం వలన అష్టైశ్వర్యాలు సిద్ధిస్తాయి. గోవు వృష్ట భాగంలో బ్రహ్మ, మెడలో విష్ణువు ముఖాన శివుడు, రోమరోమాన మహర్షులు, దేవతలు నివశిస్తారు.

4. అంతేకాక ఆవుపేడలో అష్టలక్ష్ములు కొలువుంటాయి. ఆవు పాలు తల్లి పాల కన్నా శ్రేష్టమైనవి. ఇవి పలచగా ఉండి కొవ్వు తక్కువుగా ఉండటం వలన శరీర బరువుని నియంత్రిస్తాయి.

5. ఉదర సంబంధమైన జబ్బులను తగ్గించడంలో ఈ పాలు ప్రముఖ పాత్ర వహిస్తాయి. ఆవు పాలలో విటమిన్ ఎ పుష్కలంగా ఉంటుంది. అంతేకాకుండా దీనిలో కెఫిన్ అనే ఎంజైము ఉండటం వలన పాలు పసుపు రంగులో ఉంటాయి. ఈ ఆవు పాలను ప్రతి రోజు తాగడం వలన వృద్ధాప్య ఛాయలు దరిచేరవు.

Cow ( Gomatha / AAVU )





Cow (Cattle) was one of the first few species domesticated by humans (or evoluting modern humans) after dogs and horses. Few civilizations like Aryans and Indian were so much dependent on cattle over a period of time that they started worshipping them like mother and Goddess.

The designation of mother was given because of her ability to give milk which was suitable for human consumption. Milk and its products then became one of the base material for almost all Indian food and sweets, which we still have.

Apart from milk different benefits of keeping cows with you are:

  • Drought animal power from bulls and bullocks. For centuaries they were main source of animal power in Indian agriculture (maybe in other parts of world too). They were also used as a means of transportation in form of bullock carts (slower than horses).
  • Cattle dung as manure for agriculture systems. Before industrialization the main source of manure for agriculture was cattle dung, whcih was decomposed in specific ways by Indians and used in their fields. Still the modern concept of Organic farming promotes this way which was earlier used in all Indian subcontinent.
  • Medicinal and Pesticidal properties of cow urine. In Ayurveda (An Indian system of healing) there are many uses of cow urine. Cow urine can be fermented with some herbs like Neem and Mahua to make effective pesticide for agriculture.
  • Worshipped on certain occasions. There are certain celebrations in India when people worship the cow.
  • Religion and Recreation. Some priests recommend people to worship and feed cattle in order to get rid of some sins of your past or present birth.

Amway How to Generate Income








Health Blog




https://goodhealthstrongwealth.blogspot.com