Showing posts with label Oracle 10g. Show all posts
Showing posts with label Oracle 10g. Show all posts

Monday, 19 December 2016

How and Why To Bridge between SQL and NoSQL

SQL have for long now been the synonym of "database" for us. For any sort of data management, SQL had been our instinctive choice. However, the past decade saw the emergence of NoSQL which gave rise to a fierce competition of preferences.
  
What haunts the mind of every aspiring database developer today is the question of choice: To SQL or NoSQL. We want to keep in touch with the latest trends in the technology, but don't want the established technologies to slip away either. However, the most basic point that most people seem to miss is this: SQL and NoSQL are not competitors, and most certainly not antonyms of each other.



SQL or Structured Query Language is the most standard concept of database management systems today. SQL considers data to be stored in the form of tables called Relations, that consist of tuples and attributes. While this concept had been a hugely successful improvement over the data-storage systems present at that time, like flat files, things have changed today.

NoSQL came as a breath of fresh air in an industry that was rapidly changing. The world is going digital, and the digital world is messy. We can never predict the volume, variety or velocity of incoming data. The data, apart from being unpredictable, is also unstructured. Since relational databases are not inherently adept to handle them, something else was required. At the same time, distributed computing is all the rage today, because most businesses are moving towards the cloud. The expansion of relational databases cannot keep up with the pace; thus, NoSQL entered into the scene.


Why to migrate from SQL to NoSQL

Strictly speaking, NoSQL aims to do what SQL cannot. It is not based on relations and it may sometimes even fail to follow the ACID properties! But unlike what you have been taught, ACID properties, though really useful, are not the ultimate necessity. The ultimate necessity is fault tolerance, and NoSQL manages to achieve that anyway.

NoSQL cannot be defined in a single line, as there is no single definition. While all SQL-based databases follow strict guidelines that adhere to SQL-standards, NoSQL gives the databases a free rein. With so many lacks of standards, one might wonder: Are the reasons enough to migrate to NoSQL?

Yes, because we have only touched the crux of the importance of NoSQL in modern world. The two biggest reasons why NoSQL trumps over SQL are agility and scalability.

With the rapid changes that occur daily in the industry, being agile is the only way to survive. However, Relational databases couldn't ever hope to achieve that, with their rigid schemas and complex development. The aforementioned rapid changes are also met by growing size, which require rapid scalability. However, scalability was one aspect that was blatantly ignored in SQL (as it was made in a time when web and internet were non-existent). To cope up with these issues, NoSQL seems like our best bet.


Why to Bridge SQL and NoSQL

"Now that we know how NoSQL differs from SQL, the question arises: Why to bridge them? Why not adopt NoSQL altogether?   "

Simply, because NoSQL doesn't have the same penetration as SQL. A huge number of companies have their entire existing architecture based on relational databases, which would be quite a headache to change. But that doesn't mean that one has to remain stuck with SQL forever. The best option in such scenarios is to bridge the existing SQL framework with a NoSQL database. The benefit? To put it simple, it will bring out "the best of both worlds".

As far the "bridging" goes, there is no one, simple way to do that. The easiest way would be to use third-party drivers like easysoft, which provides ODBC-like bridging capabilities. However, as it comes from a third-party vendor, it might have its own security and licensing issues.

An alternative approach would be to develop languages that could extend SQL functionality to NoSQL databases. One example would be the N1QL, introduced by Couchbase Server, which extends SQL to JSON.

The ways to bridge the gap between these two technologies may differ and evolve; but we can all agree that co-existence of the two is best for the progress of industry.




Please share your thoughts on this topic. If you like this posts, please share it on google by clicking on the Google +1 button.

Read more on NO SQL- NOT ONLY SQL here - WhatisNoSQL

Thursday, 1 December 2016

Oracle’s DYN Acquisition Fits Into Its Goal To Become A Cloud Leader


Last week tech giant Oracle announced that it was acquiring DYN, the popular cDNS provider, for an unspecified amount. Some reports have said that it could be in the region of $600-700 million.

DYN’s cloud-based platform manages and optimises the performance of internet applications and infrastructure by using analytics and intelligent routing. Its Internet performance and Domain Name System (DNS) solution is being used by over 3,500 companies that include top digital brands like Netflix, Twitter and Reddit.  On a daily basis, it handles over 40 billion traffic optimization decisions, making it one of the leading DNS service providers

For Oracle, buying DYN offers an opportunity to challenge the current leaders of cloud computing, Google Cloud.  Oracle currently lags significantly behind these companies in terms of the cloud computing market share, having primarily a portfolio that’s limited to datacentres systems. 


The Enterprises services leader does has a variety of Infrastructure-as-a-Service (IaaS) and Platform-as-a-Service (PaaS) products but adding DYN’s range of scalable services would help Oracle’s customers to get access to cutting edge traffic optimization technologies, filling a gap that might have taken far more time to plug with organic product development.

Oracle has pegged it as a natural extension to its cloud solutions – a service that is the link between hosting data and incoming traffic, resulting in improved metrics for access and user satisfaction for its clients.

This latest acquisition is in keeping with Oracles strategy of buying companies that have noteworthy products in cloud computing – it has in recent times acquired cloud-based applications firm LogFire, cloud access security broker Palerra as well as NetSuite the integrated cloud business software suite.  

If looked at the pattern of these acquisitions, it clearly show the intent of Oracle to move away from its legacy software-led business towards the cloud which in recent times has significantly reshaped how businesses and IT infrastructure are built and run.

It in fact has a stated goal to become the first tech company to reach $10 billion in revenue from cloud business. The NetSuite deal alone is expected to add close to $1 billion in revenue giving a boost to its cloud business.

"With the DYN acquisition, Oracle will be able surely to leapfrog into direct competition with leaders of cloud computing, and make an attempt at taking the leadership position in the market " . 



If you like this post, please share it on google by clicking on the Google +1 button.

Thursday, 20 October 2016

How to Drop Indexes/ Unique Indexes in Oracle?

There can be multiple situations where we don’t require indexes and have to drop them.

  • Sometimes it’s better to drop the indexes when there is not much performance gain for your table with indexes.
  • Once the indexes becomes invalid, you must first drop the indexes before rebuilding it.
  • If your indexes are too fragmented, it’s better to drop the indexes and create a new index since rebuilding an index requires twice the space of the index.

All the extents of the index segment are restored to the containing table
space once you drop the index so that it becomes available to other objects in the table space.

Below is the command to drop indexes:
SYNTAX : DROP INDEX [OWNER.]INDEXNAME [FROM [OWNER.]TABLENAME]
EXAMPLE:
SQL> DROP INDEX EMP_NAME_IDX;
INDEX DROPPED
 SQL>


Conversely, you can't drop any implicitly created index, such as those created by defining a UNIQUE key constraint on a table, with the drop index command. If you try to do so it will throw an error.

SQL> DROP INDEX EMP_NAME_IDX ;
 DROP INDEX EMP_NAME_IDX *
ERROR AT LINE 1: ORA-02429: CANNOT DROP INDEX USED FOR ENFORCEMENT OF UNIQUE/PRIMARY KEY


If you want to drop such an index you have to first drop the constraint defined on the table. In order to drop a constraint, issue the drop constraint command, as shown here:

SQL> ALTER TABLE EMP DROP CONSTRAINT emp_name_PK1;
TABLE ALTERED.
SQL>


You can query the ALL_CONSTRAINTS performance view to understand which constraint the index is used by,


SELECT OWNER, CONSTRAINT_NAME, CONSTRAINT_TYPE,
 TABLE_NAME, INDEX_OWNER, INDEX_NAME
FROM ALL_CONSTRAINTS
WHERE INDEX_NAME = 'EMP_NAME_IDX';





If you like this post, please share it on google by clicking on the Google +1 button.

Please go through similar Oracle Posts @DWHLAUREATE:



Saturday, 1 October 2016

Oracle Indexes Performance and Creation Guidelines

These guidelines will help you create and manage indexes and help improving the performance by correct usage of indexes.

DON’T ADD INDEXES WORTHLESSLY:
Addition of indexes increases performance but also ingest disk space.Based on the performance improvement add as many indexes as required sensibly.

MARK INDEXES AS UNUSABLE OR INVISIBLE RATHER THAN DROPPING
Before dropping an index think over marking the indexes as unusable and invisible. This give us an extra option to check for any performance issues before dropping the index. If there are any performance issues we can revert back by rebuilding or re-enable the index without requiring the data definition language (DDL) creation statement.

You can read more about Invisible Indexes here:

It’s better to drop the indexes that are not used by any database objects as it would free up the physical space and improve the performance.

INDEXING METHODOLOGY:
Indexing the columns that are used in queries executed against a table will help improve the performance.

CREATE PRIMARY /UNIQUE CONSTARINTS:
Build primary constraints on all tables and unique constraints wherever applicable. This will automatically create a B-tree index if the columns are not already indexed.

USING SEPARATE TABLESPACE FOR INDEXES
Using distinct table space helps in managing indexes separately from tables. Table and index data may have different storage and/or backup and recovery requirements.

USE BITMAP INDEXES IN DATAWAREHOUSE ENVIRONMENT
Bitmap indexes are used for complex queries in a data warehouse environment to prevent spending long time to access and retrieve answers for the queries. B-Tree index technique is used for high cardinality column and Bitmap Indexes have predominantly been used for low cardinality columns.

Bitmap indexes achieve important functions in answering data warehouse’s queries because they have capability to perform operations at the index level before fetching data

To learn more about Bitmap & B-tree indexes check our previous post


USE APPROPRIATE NAMING STANDARDS
Correct naming standards would help in the maintenance and troubleshooting easier.



If you like this post, please share it on google by clicking on the Google +1 button.

Please go through similar Oracle Posts @DWHLAUREATE:




Monday, 23 February 2015

READ ONLY TABLES In Oracle 11g


Since Oracle 11g we can place a table in read -only mode with the ALTER TABLE …READ ONLY statement. Read-Only tables are like normal tables, the only dissimilarity being it disallows any attempt to modify the data. Any DML (insert/update/delete/truncate) and certain DDL statement that affects the data are not allowed on these tables.

SYNTAX
ALTER TABLE SALES_TEST READ ONLY;
To Alter a table to read-only mode you must have ALTER ANY TABLE privilege on the table.

If you try to insert a record into this table now,
INSERT INTO SALES_TEST VALUES (100);

Error:
Update operation not allowed on the table.

Even though the table is read –only mode, index creation statement is possible.
CREATE INDEX SALES_TEST_IND ON SALES_TEST (ID);
Index Created.

  • To Revert back the table to READ/WRITE mode.
SYNTAX
ALTER TABLE SALES_TEST READ WRITE;


Prior 11g Read-only mode could only be associated to database and tablespace level. Previously to make a table read-only we have to grant SELECT privilege to appropriate users on the table. But still the table will be available for read and write to the creator of the table. With the new Oracle 11g enhancement no DML will be allowed on the table even by the owner of the table.

  • How To Check A Table Is In Read Only Or Not?
To identify the mode of the table you can use the READ_ONLY column. Its set to YES if table is read only and NO when table is not read-only.

SELECT TABLE_NAME ,READ_ONLY FROM USER_TABLES WHERE TABLE_NAME=’SALES_TEST ‘

The best example for tables which makes sense in read-only mode is the configuration tables that are not to be modified after installation. The same is applicable for tables that store historical or reference data.

Operations like DML, TRUNCATION, DROP, and FLASHBACK are not permitted on READ ONLY TABLE.

Read the most discussed topics of DATAWAREHOUSECONCEPTS- TOP 10 TOPICS OF 2014


  

Sunday, 11 January 2015

DATAWAREHOUSE CONCEPTS- TOP 10 TOPICS OF 2014

This post is just a recap of the most discussed topic in Dwhlaureate for the year 2014.


  1. VIRTUAL COLUMN IN ORACLE 11G 
    Virtual Column is one of the new features introduced in Oracle 11g….. 

  1. OBIEE 11.1.1.7- New Features 
    OBIEE 11.1.1.7 has been released by Oracle and they included more than two hundred enhancements, designed to add new functionality for improved performance and deliver an enhanced end user experience….. 

  1. Hierarchical Retrieval In ORACLE or Hierarchical Queries 
    There is provision to display the reporting pattern in an organization….. 

  1. Invisible Indexes - Oracle 11g New Feature 
    Before 11g, 
    Oracle didn’t have the facility to make an Index Invisible or visible…… 

  1. “ VoltDB ” - NewSQL DBMS For High Velocity Applic... 
    VoltDB is a high performance scalable RDBMS and 
    NewSQL Database primarily for Big Data, high velocity OLTP and Real-time analytics designed by…… 

  1. Introduction To NewSQL 
    NEWSQL is a new class of Databases products that offers high performance and scalability like 
    NoSQL for online transaction processing and also 

  1. What is Massively Parallel Processing (MPP) With the advent of Big Data sets mainstream technologies like Massively Parallel Processing (MPP) systems is experiencing vital growth…. 
  1. Oracle Database 12C New Feature-Fetch& Offset 
    In this post we will discuss about a new feature that was introduced in 
    Oracle 12c to limit the rows returned in an easier and effective manner compared to methods …. 

  2. How to Unlock the Locked Table in ORACLE 
    Oracle puts locks while performing any DDL or DML operation on oracle tables. When table locks is present on any tables in Oracle we cannot run DDL on those tables. 

  1. Informatica Scenario: How to Load Data in Cyclic Order 
    In this 
    scenario we will load the records present in the DEP table to Flat files in a cyclic order such that the first record will go to TargetFile01 ,2nd to TargetFile 02 ,3rd to Target File03 and 4th record again to TargetFile01. 



    If you like this post, please share it on google by clicking on the Google +1 button.

    Please go through our latest post TOP 6 BIG DATA TRENDS IN THE NEAR FUTURE

Thursday, 21 August 2014

How To Add Auto Increment In Oracle- IDENTITY column in Oracle 12c

Lets create employee table for this purpose.
SQL> CREATE TABLE EMP01
(
EMPID NUMBER,
NAME VARCHAR2(50),
DEPT VARCHAR2(20)
);

Next steps is to create oracle sequence to generated the id values.
SQL> CREATE SEQUENCE EMPID_SEQUENCE
START WITH 1
INCREMENT BY 1;

Next Step is to create Trigger to assign the values from sequence to EMPID column.

CREATE OR REPLACE TRIGGER EMPID_TRIGGER
BEFORE INSERT ON EMP01
FOR EACH ROW
BEGIN
SELECT EMPID_SEQUENCE.nextval INTO :NEW. EMPID  FROM dual;
END;
/
Now we will try insertng few values:

SQL> INSERT INTO EMP01 (NAME, DEPT) VALUES ('RON',’ABC’);
1 row created.
SQL> INSERT INTO EMP01 (NAME, DEPT) VALUES ('VICTORIA',’XYZ’);
SQL> SELECT * FROM EMP01;
EMPID NAME DEPT
---------- ------------------------------
1 RON ABC
2 VICTORIA XYZ


You can find that the EMPID getting incremented by 1.
Now there is a new feature available in on Oracle 12c version:IDENTITY column using which we can implement the same auto increment feature.

Tuesday, 15 July 2014

How to Unlock the Locked Table in ORACLE


Oracle puts locks while performing any DDL or DML operation on oracle tables.When table locks is present on any tables in Oracle we cannot run DDL on those tables.

Some of the locks automatically set by oracle are RS and RX Locks.
SELECT … FOR UPDATE execution results in RS (row share) table lock. When you execute an INSERT, UPDATE or DELETE Oracle puts RX (row exclusive) table lock.

We have to kill the session which holds the lock in order to execute further operations. Follow the below steps to kill the session and forcibly unlock the table.

Let’s assume that 'EMP' table is locked,

Sunday, 11 May 2014

Oracle Database 12C New Feature-Fetch& Offset


In this post we will discuss about a new feature that was introduced in Oracle 12c to limit the rows returned in an easier and effective manner compared to methods used in previous releases by using ROWNUM or using Top-N rows or using analytic functions like RANK or DENSE_RANK. Using this Feature  Oracle 12c provides improved support for top-n analysis.
This new Row limiting Clause in Oracle allows us to select the Top N like queries without much effort. Let’s take a look into the syntax now.

SELECT * FROM Table_Name
ORDER BY column_name DESC
[ OFFSET offset { ROW | ROWS } ]
[ FETCH { FIRST | NEXT } [ { rowcount | percent PERCENT } ]


{ ROW | ROWS } { ONLY | WITH TIES } ]

Features of The New Row limiting Clause In Oracle

Fetch Clause is to limit the number of rows returned in the result set. Fetch Keyword is followed by FIRST or NEXT which can be used interchangeably and is for semantic clarity only. Fetch clause can specify the number of rows or a percentage of rows to return which we will see by using some examples.  

Tuesday, 15 April 2014

Update and Delete in Correlated Sub query

Correlated sub queries as you all know are used for row-by-row processing. Here each sub query is executed once for every row of the outer query. The oracle server performs a correlated subquery when the subquery references a column from a table referred to in the parent statement. 

The general for of a correlated subquery is:
select column1, column2, . . . . . . .
from table1 outer
where [column1] operator (select column1, column2,
from table2 where expr1= outer.expr2);

To read more about Sub queries please refer our previous post

Now will see how to use correlated update and delete statements 

Wednesday, 5 February 2014

View and Base Tables (Dropping of View)


What is a View?
A view is a logical table based on one or more tables or another view.View can be thought as a virtual table which takes the output of a query and stores it.

Syntax:
create [or replace] [force|noforce] view
<view_name> [column_alias_names_separated_commas]
as <subquery>[with [check option] [constraint constraint_name] [with read only]];


Thursday, 12 December 2013

AUTOCOMMIT in SQL- Simple and Useful

DML Statements or Data Manipulation Language statements will not be committed unless they are committed explicitly, But if you use any data definition language (DDL) statement before or after , then Oracle Database issues an implicit COMMIT.

There is a provision in Oracle to commit every DML Transaction automatically once its run. This is called AUTOCOMMIT. We can also turn AUTOCOMMIT on and off based on our requirement.

Below are commands to check for AUTOCOMMIT.

Tuesday, 20 November 2012

Java Containers in Oracle 10g and 11g

In Oracle Application Server 10g, Java applications ran in instances of Oracle Containers for Java. In the current release, they run in instances of WebLogic. Oracle Directory Services Manager and Oracle Directory Integration Platform are Java components that run in WebLogic managed servers.
Related Posts Plugin for WordPress, Blogger...

ShareThis