JDBC Metadata, MySQL, and Oracle Recipes: A Problem-Solution Approach

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

JDBC Metadata, MySQL, and Oracle Recipes is the only book that focuses on metadata or annotation-based code recipes for JDBC API for use with Oracle and MySQL. It continues where the authors other book, JDBC Recipes: A Problem-Solution Approach , leaves off.

This new edition is also a Java EE 5-compliant book, perfect for lightweight Java database development. And it provides cut-and-paste code templates that can be immediately customized and applied in each developers application development.

Author(s): Mahmoud Parsian
Series: Expert's Voice in Java
Edition: 1
Publisher: Apress
Year: 2006

Language: English
Pages: 493

1590596374......Page 1
Contents......Page 6
About the Author......Page 11
About the Technical Reviewer......Page 12
Acknowledgments......Page 13
Introduction......Page 14
CHAPTER 1 What Is JDBC Programming?......Page 18
1.1. What Is JDBC?......Page 19
1.2. What Is JDBC Programming?......Page 21
1.3. How Do You Handle JDBC Errors/Exceptions?......Page 27
1.4. What Is JDBC Metadata Programming?......Page 31
1.5. What Is an Example of JDBC Metadata Programming?......Page 32
CHAPTER 2 Database Metadata, Part 1......Page 36
2.1. What Is Metadata?......Page 38
2.2. What Is Database Metadata?......Page 39
2.3. How Do You Discover Database Metadata?......Page 41
2.4. What Is JDBC’s Answer to Database Metadata?......Page 42
2.5. What Is the Vendor Name Factor in Database Metadata?......Page 44
2.6. How Do You Find JDBC’s Driver Information?......Page 46
2.7. What Are a Database’s SQL Keywords?......Page 50
2.8. What Are the Available SQL Data Types?......Page 54
2.9. What Are Catalogs and Schemas?......Page 58
2.10. What Are the Table Names for a Database?......Page 61
2.11. What Are the View Names for a Database?......Page 67
2.12. Does a Table Exist in a Database?......Page 70
2.13. What Are a Table’s Column Names?......Page 75
2.14. What Are the Table Types Used in a Database?......Page 81
2.15. What Are the Primary Keys for a Table?......Page 83
2.16. What Are a Table’s Privileges?......Page 86
2.17. What Are a Table Column’s Privileges?......Page 91
2.18. How Do You Find the Number of Rows Affected by a SQL Query?......Page 96
2.19. What Is a Table’s Optimal Set of Columns That Uniquely Identify a Row?......Page 98
3.1. What Are a Table’s Indexes?......Page 106
3.2. Does an Index Exist for a Specific Table?......Page 119
3.3. What Are the Names of a Database’s Stored Procedures?......Page 121
3.4. What Is the Signature of a Stored Procedure?......Page 129
3.5. What Is the Username of the Database Connection?......Page 139
3.7. What Is the JDBC’s Driver Information?......Page 140
3.8. How Can You Determine Where a Given Table Is Referenced via Foreign Keys?......Page 145
3.9. What Foreign Keys Are Used in a Table?......Page 154
3.10. What Is the JDBC View of a Database’s Internal Structure?......Page 165
3.11. Does a Database Support Batching?......Page 167
CHAPTER 4 ResultSet Metadata......Page 172
4.2. What Is a ResultSetMetaData Object?......Page 173
4.3. How Do You Create a ResultSetMetaData Object?......Page 174
4.4. How Does JDBC Define ResultSetMetaData?......Page 177
4.6. What Is the Relationship of ResultSetMetaData to Other Objects?......Page 180
4.7. How Do You Express ResultSetMetaData in XML?......Page 181
4.8. How Do You Get a Table’s Metadata Without Selecting Any Rows?......Page 191
4.9. How Do You Retrieve the Column Types from a ResultSet?......Page 196
4.10. How Do You Retrieve the Column Name/Data/Type from a ResultSet?......Page 197
4.11. What Is ResultSet Holdability?......Page 199
CHAPTER 5 Parameter Metadata......Page 201
5.1. What Are Dynamic Parameters?......Page 202
5.2. What Is ParameterMetaData?......Page 205
5.3. What Is the Definition of ParameterMetaData?......Page 206
5.4. How Do You Create a ParameterMetaData Object?......Page 208
5.5. How Do You Get Information from a ParameterMetaData Object?......Page 215
5.6. How Do You Get XML Information from a ParameterMetaData Object?......Page 219
5.7. Why Should You Use ParameterMetadata Wisely?......Page 223
5.8. How Do You Get ParameterMetadata from Stored Procedures (Oracle)?......Page 224
5.9. How Do You Get ParameterMetadata from Stored Procedures (MySQL)?......Page 228
6.1. What Is DriverPropertyInfo?......Page 232
6.2. How Do You Create a DriverPropertyInfo Object?......Page 233
6.3. What Is a Sample Application of DriverPropertyInfo?......Page 239
6.4. What Connection Properties Should You Supply to a Database Driver in Order to Connect to a Database?......Page 240
6.5. How Does MySQL’s Driver Implement Driver.getPropertyInfo()?......Page 246
CHAPTER 7 RowSet Metadata......Page 254
7.1. What Is a RowSet Object?......Page 255
7.2. What Are the Relationships Between Key Classes and Interfaces for Rowsets?......Page 258
7.3. What Is a JdbcRowSet?......Page 259
7.4. What Is a CachedRowSet?......Page 262
7.5. What Is a WebRowSet?......Page 267
7.6. What Is a FilteredRowSet?......Page 278
7.7. How Do You Get Metadata from a FilteredRowSet Object?......Page 283
7.8. What Is a SyncResolver?......Page 288
7.9. How Do You Create a RowSet Object?......Page 291
7.10. What Is a RowSetMetaData Object?......Page 294
7.11. How Do You Create a RowSetMetaData Object?......Page 295
7.13. How Do You Create a WebRowSet Object?......Page 298
7.14. How Do You Get WebRowSet’s Metadata as XML?......Page 304
7.15. How Do You Retrieve Metadata from RowSetMetaData?......Page 308
7.16. How Can You Create a Custom RowSetMetaData Object?......Page 309
7.17. How Can You Instantiate and Load a New CachedRowSet Object from a Non-JDBC Source?......Page 313
CHAPTER 8 Web Access to Metadata, Part 1......Page 322
8.1. How Do Web Clients and Servers Communicate?......Page 323
8.2. What Is a Java Servlet in a Nutshell?......Page 324
8.4. How Does a Java Servlet Work?......Page 326
8.5. How Does a Servlet Talk to a Servlet Container?......Page 329
8.7. What Is the Life Cycle of a Servlet?......Page 330
8.8. What Is a Very Simple Servlet Example Using JDBC?......Page 332
8.9. How Do You Get a List of Table Types for a Database?......Page 335
8.10. How Do You Get a List of Table Names for a Database?......Page 339
8.11. How Do You Get a List of View Names for a Database?......Page 346
8.12. How Do You Get a List of Tables and Views for a Database?......Page 353
8.13. How Do You Get a List of SQL’s Keywords?......Page 362
8.14. How Do You Get a Table’s Primary Key Columns?......Page 366
8.15. How Do You Get a Table’s Columns?......Page 373
8.16. How Do You Get a View’s Columns?......Page 382
8.17. How Do You Get Stored Procedure Names?......Page 385
9.1. How Do You Get the Signature of a Stored Procedure?......Page 396
9.2. How Do You Get Database Catalogs?......Page 406
9.3. How Do You Get Database Schemas?......Page 411
9.4. What Are the Exported Keys for a Table?......Page 417
9.5. What Foreign Keys Are Used in a Table?......Page 428
9.6. What Are the Available SQL Types Used by a Database?......Page 441
9.7. What Are the Table’s Privileges?......Page 447
9.8. What Are the Column Privileges?......Page 454
9.9. What Are a Table’s Optimal Set of Columns That Uniquely Identify a Row or Record?......Page 461
9.10. How Do You Get a RowSet’s Metadata?......Page 470
10.1. What Is RDF?......Page 476
10.3. What Is an Example of RDF?......Page 477
10.5. What Are the Applications of RDF?......Page 478
10.6. Can JDBC Metadata Be Expressed As RDF?......Page 479
10.7. How Do You Exploit RDF Data Models in Your Java Applications?......Page 480
C......Page 481
D......Page 483
G......Page 484
H......Page 485
J......Page 486
M......Page 487
P......Page 488
R......Page 489
S......Page 490
W......Page 492
X......Page 493