Apache Phoenix and SQL

You can use the Apache Phoenix SQL commands to create, drop, or modify an Apache HBase table. You can also create Apache Phoenix views that are virtual tables that share the same Apache HBase table.

The Apache Phoenix commands enable you to use standard SQL data definition language (DDL) and data manipulation language (DML) commands to interact with Apache HBase tables. You can create a new Apache HBase table using the standard CREATE TABLE SQL command or create a view on an existing Apache HBase table using the VIEW command. View enables you to have multiple virtual tables that share the same physical Apache HBase table.

Apache HBase tables and Apache Phoenix tables have a one-to-one relationship. This means each Apache HBase table is associated with a corresponding Apache Phoenix table.

Using Apache Phoenix commands you can do the following tasks:

  • Create or alter Apache HBase tables using DDL commands like CREATE TABLE

  • Modify contents in an Apache HBase table using DML commands like UPSERT VALUES