Mapping SQL and Java data types

The following table shows the mapping between SQL and Java data types. They are from JDBC.

SQL data type Java data type
Simply mappable Object mappable
CHARACTER   String
VARCHAR   String
LONGVARCHAR   String
NUMERIC   java.math.BigDecimal
DECIMAL   java.math.BigDecimal
BIT boolean Boolean
TINYINT byte Integer
SMALLINT short Integer
INTEGER int Integer
BIGINT long Long
REAL float Float
FLOAT double Double
DOUBLE PRECISION double Double
BINARY   byte[]
VARBINARY   byte[]
LONGVARBINARY   byte[]
DATE   java.sql.Date
TIME   java.sql.Time
TIMESTAMP   java.sql.Timestamp

 

 

Web Services and Service-Oriented Architectures
Online articles>
Consulting
Mentoring
Speaking
Suggested programs
Stencils for the Savvy Manager's Guide
Links
Mail list
Privacy policy
Sitemap
Contact
Web Services articles
XML standards and vocabularies
Application server articles
Database concepts and standards>
Object database articles
Relational database articles
Object-relational mapping articles
XML database articles
XML middleware articles
Article Sponsorship
Reprint policy
Basic concepts for using a DBMS
Database models
DBMS standards>
Article suggestions
SQL-92
JDBC
SQLJ>
SQL:1999
ADO.NET
Java Data Objects (JDO)
ODMG 3.0
Detailed comparison of ODMG 3.0 and JDO
Summary comparison of DBMS standards
SQLJ execution environment
Mapping SQL and Java data types>

Related books at Amazon.com


Beginning Java Databases: JDBC, SQL, J2EE, EJB, JSP, XML
by Kevin Mukhar, Todd Lauinger, John Carnell
Average Customer Review: 4 stars based on 7 reviews.
Customer Review: I'm using this book as my text book for my independent study of database programming with Java. This book is the tops! The primary focus is programming with the Cloudscape database, but it does give you code snippets to use if you're using Oracle or one of the Microsoft databases (like SQL Server). What impresses me about the book is...

Java and SQL
by Malcolm Taylor
Publisher: Malcolm Taylor
Publication Date: October 2007

Visual Developer SQL Database Programming with Java: Creating Fast, Efficient Database Applications for the Web
by Bill McCarty, Bill McCarthy
Average Customer Review: 3 stars based on 10 reviews.
Customer Review: I found this book to be extremely useful. It is extremely good at explaining things, and has great code examples. A word of caution: it assumes you'll be using Microsoft Access. It's hard for me to assess how much you would get out of it if you're using a different configuration. It should probably have been called "JDBC programming...

Understanding SQL and Java Together : A Guide to SQLJ, JDBC, and Related Technologies (The Morgan Kaufmann Series in Data Management Systems)
by Jim Melton, Andrew Eisenberg
Average Customer Review: 3 stars based on 4 reviews.
Customer Review: In the pletoria of books on Java and databases, this is the one book that just must be read. It gives a thourough enough introduction to JDBC 1.0 and 2.0 and SQLJ Parts 0-2. Very readable! Covers the subjects to just the right level for developers and database experts.

Waiting For Mobile Java.sql: An article from: Software Development Times
by David Morse
Publisher: BZ Media LLC
Publication Date: February 2004

More related books: Search Amazon.com for SQL Java

 

Copyright © 2000-2008 Barry & Associates, Inc. All Rights Reserved.
You can use this material for your work or classes. Click here for our reprint policy.
www.service-architecture.com

 

 Information on becoming a sponsor

 

 

Google

 

Barry & Associates, Inc.