
HyperSQL User Guide HyperSQL Database Engine, aka HSQLDB Edited by The HSQL Development Group, Blaine Simpson, and Fred Toussi HyperSQL User Guide: HyperSQL Database Engine, aka HSQLDB by The HSQL Development Group, Blaine Simpson, and Fred Toussi $Revision: 3601 $ Published $Date: 2010-05-31 20:17:47 -0400 (Mon, 31 May 2010) $ Copyright 2002-2010 The HSQL Development Group. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license. Table of Contents Preface ......................................................................................................................................... xii Available formats for this document .......................................................................................... xii 1. Running and Using HyperSQL ....................................................................................................... 1 The HSQLDB Jar .................................................................................................................... 1 Running Database Access Tools ................................................................................................. 1 A HyperSQL Database .............................................................................................................. 2 In-Process Access to Database Catalogs ....................................................................................... 2 Listener / Server Modes ............................................................................................................ 3 HyperSQL HSQL Server ................................................................................................... 4 HyperSQL HTTP Server ................................................................................................... 4 HyperSQL HTTP Servlet ................................................................................................... 4 Connecting to a Database Server ......................................................................................... 4 Security Considerations ..................................................................................................... 5 Using Multiple Databases .................................................................................................. 5 Accessing the Data ................................................................................................................... 5 Closing the Database ................................................................................................................ 6 Creating a New Database .......................................................................................................... 7 2. SQL Language ............................................................................................................................. 8 Standards Support .................................................................................................................... 8 SQL Data and Tables ............................................................................................................... 8 Temporary Tables ............................................................................................................ 9 Persistent Tables .............................................................................................................. 9 Lob Data ........................................................................................................................ 9 Basic Types and Operations ..................................................................................................... 10 Numeric Types .............................................................................................................. 10 Boolean Type ................................................................................................................ 12 Character String Types .................................................................................................... 12 Binary String Types ........................................................................................................ 13 Bit String Types ............................................................................................................. 14 Storage and Handling of Java Objects ................................................................................ 14 Type Length, Precision and Scale ...................................................................................... 15 Datetime types ....................................................................................................................... 15 Interval Types ........................................................................................................................ 18 Arrays .................................................................................................................................. 21 Array Definition ............................................................................................................. 22 Array Reference ............................................................................................................. 22 Array Operations ............................................................................................................ 23 Indexes and Query Speed ......................................................................................................... 24 Query Processing and Optimisation ........................................................................................... 25 3. Sessions and Transactions ............................................................................................................ 27 Overview .............................................................................................................................. 27 Session Attributes and Variables ............................................................................................... 27 Session Attributes ........................................................................................................... 28 Session Variables ........................................................................................................... 28 Session Tables ............................................................................................................... 28 Transactions and Concurrency Control ....................................................................................... 29 Two Phase Locking ........................................................................................................ 29 Two Phase Locking with Snapshot Isolation ........................................................................ 29 Lock Contention in 2PL .................................................................................................. 30 MVCC ......................................................................................................................... 30 Choosing the Transaction Model ....................................................................................... 31 iv HyperSQL User Guide Schema and Database Change ........................................................................................... 31 Simultaneous Access to Tables ......................................................................................... 32 Session and Transaction Control Statements ................................................................................ 32 4. Schemas and Database Objects ...................................................................................................... 38 Overview .............................................................................................................................. 38 Schemas and Schema Objects ................................................................................................... 38 Names and References .................................................................................................... 39 Character Sets ................................................................................................................ 39 Collations ...................................................................................................................... 40 Distinct Types ................................................................................................................ 40 Domains ....................................................................................................................... 40 Number Sequences ......................................................................................................... 40 Tables .......................................................................................................................... 42 Views ........................................................................................................................... 42 Constraints .................................................................................................................... 42 Assertions ..................................................................................................................... 43 Triggers ........................................................................................................................ 43 Routines ....................................................................................................................... 43 Indexes ........................................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages239 Page
-
File Size-