Sunday, December 21, 2014
Riak - Overview
Riak - an Open Source, Distributed Database - Overview
Riak:- Riak was announced on August 17, 2009 by Basho Technologies. It is written in Earlang and supports Linux,BSD,Mac OS X, Solaris operating system. Its recent stable version is 2.0.0 which has been released on September 2 andcurrently it is under devlopment.Riak is used by thousands of companies worldwide, including 25% of the Fortune 50.In addition to the open-source version, it comes in a supported enterprise version and a cloud storage version that is ideal for cloud computing environments.
Features
- Queries
Riak provides a straightforward REST-full API through HTTP and Protocol Buffers for basic, PUT, GET, POST, and DELETE functions.
- Predictable latency
Riak can provide excellent latency profile and evenly distributes data across nodes with consistent hashing.
- Fault-tolerant availability
Riak replicates key/value stores across a cluster of nodes so that in the case of node outages due to network partition or hardware failures, data can still be written to a neighboring node beyond the initial three, and read-back due to its "masterless" peer-to-peer architecture.
- Multi-datacenter replication
In this one cluster acts as a "primary cluster." The primary cluster handles replication requests from one or more "secondary clusters". It helps to maximize performance and network utilization.
- Tunable Consistency
Each bucket can be set to be either eventually consistent (to provide high availability) or strongly consistent.
Advantages
Ø It offers extremely high availability.
Ø Fault tolerance
Ø Operational simplicity
Saturday, November 22, 2014
Two Phase Commit Protocol in Animation
Two Phase Commit protocol animated / Animation of Two Phase Commit protocol
Two Phase Commit protocol is used to ensure atomicity of transactions in Distributed database system. Using this, we can perform a consistent transactions which lead to consistent database.
Important links - Two Phase Commit protocol - in text
in Pictures
Developed by: Mr. Nilesh Kesharwani, and Ms. Sushmita Kumari
Thursday, November 20, 2014
ORDBMS Structured Types
Define Structured Types / Overview of Structured Types / What is Abstract Datatype? / How to define Structured types or Abstract datatypes? / Structured type (Abstract datatype) definition in Oracle with example.
Structured Types
The major advantage of using objects is the ability to define new data types (Abstract Data Types). In ORDBMS, the RDBMS extends the usage of objects that can be defined and stored as part of database. Like a CLASS declaration in C++ language, a new type can be defined in an ORDBMS as follows; (the reserved words/keywords are given in UPPERCASE hereafter)
CREATE TYPE type_name AS
(Attribute1_name data_type(size),
Attribute2_name data_type(size),
Attribute3_name data_type(size),
…….
AttributeN_name data+_type(size));
Here, data_type can be any of the following;
- It can be one of the valid data types like CHAR, VARCHAR, NUMBER, INTEGER, etc. Or
- It can be another User Defined Type.
We call this kind of new User Defined Types as Structured Types / Abstract Datatypes.
For example, Structured types can be declared and used in SQL:1999 as follows;
CREATE TYPE phone AS
(Country_code NUMBER(4),
STD_Code NUMBER(5),
Phone_Number NUMBER(10))
This type can be used in other TYPE definition or TABLE definition as follows;
CREATE TABLE contact
(Contact_name VARCHAR(25),
Street VARCHAR(25),
City VARCHAR(25),
Ph PHONE);
In this TABLE definition, PHONE is the structured type that we have defined through previous example.
Structured Types in Oracle
Let us see some examples of defining and manipulating Structured types in Oracle.
CREATE TYPE Address AS OBJECT
(Street VARCHAR(35),
City VARCHAR(30),
State VARCHAR(30),
Pincode NUMBER(10));
Execution of the above statement will create a new ABSTRACT datatype named ADDRESS and store the definition as part of the database.
This new type can be used to define an attribute in any TABLEs or TYPEs as follows;
CREATE TABLE Person
(Person_name VARCHAR(25),
Addr ADDRESS,
Phone NUMBER(10));
This table Person will consist of 3 columns where the first one and the third one are of regular datatypes VARCHAR, and NUMBER respectively, and the second one is of the abstract type ADDRESS. The table PERSON will look like as follows;
Person_name | Addr | Phone | |||
Street | City | State | Pincode | ||
Table 1 – Person table
Subscribe to:
Posts (Atom)