H2 Documentation

Total Page:16

File Type:pdf, Size:1020Kb

H2 Documentation H2 Database Engine Version 1.0.78 (2008-08-28) 1 of 143 Table of Contents H2 Database Engine.............................................................................................................................................................1 Quickstart .........................................................................................................................................................................11 Embedding H2 in an Application ....................................................................................................................................11 The H2 Console Application ..........................................................................................................................................11 Step-by-Step ..........................................................................................................................................................11 Installation ........................................................................................................................................................11 Start the Console ...............................................................................................................................................11 Login ................................................................................................................................................................12 Sample .............................................................................................................................................................13 Execute .............................................................................................................................................................14 Disconnect ........................................................................................................................................................15 End ..................................................................................................................................................................15 Installation ........................................................................................................................................................................16 Requirements ..............................................................................................................................................................16 Supported Platforms .....................................................................................................................................................16 Installing the Software .................................................................................................................................................16 Directory Structure .......................................................................................................................................................16 Tutorial .............................................................................................................................................................................17 Starting and Using the H2 Console ................................................................................................................................17 Firewall ..................................................................................................................................................................17 Native Version ........................................................................................................................................................18 Testing Java ...........................................................................................................................................................18 Error Message 'Port is in use' ...................................................................................................................................18 Using another Port ..................................................................................................................................................18 Starting Successfully ...............................................................................................................................................18 Connecting to the Server using a Browser ................................................................................................................18 Multiple Concurrent Sessions ...................................................................................................................................18 Application Properties .............................................................................................................................................18 Login .....................................................................................................................................................................19 Error Messages .......................................................................................................................................................19 Adding Database Drivers .........................................................................................................................................19 Using the Application ..............................................................................................................................................19 Inserting Table Names or Column Names .................................................................................................................19 Disconnecting and Stopping the Application ..............................................................................................................19 Connecting to a Database using JDBC ...........................................................................................................................19 Creating New Databases ...............................................................................................................................................20 Using the Server ..........................................................................................................................................................20 Starting the Server from Command Line ...................................................................................................................20 Connecting to the TCP Server ..................................................................................................................................20 Starting the Server within an Application ..................................................................................................................20 Stopping a TCP Server from Another Process ............................................................................................................21 Using Hibernate ...........................................................................................................................................................21 Using Databases in Web Applications ............................................................................................................................21 Embedded Mode .....................................................................................................................................................21 Server Mode ...........................................................................................................................................................21 Using a Servlet Listener to Start and Stop a Database ...............................................................................................21 CSV (Comma Separated Values) Support .......................................................................................................................22 Writing a CSV File from Within a Database ...............................................................................................................22 Reading a CSV File from Within a Database ..............................................................................................................22 Writing a CSV File from a Java Application ................................................................................................................22 Reading a CSV File from a Java Application ..............................................................................................................23 Upgrade, Backup, and Restore ......................................................................................................................................23 Database Upgrade ..................................................................................................................................................23 Backup using the Script Tool ...................................................................................................................................23 Restore from a Script ..............................................................................................................................................23 Online Backup ........................................................................................................................................................23 Command Line Tools ....................................................................................................................................................24 Using OpenOffice Base .................................................................................................................................................24
Recommended publications
  • Create Table Identity Primary Key Sql Server
    Create Table Identity Primary Key Sql Server Maurits foozle her Novokuznetsk sleeplessly, Johannine and preludial. High-principled and consonantal Keil often stroke triboluminescentsome proletarianization or spotlight nor'-east plop. or volunteer jealously. Foul-spoken Fabio always outstrips his kursaals if Davidson is There arise two ways to create tables in your Microsoft SQL database. Microsoft SQL Server has built-in an identity column fields which. An identity column contains a known numeric input for a row now the table. SOLVED Can select remove Identity from a primary case with. There cannot create table created on every case, primary key creates the server identity column if the current sql? As I today to refute these records into a U-SQL table review I am create a U-SQL database. Clustering option requires separate table created sequence generator always use sql server tables have to the key. This key creates the primary keys per the approach is. We love create Auto increment columns in oracle by using IDENTITY. PostgreSQL Identity Column PostgreSQL Tutorial. Oracle Identity Column A self-by-self Guide with Examples. Constraints that table created several keys means you can promote a primary. Not logged in Talk Contributions Create account already in. Primary keys are created, request was already creates a low due to do not complete this. IDENTITYNOT NULLPRIMARY KEY Identity Sequence. How weak I Reseed a SQL Server identity column TechRepublic. Hi You can use one query eg Hide Copy Code Create table tblEmplooyee Recordid bigint Primary key identity. SQL CREATE TABLE Statement Tutorial Republic. Hcl will assume we need be simplified to get the primary key multiple related two dissimilar objects or adding it separates structure is involved before you create identity? When the identity column is part of physician primary key SQL Server.
    [Show full text]
  • Keys Are, As Their Name Suggests, a Key Part of a Relational Database
    The key is defined as the column or attribute of the database table. For example if a table has id, name and address as the column names then each one is known as the key for that table. We can also say that the table has 3 keys as id, name and address. The keys are also used to identify each record in the database table . Primary Key:- • Every database table should have one or more columns designated as the primary key . The value this key holds should be unique for each record in the database. For example, assume we have a table called Employees (SSN- social security No) that contains personnel information for every employee in our firm. We’ need to select an appropriate primary key that would uniquely identify each employee. Primary Key • The primary key must contain unique values, must never be null and uniquely identify each record in the table. • As an example, a student id might be a primary key in a student table, a department code in a table of all departments in an organisation. Unique Key • The UNIQUE constraint uniquely identifies each record in a database table. • Allows Null value. But only one Null value. • A table can have more than one UNIQUE Key Column[s] • A table can have multiple unique keys Differences between Primary Key and Unique Key: • Primary Key 1. A primary key cannot allow null (a primary key cannot be defined on columns that allow nulls). 2. Each table can have only one primary key. • Unique Key 1. A unique key can allow null (a unique key can be defined on columns that allow nulls.) 2.
    [Show full text]
  • Rfgen Users Guide
    DataMax Software Group Inc. 1101 Investment Blvd. El Dorado Hills, CA 95762 USA RFgen Users Guide All Editions RFgen 5.2 © 2021 RFgen Software. A division of DataMAX Software Group, Inc. All Rights Reserved. RFgen 5.2 Users Guide Table of Contents Introduction to RFgen 1 Connection Tab 33 Basic Implementation Steps 2 Connection Tab - SAP 33 Configuration Overview 3 SAP Data Encryption 34 Configurations Shared by Dev Studio To Configure for JDE 35 and Services Console: 3 Adding A New Web Services Connection 40 Connections Shared by Dev Studio Configuring the Host Connection 42 and Services Console: 4 Configuring User Access Control 45 Configurations Available Only in Dev Studio 4 Adding or Removing RFgen Admin- istrators / RFgen SubAdmins 46 Connections Available Only in Dev Studio 4 Dev Studio Configuration Options 47 Configuring the RFgen Application Data- Configuring Menu and Key Settings 48 base 4 System Menu Configuration 48 Configuring Application Preferences 7 Function Key Actions 49 Configuring Application Services 10 Configuring the Scripting Environment 50 Configuring Environment Settings 14 Configuring Source Control Options 52 Configure System Environment 14 Configuring System Properties 54 Configuring Transaction Management DB Connection 19 Download Enterprise Objects 54 Create Application Event Database 19 Downloading ERP Business Functions 55 Configuring System Queues and Tasks 20 Downloading JDE Processing Options 55 Add New Enterprise Connections 22 Viewing Enterprise Objects 57 Adding a New DataSource Connection 22 Viewing
    [Show full text]
  • Kyuubi Release 1.3.0 Kent
    Kyuubi Release 1.3.0 Kent Yao Sep 30, 2021 USAGE GUIDE 1 Multi-tenancy 3 2 Ease of Use 5 3 Run Anywhere 7 4 High Performance 9 5 Authentication & Authorization 11 6 High Availability 13 6.1 Quick Start................................................ 13 6.2 Deploying Kyuubi............................................ 47 6.3 Kyuubi Security Overview........................................ 76 6.4 Client Documentation.......................................... 80 6.5 Integrations................................................ 82 6.6 Monitoring................................................ 87 6.7 SQL References............................................. 94 6.8 Tools................................................... 98 6.9 Overview................................................. 101 6.10 Develop Tools.............................................. 113 6.11 Community................................................ 120 6.12 Appendixes................................................ 128 i ii Kyuubi, Release 1.3.0 Kyuubi™ is a unified multi-tenant JDBC interface for large-scale data processing and analytics, built on top of Apache Spark™. In general, the complete ecosystem of Kyuubi falls into the hierarchies shown in the above figure, with each layer loosely coupled to the other. For example, you can use Kyuubi, Spark and Apache Iceberg to build and manage Data Lake with pure SQL for both data processing e.g. ETL, and analytics e.g. BI. All workloads can be done on one platform, using one copy of data, with one SQL interface. Kyuubi provides the following features: USAGE GUIDE 1 Kyuubi, Release 1.3.0 2 USAGE GUIDE CHAPTER ONE MULTI-TENANCY Kyuubi supports the end-to-end multi-tenancy, and this is why we want to create this project despite that the Spark Thrift JDBC/ODBC server already exists. 1. Supports multi-client concurrency and authentication 2. Supports one Spark application per account(SPA). 3. Supports QUEUE/NAMESPACE Access Control Lists (ACL) 4.
    [Show full text]
  • 3 Data Definition Language (DDL)
    Database Foundations 6-3 Data Definition Language (DDL) Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Roadmap You are here Data Transaction Introduction to Structured Data Definition Manipulation Control Oracle Query Language Language Language (TCL) Application Language (DDL) (DML) Express (SQL) Restricting Sorting Data Joining Tables Retrieving Data Using Using ORDER Using JOIN Data Using WHERE BY SELECT DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3 Data Definition Language (DDL) Objectives This lesson covers the following objectives: • Identify the steps needed to create database tables • Describe the purpose of the data definition language (DDL) • List the DDL operations needed to build and maintain a database's tables DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4 Data Definition Language (DDL) Database Objects Object Description Table Is the basic unit of storage; consists of rows View Logically represents subsets of data from one or more tables Sequence Generates numeric values Index Improves the performance of some queries Synonym Gives an alternative name to an object DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5 Data Definition Language (DDL) Naming Rules for Tables and Columns Table names and column names must: • Begin with a letter • Be 1–30 characters long • Contain only A–Z, a–z, 0–9, _, $, and # • Not duplicate the name of another object owned by the same user • Not be an Oracle server–reserved word DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6 Data Definition Language (DDL) CREATE TABLE Statement • To issue a CREATE TABLE statement, you must have: – The CREATE TABLE privilege – A storage area CREATE TABLE [schema.]table (column datatype [DEFAULT expr][, ...]); • Specify in the statement: – Table name – Column name, column data type, column size – Integrity constraints (optional) – Default values (optional) DFo 6-3 Copyright © 2015, Oracle and/or its affiliates.
    [Show full text]
  • Analysis Services Best Practices
    presented by Marco Russo [email protected] sqlbi.com sqlbi.com Who am I Latest conferences BI Expert and Consultant PASS Europe 2009 – Neuss – Germany Problem Solving Complex Project Assistance PASS 2009 – Seattle – USA DataWarehouse Assesments and Development SQL Conference 2010 – Milan – Italy Courses, Trainings and Workshops Teched 2010 – New Orleans – USA Microsoft Business Intelligence Partner Book Writer 24 Hours of PASS 2010 – Online PASS 2010 – Seattle – USA sqlbi.com Agenda DATA SOURCE (RELATIONAL MODELING) Relational Schema Decoupling Layer Dimensional Patterns Slowly Changing Dimensions Junk Dimensions Parent-Child Hierarchies Role Dimensions Drill-through Calculation Dimensions sqlbi.com sqlbi.com 1 CONFIGURATION Source OLTP DB SQLBI Methodology Relational Schema SNOWFLAKE SCHEMA Analysis Services reads data Mirror OLTP from Data Mart A Data Mart is not the Data Staging Area Warehouse ODS Data Warehouse Operational Data Store Data Marts OLAP Cubes Custom Reports Client Tools Other Systems Excel, Proclarity, … Customers Relational Schema Relational Schema STAR SCHEMA STAR VS. SNOWFLAKE SCHEMA Options for dimensions from snowflake schema: Transform into a star schema by using views Transform into a star schema by using DWV queries Join tables in SSAS dimensions Referenced Dimension Ideal solution Use SQL views to generate a star schema The star schema eliminates ambiguity Data Source Decoupling USE VIEWS TO DECOUPLE DIFFERENT LAYERS OF A BI SOLUTION DATA SOURCE (RELATIONAL MODELING) OLTP OLTP Mirror
    [Show full text]
  • Database Concepts Page 1 of 5
    Article :: Design Your Database :: Database Concepts Page 1 of 5 Home > Support > Articles > Design Your Database Adobe acquired InterAKT Database Concepts [ May 15, 2005 ] Table 1. Introduction 2. Database Concepts A table is a data grid used to store similar information. It 3. Plan Your Database is made up of columns (also known as fields), which 4. Relations Between Tables represent entity attributes or pieces of data, and rows, 5. Normalization which represent individual records. All records in a table 6. Best Practices in Database Design share the same fields. In the previous example, a TV set 7. Database Naming Convention and a T-shirt are records in the table that stores products. 8. Databases By Example The price and description of each product represent 9. Useful Resources columns in this table. Usually, databases have more tables, each corresponding to one of the objects you are trying to represent. Relation In a database, tables are usually related in a logical way. A link between two tables is called a relation. A relation always involves two tables and one column from each. Linking tables is very important for avoiding data redundancy and for better organizing your database. Suppose the TV set product mentioned earlier was manufactured by a company called ACME, and you also store a CD player produced by ACME. If there were not separate tables for products and manufacturers, you would need to store the same manufacturer twice in your database, once for each product. This not only takes up a lot of disk space, but maintaining several copies of the same data can make updates very difficult.
    [Show full text]
  • Performance Evaluation of Relational Embedded Databases: an Empirical
    Performance evaluation of relational Check for updates embedded databases: an empirical study Evaluación del rendimiento de bases de datos embebida: un estudio empírico Author: ABSTRACT 1 Hassan B. Hassan Introduction: With the rapid deployment of embedded databases Qusay I. Sarhan2 across a wide range of embedded devices such as mobile devices, Internet of Things (IoT) devices, etc., the amount of data generat- ed by such devices is also growing increasingly. For this reason, the SCIENTIFIC RESEARCH performance is considered as a crucial criterion in the process of selecting the most suitable embedded database management system How to cite this paper: to be used to store/retrieve data of these devices. Currently, many Hassan, B. H., and Sarhan, Q. I., Performance embedded databases are available to be utilized in this context. Ma- evaluation of relational embedded databases: an empirical study, Kurdistan, Irak. Innovaciencia. terials and Methods: In this paper, four popular open-source rela- 2018; 6(1): 1-9. tional embedded databases; namely, H2, HSQLDB, Apache Derby, http://dx.doi.org/10.15649/2346075X.468 and SQLite have been compared experimentally with each other to evaluate their operational performance in terms of creating data- Reception date: base tables, retrieving data, inserting data, updating data, deleting Received: 22 September 2018 Accepted: 10 December 2018 data. Results and Discussion: The experimental results of this Published: 28 December 2018 paper have been illustrated in Table 4. Conclusions: The experi- mental results and analysis showed that HSQLDB outperformed other databases in most evaluation scenarios. Keywords: Embedded devices, Embedded databases, Performance evaluation, Database operational performance, Test methodology.
    [Show full text]
  • Preview H2 Database Tutorial
    About the Tutorial H2 is an open-source lightweight Java database. It can be embedded in Java applications or run in the client-server mode. H2 database can be configured to run as in-memory database, which means that data will not persist on the disk. In this brief tutorial, we will look closely at the various features of H2 and its commands, one of the best open-source, multi-model, next generation SQL product. Audience This tutorial is designed for all those software professionals who would like to learn how to use H2 database in simple and easy steps. This tutorial will give you a good overall understanding on the basic concepts of H2 database. Prerequisites H2 database primarily deals with relational data. Hence, you should first of all have a good understanding of the concepts of databases in general, especially RDBMS concepts, before going ahead with this tutorial. Disclaimer & Copyright Copyright 2016 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial.
    [Show full text]
  • Relational Data Model and SQL Data Definition Language
    The Relational Data Model and SQL Data Definition Language Paul Fodor CSE316: Fundamentals of Software Development Stony Brook University http://www.cs.stonybrook.edu/~cse316 1 The Relational Data Model A particular way of structuring data (using relations) proposed in 1970 by E. F. Codd Mathematically based Expressions ( queries) can be analyzed by DBMS and transformed to equivalent expressions automatically (query optimization) Optimizers have limits (=> the programmer still needs to know how queries are evaluated and optimized) 2 (c) Pearson Education Inc. and Paul Fodor (CS Stony Brook) Relational Databases In Relational DBs, the data is stored in tables Attributes (column Relation name: Student headers) Id Name Address Status 1111 John 123 Main fresh Tuples 2222 Mary 321 Oak (rows) 1234 Bob 444 Pine 9999 Joan 777 Grand senior 3 (c) Pearson Education Inc. and Paul Fodor (CS Stony Brook) Table Set of rows (no duplicates) Each row/tuple describes a different entity Each column/attribute states a particular fact about each entity Each column has an associated domain Id Name Address Status 1111 John 123 Main fresh 2222 Mary 321 Oak 1234 Bob 444 Pine 9999 Joan 777 Grand senior Domain of Id: integers Domain of Name: strings 4 Domain of(c) PearsonStatus Education= Inc.{fresh, and Paul Fodor soph, (CS Stony junior,Brook) senior} Relation A relation is the mathematical entity corresponding to a table: A relation R can be thought of as predicate R A tuple (x,y,z) is in the relation R iff R(x,y,z) is true Why Relations/Tables? Very simple model.
    [Show full text]
  • Java and RDBMS Married with Issues Database Constraints Speaker
    Java and RDBMS Married with issues Database constraints Speaker Jeroen van Schagen Situation store Java Relational Application Database retrieve JDBC JDBC • Java Database Connectivity • Data Access API ( java.sql, javax.sql ) • JDK 1.1 (1997) • Relational Database • Many implementations Connection connection = …; Statement statement = connection.createStatement(); String sql = “INSERT INTO user (name) VALUES (‘Jan’)”; statement.executeUpdate(sql); Connection connection = …; Statement statement = connection.createStatement(); String sql = “INSERT INTO user (name) VALUES (‘Jan’)”; statement.executeUpdate(sql); Database Maintain data User name : varchar(3) NOT-NULL, UNIQUE Name can only have up to 3 characters Name is required Name can only occur once Constraint types Not null Check Unique key Length Type Foreign key Primary key User name : varchar(3) NOT-NULL, UNIQUE Connection connection = …; Statement statement = connection.createStatement(); String sql = “INSERT INTO user (name) VALUES (‘Jan’)”; statement.executeUpdate(sql); What happens? Assuming the user table is empty User name : varchar(3) NOT-NULL, UNIQUE Connection connection = …; Statement statement = connection.createStatement(); String sql = “INSERT INTO user (name) VALUES (‘Jan’)”; statement.executeUpdate(sql); 1 row updated User name : varchar(3) NOT-NULL, UNIQUE Connection connection = …; Statement statement = connection.createStatement(); String sql = “INSERT INTO user (name) VALUES (‘Jan’)”; statement.executeUpdate(sql); statement.executeUpdate(sql); WhatWhat will happens?
    [Show full text]
  • Dynamic Information with IBM Infosphere Data Replication CDC
    Front cover IBM® Information Management Software Smarter Business Dynamic Information with IBM InfoSphere Data Replication CDC Log-based for real-time high volume replication and scalability High throughput replication with integrity and consistency Programming-free data integration Chuck Ballard Alec Beaton Mark Ketchie Anzar Noor Frank Ketelaars Judy Parkes Deepak Rangarao Bill Shubin Wim Van Tichelen ibm.com/redbooks International Technical Support Organization Smarter Business: Dynamic Information with IBM InfoSphere Data Replication CDC March 2012 SG24-7941-00 Note: Before using this information and the product it supports, read the information in “Notices” on page ix. First Edition (March 2012) This edition applies to Version 6.5 of IBM InfoSphere Change Data Capture (product number 5724-U70). © Copyright International Business Machines Corporation 2012. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . ix Trademarks . x Preface . xi The team who wrote this book . xii Now you can become a published author, too! . xvi Comments welcome. xvii Stay connected to IBM Redbooks . xvii Chapter 1. Introduction and overview . 1 1.1 Optimized data integration . 2 1.2 InfoSphere architecture . 4 Chapter 2. InfoSphere CDC: Empowering information management. 9 2.1 The need for dynamic data . 10 2.2 Data delivery methods. 11 2.3 Providing dynamic data with InfoSphere CDC . 12 2.3.1 InfoSphere CDC architectural overview . 14 2.3.2 Reliability and integrity . 16 Chapter 3. Business use cases for InfoSphere CDC . 19 3.1 InfoSphere CDC techniques for transporting changed data .
    [Show full text]