Exasolution User Manual
Total Page:16
File Type:pdf, Size:1020Kb
The most powerful engine for your analytics! EXASolution User Manual Version 5.0.12 Copyright © 2015 EXASOL AG. All rights reserved. The information in this publication is subject to change without notice. EXASOL SHALL NOT BE HELD LIABLE FOR TECHNICAL OR EDITORIAL ERRORS OR OMISSIONS CONTAINED HEREIN NOR FOR ACCIDENTAL OR CONSEQUENTIAL DAMAGES RES- ULTING FROM THE FURNISHING, PERFORMANCE, OR USE OF. No part of this publication may be photocopied or reproduced in any form without prior written consent from EXASOL. All named trademarks and registered trademarks are the property of their respective owners. EXASolution User Manual Table of Contents Foreword ..................................................................................................................................... ix Conventions ................................................................................................................................. xi Changes in Version 5.0 ................................................................................................................. xiii 1. What is EXASolution? ................................................................................................................. 1 2. SQL reference ............................................................................................................................ 5 2.1. Basic language elements .................................................................................................... 5 2.1.1. Comments in SQL ................................................................................................. 5 2.1.2. SQL identi®er ....................................................................................................... 5 2.1.3. Regular expressions ............................................................................................... 7 2.2. SQL statements .............................................................................................................. 11 2.2.1. De®nition of the database (DDL) ............................................................................ 12 2.2.2. Manipulation of the database (DML) ....................................................................... 33 2.2.3. Access control using SQL (DCL) ............................................................................ 54 2.2.4. Query language (DQL) ......................................................................................... 66 2.2.5. Veri®cation of the data quality ................................................................................ 76 2.2.6. Other statements .................................................................................................. 81 2.3. Data types ..................................................................................................................... 94 2.3.1. Overview of EXASolution data types ....................................................................... 95 2.3.2. Data type details .................................................................................................. 95 2.3.3. Data type aliases .................................................................................................. 98 2.3.4. Type conversion rules ........................................................................................... 99 2.3.5. Default values .................................................................................................... 101 2.3.6. Identity columns ................................................................................................ 103 2.4. Literals ....................................................................................................................... 104 2.4.1. Numeric literals ................................................................................................. 105 2.4.2. Boolean literals .................................................................................................. 106 2.4.3. Date/Time literals ............................................................................................... 106 2.4.4. Interval literals ................................................................................................... 106 2.4.5. String literals ..................................................................................................... 108 2.4.6. NULL literal ..................................................................................................... 108 2.5. Format models ............................................................................................................. 108 2.5.1. Date/Time format models ..................................................................................... 109 2.5.2. Numeric format models ....................................................................................... 111 2.6. Operators .................................................................................................................... 113 2.6.1. Arithmetic Operators ........................................................................................... 114 2.6.2. Concatenation operator || ...................................................................................... 115 2.6.3. CONNECT BY Operators .................................................................................... 116 2.7. Predicates .................................................................................................................... 116 2.7.1. Introduction ...................................................................................................... 117 2.7.2. List of predicates ................................................................................................ 117 2.8. Built-in functions .......................................................................................................... 122 2.8.1. Scalar functions ................................................................................................. 123 2.8.2. Aggregate functions ............................................................................................ 127 2.8.3. Analytical functions ............................................................................................ 127 2.8.4. Alphabetical list of all functions ............................................................................ 130 2.9. Geospatial data ............................................................................................................. 235 2.9.1. Geospatial objects .............................................................................................. 236 2.9.2. Geospatial functions ........................................................................................... 237 2.10. Skyline ...................................................................................................................... 239 2.10.1. Motivation ....................................................................................................... 240 2.10.2. How Skyline works ........................................................................................... 240 2.10.3. Example ......................................................................................................... 241 2.10.4. Syntax elements ............................................................................................... 241 2.11. UDF scripts ............................................................................................................... 242 2.11.1. What are UDF scripts? ....................................................................................... 243 iii 2.11.2. Introducing examples ........................................................................................ 244 2.11.3. Details for different languages ............................................................................. 247 2.11.4. External Scripts (eUDF) ..................................................................................... 260 2.11.5. Hadoop Integration Service ................................................................................ 264 2.12. Scripting .................................................................................................................... 265 2.12.1. Introduction ..................................................................................................... 266 2.12.2. General script language ...................................................................................... 267 2.12.3. Database interaction .......................................................................................... 274 2.12.4. Libraries ......................................................................................................... 281 2.12.5. System tables ................................................................................................... 288 3. Concepts ................................................................................................................................ 289 3.1. Transaction management ............................................................................................... 289 3.1.1. Basic concept .................................................................................................... 289 3.1.2. Differences to other systems ................................................................................. 290 3.1.3. Recommendations for the user .............................................................................. 290 3.2. Rights