Shop now Shop now Shop now Cloud Drive Photos Shop now Learn More Shop now Shop now Shop Fire Shop Kindle Shop now Shop now
Understanding SQL and Java Together: A Guide to SQLJ, JDB... and over 2 million other books are available for Amazon Kindle . Learn more

Buy Used
Used - Very Good See details
Price: £6.17

or
 
   
Have one to sell? Sell yours here
Start reading Understanding SQL and Java Together on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Understanding Sql and Java Together: A Guide to Sqlj, Jdbc, and Related Technologies (The Morgan Kaufmann Series in Data Management Systems) [Paperback]

Jim Melton , Andrew Eisenberg


Available from these sellers.


‹  Return to Product Overview

Table of Contents

Dedication: PREFACE: SQL and Java-and Why They Matter: Why We Wrote This Book: Who Should Read It: How This Book Is Organized: Examples: Moving Targets: Additional Resources: Relevant Products: Conventions: Acknowledgements: Trademarks: ; 1. Chapter 1 - Introduction: 1.1 Overview of the Book: 1.2 Road Map: 1.3 What is the Problem That Needs Solving?: 1.3.1 Putting Java and Persistent Data Together: 1.3.2 Java and Native Interfaces: 1.3.3 Java Serialization: 1.3.4 Static SQL, Dynamic SQL, and ODBC (SQL/CLI): 1.3.5 JDBC, With and Without ODBC: 1.3.6 SQLJ Specifications and Standards: 1.3.7 Java Blend: 1.3.8 Interfaces to (ODMG-Compliant) OODBMSs: 1.4 Chapter Summary: 2. Chapter 2 - Java for the SQL Programmer: 2.1 Introduction 37: 2.2 The Java Environment 38: 2.3 Control Flow in Java 40: 2.4 Java Data Types 44: 2.4.1 Primitive Data Types 44: 2.4.2 Object Wrappers for the Primitive Data Types 44: 2.4.3 Strings 45: 2.4.4 The BigDecimal Class 46: 2.4.5 Arrays 47: 2.5 Java Classes 47: 2.5.1 Fields, Methods, and Constructors 47: 2.5.2 Method Invocation 50: 2.5.3 Static Fields, Static Methods, and Static Initializers 50: 2.5.4 The main Method 52: 2.5.5 Garbage Collection 53: 2.6 Object Oriented Aspects of Java 53: 2.6.1 Inheritance 54: 2.6.2 The Object Class 55: 2.6.3 Polymorphism 56: 2.6.4 Abstract Classes and Methods 57: 2.6.5 Interfaces 57: 2.7 Exceptions 59: 2.8 Packages 62: 2.9 Serialization and Externalization 63: 2.9.1 Serialization 63: 2.9.1.1 Customizing Serialization 65: 2.9.2 Externalization 65: 2.10 JAR Files 66: 2.11 Other Features of the Java Programming Language 67: 2.12 Chapter Summary: 3. Chapter 3 - SQL for the Java Programmer: 3.1 Introduction 69: 3.2 SQL-What Is It and What's It Good For? 70: 3.2.1 Applications Languages Versus Data Sublanguages 71: 3.2.2 Procedural Versus Nonprocedural Languages 71: 3.2.3 SQL's Background and Focus 72: 3.2.3.1 The Origins of SQL 72: 3.2.3.2 Dialects of SQL 73: 3.2.3.3 Traditional Data 74: 3.2.3.4 Complex Data 74: 3.3 SQL Language Resources 75: 3.4 SQL Examples 75: 3.4.1 Data Retrieval 77: 3.4.2 Data Creation 79: 3.4.3 Updating Data 82: 3.4.4 Removal of Data 83: 3.4.5 More Complex Operations 84: 3.5 Stored Routines 87: 3.6 Why Use SQL Instead of an OODBMS? 89: 3.7 SQL and Java Together 90: 3.8 Object models: SQL and Java 91: 3.9 Data Type Relationships 91: 3.10 Null Values, 3-Valued Logic, and Related Issues 95: 3.11 SQL and Programming Languages 96: 3.11.1 Embedded SQL (and Module Language) 96: 3.11.2 Dynamic SQL 97: 3.11.3 Call-Level Interfaces 99: 3.12 Result Sets 102: 3.13 Data and Metadata-Relationships and Differences 105: 3.14 Chapter Summary: 4. Chapter 4 - JDBC 1.0 API: 4.1 Introduction 107: 4.1.1 Types of JDBC Implementations 108: 4.1.2 JDBC Implementations 110: 4.1.3 SQL Statements 114: 4.1.3.1 Variations among DBMS's 115: 4.1.3.2 JDBC Escape Syntax 115: 4.2 Registering JDBC Drivers 117: 4.3 Connecting to a Database 118: 4.3.1 JDBC URL's 118: 4.3.2 getConnection 118: 4.4 Examining Database Metadata 122: 4.5 Executing an SQL Statement Once 124: 4.5.1 SELECT statements 125: 4.5.1.1 Result Set Metadata 125: 4.5.1.2 Result Set Data 126: 4.5.1.3 The Date, Time, and Timestamp Classes 130: 4.5.2 Positioned Update and Delete Statements 131: 4.5.3 DML and DDL Statements 133: 4.5.4 Unknown Statements and Call Statements 133: 4.5.5 SQL Exception and Warning Conditions 135: 4.6 Executing an SQL Statement Multiple Times 136: 4.7 Executing a Call Statement 138: 4.8 Asynchronous Execution 140: 4.9 JavaSoft JDBC-ODBC Bridge 140: 4.10 Chapter Summary: 5. Chapter 5 - SQLJ Part 0 (Embedding SQL in Java): 5.1 Introduction 143: 5.2 SQLJ - An Informal Group of Companies 144: 5.3 Writing an SQLJ Part 0 Program 145: 5.3.1 A simple SQLJ Part 0 Program 145: 5.3.2 Connection Contexts 147: 5.3.2.1 Connection Context Declaration 149: 5.3.2.2 The Generated Connection Context Class 150: 5.3.2.3 Implicit Connection Contexts 152: 5.3.3 Execution Contexts 152: 5.3.4 Host Variables and Expressions 153: 5.3.4.1 Data Type Issues 155: 5.3.5 Calling Stored Routines 156: 5.3.6 Result Set Iterators 158: 5.3.6.1 Binding to Columns by Name 158: 5.3.6.2 Binding to Columns by Position 161: 5.3.6.3 Positioned Update and Delete Statements 163: 5.3.6.4 Multiple Result Sets 165: 5.3.7 Other SQLJ Part 0 Statements 166: 5.4 SQLJ Part 0/JDBC Interoperability 166: 5.5 Using SQLJ Part 0 Inside a Database 168: 5.6 SQLJ Part 0 Translator 169: 5.6.1 Binary Portability 171: 5.6.2 Customization of an SQLJ Part 0 Application 171: 5.6.3 Execution of your SQLJ Part 0 Application 173: 5.7 Levels of Conformance 175: 5.8 SQLJ Part 0 Reference Implementation 175: 5.9 Products Supporting SQLJ Part 0 175: 5.10 Advantages of SQLJ Part 0 176: 5.11 SQLJ Part 0 Runtime Interfaces and Classes 176: 5.11.1 sqlj.runtime.AsciiStream 177: 5.11.2 sqlj.runtime.BinaryStream 177: 5.11.3 sqlj.runtime.ConnectionContext 177: 5.11.4 sqlj.runtime.ExecutionContext 179: 5.11.5 sqlj.runtime.ForUpdate 182: 5.11.6 sqlj.runtime.NamedIterator 182: 5.11.7 sqlj.runtime.PositionedIterator 182: 5.11.8 sqlj.runtime.ResultSetIterator 183: 5.11.9 sqlj.runtime.StreamWrapper 185: 5.11.10 sqlj.runtime.UnicodeStream 186: 5.11.11 sqlj.runtime.SQLNullException 186: 5.12 SQLJ Part 0 Exceptions 186: 5.13 Chapter Summary: 6. Chapter 6 - SQLJ Part 1 (SQL Routines Using the Java(tm) Programming Language): 6.1 Introduction 189: 6.1.1 Review of SQL/PSM 190: 6.1.1.1 Routine Characteristics 192: 6.2 Installing JAR Files in SQL 194: 6.3 Creating Procedures and Functions 196: 6.3.1 Using a Method in an SQL Function 196: 6.3.1.1 Mappable Data Types 199: 6.3.1.2 Executing SQL Statements 200: 6.3.2 Using a Method in an SQL Procedure 203: 6.3.2.1 Returning Result Sets 205: 6.3.3 Special Treatment for the main Method 206: 6.3.4 Null Values 207: 6.3.5 Static Variables 208: 6.3.6 Privilege Checking 208: 6.3.7 Exceptions 209: 6.4 SQL-Java Paths 209: 6.5 Privileges 211: 6.6 Dropping Java Routines 211: 6.7 Deployment Descriptors 212: 6.8 Operations on JAR Files 213: 6.8.1 Installing JAR Files 213: 6.8.2 Replacing JAR Files 214: 6.8.3 Removing JAR Files 214: 6.9 Optional Features in SQLJ Part 1 215: 6.10 Status Codes 215: 6.11 Products in the Marketplace 216: 6.11.1 Sybase Adaptive Server Anywhere 216: 6.12 The Value Proposition for SQLJ Part 1 217: 6.13 Chapter Summary: 7. Chapter 7 - SQL User-Defined Types: 7.1 Introduction 223: 7.2 User-Defined Types 224: 7.2.1 Evolution of Type Systems 224: 7.2.2 Introducing User-Defined Types 226: 7.3 SQL:1999 User-Defined Types 226: 7.3.1 Distinct Types 226: 7.3.2 Introducing Structured Types 228: 7.4 Structured Types 229: 7.4.1 Major Characteristics 229: 7.4.2 Attributes 230: 7.4.2.1 Data Types 230: 7.4.2.2 Accessing Attributes 231: 7.4.2.3 A Note About Table Names vs Correlation Names 232: 7.4.2.4 Attribute Characteristics 233: 7.4.3 Behaviors and Semantics 236: 7.4.3.1 Encapsulation 237: 7.4.3.2 Methods 237: 7.4.3.3 Functions 243: 7.4.3.4 SQL-Paths 244: 7.4.3.5 Procedures 245: 7.4.3.6 Effects of Null Parameters 245: 7.4.3.7 Polymorphism and Overloading 246: 7.4.4 Creating Instances of Structured Types 248: 7.4.4.1 Instances Are Values 249: 7.4.4.2 A Little Philosophy of Mathematics 249: 7.4.4.3 Constructors and the NEW Expression 250: 7.5 Using Structured Types 252: 7.5.1 Storing In The Database 252: 7.5.2 Updating In The Database 253: 7.5.3 Retrieving From The Database 255: 7.5.4 Deleting From The Database 256: 7.5.5 Copying An Instance From One Site To Another 256: 7.5.6 User-Defined Type Locators 257: 7.5.7 Transforms and Transform Groups 258: 7.5.8 The Type Predicate 260: 7.6 Type Hierarchies 260: 7.6.1 What is a Type Hierarchy? 261: 7.6.2 Subtypes and Supertypes 262: 7.6.3 Single Inheritance 265: 7.6.4 Most Specific Type 265: 7.6.5 Substitutability 266: 7.6.6 Polymorphism and Overloading (Redux) 267: 7.6.6.1 Method Overriding 267: 7.6.6.2 Casting and Comparison 270: 7.7 Typed Tables 273: 7.7.1 Relationship to Structured Types 274: 7.7.2 REF Types and REF Values 275: 7.7.3 Scope 276: 7.7.4 Dereferencing REF Values 276: 7.7.5 Invoking Methods on Rows of Typed Tables 278: 7.7.6 Data Modeling Decisions 278: 7.8 Table Hierarchies 278: 7.8.1 Relationship to Type Hierarchies 278: 7.8.2 Table Hierarchy Model 279: 7.8.3 Syntax Enhancements 280: 7.9 Implementation Issues 281: 7.10 SQL Object Model 282: 7.10.1 Why Does SQL Have an Object Model? 282: 7.10.2 SQL Object Model Summary 283: 7.11 A Java-SQL translation dictionary 286: 7.12 Limitations - technical and economic 287: 7.13 Chapter Summary: 8. Chapter 8 - SQLJ Part 2 (SQL Types Using the Java(tm) Programming Language): 8.1 Introduction 289: 8.2 Associating a Class and a Structured Type 289: 8.2.1 Creating Instances of External Java Datatypes 292: 8.2.1.1 Is it Live or is it Memorex? 293: 8.2.2 Referencing the Fields of External Java Datatypes 294: 8.2.3 Using Java Methods in SQL 294: 8.2.4 Using Java Methods that Modify an Object 296: 8.2.5 Static Methods 298: 8.2.6 Static Fields 299: 8.2.7 Null Values 301: 8.2.8 Ordering 302: 8.2.9 Subtypes 303: 8.2.9.1 Collapsing Subclasses 305: 8.2.10 Extending the Mappable Types 307: 8.3 Deployment Descriptors 309: 8.4 Products in the Marketplace 310: 8.4.1 Sybase Adaptive Server Anywhere 310: 8.4.2 Cloudscape 312: 8.5 Chapter Summary: 9. Chapter 9 - JDBC 2.0 API: 9.1 Introduction 315: 9.2 Scrollable Result Sets 316: 9.2.1 Hints for the JDBC Driver 317: 9.3 Updatable Result Sets 318: 9.4 Result Set Sensitivity 320: 9.5 Execution of Batches 321: 9.6 SQL:1999 Data Types 322: 9.6.1 Blobs and Clobs 323: 9.6.2 Arrays 326: 9.6.3 REF Type 327: 9.6.4 Distinct User-defined Data Types 328: 9.6.5 Structured User-defined Data Types 329: 9.7 Java Objects in the Database 330: 9.8 Customizing SQL Types 331: 9.9 JDBC 2.0 Optional Package API 334: 9.10 Implementation of the JDBC 2.0 API 334: 9.11 Chapter Summary: 10. Chapter 10 - Java Blend: 10.1 Introduction 337: 10.2 Java Blend Architecture 338: 10.3 Mapping Between the Models 340: 10.3.1 Simple Tables 340: 10.3.2 One-to-Many Relationships 341: 10.3.3 Many-to-Many Relationships 342: 10.3.4 Subtypes 343: 10.4 Building a Java Blend Application 344: 10.4.1 Creating the Mapping, Database to Java 345: 10.4.1.1 Mapping the Other Way, Java to Database 351: 10.4.1.2 Viewed Tables 352: 10.4.1.3 Changing the Mapping between Tables and Classes 353: 10.4.2 Writing OQL Queries 353: 10.4.3 The preprocess Command 354: 10.4.4 The Database Class 356: 10.4.5 The Transaction Class 358: 10.4.6 Writing our Applications 359: 10.4.6.1 Creating, Modifying, and Destroying Persistent Data 359: 10.4.6.2 Listing All Instances of a Persistence-Capable Class 360: 10.4.6.3 Tallying the Votes 363: 10.5 Additional Java Blend Features 365: 10.5.1 Optimistic Concurrency Control 365: 10.5.1.1 Lock Groups 366: 10.5.2 Prefetch 366: 10.5.3 Object Caching 366: 10.6 ODMG 367: 10.6.1 Language-Independent Specifications 367: 10.6.2 The Java Binding for ODMG 369: 10.6.3 How Java Blend Relates to ODMG 2.0 370: 10.6.4 Other Products that Support ODMG 2.0 370: 10.7 Chapter Summary: 11. Chapter 11 - GUI Java Application Builders: 11.1 Introduction 373: 11.2 Why use a GUI Application Builder for Java? 373: 11.2.1 PowerJ, JDeveloper, and Visual J++ 374: 11.2.2 Other Products 393: 11.3 Chapter Summary: 12. Chapter 12 - Future Developments and Standards Processing: 12.1 Introduction 395: 12.2 Starting The New Millenium 396: 12.3 The More Distant Future 397: 12.4 Standards Processing of Java, JDBC, and SQLJ Technologies 398: 12.5 Less Formal Standardization 406: 12.6 Acceptance, Implementation, and Wide Use 406: 12.7 Chapter Summary 408: 12.8 A Final Word: 13. Appendix A - Relevant Standards Bodies: 13.1 Introduction 411: 13.2 Contacting ISO 412: 13.3 Selected National Standards Bodies: 14. Appendix B - Database Schema Used in Our Example: 14.1 Introduction 417: 14.2 The movies Table 417: 14.3 The awards Table 418: 14.4 The votes Table 419: 14.5 The movies_in_stock Table 419: 14.6 The movie_stars Table: 15. Appendix C - Movie and Vote Classes: 15.1 Introduction 421: 15.2 The Movie Class 421: 15.3 The Vote Class 427: 15.4 The VoteOutOfRange Exception Class: 16. Appendix D - SQL/PSM Syntax: 16.1 Introduction 429: 16.2 SQL PSM Syntax: 17. Appendix E - SQLJ Part 0 Syntax: 17.1 Introduction 433: 17.2 Names and Identifiers 433;

‹  Return to Product Overview