Java Data Access—JDBC, JNDI, and JAXP phần 1 pptx

39 395 0
Java Data Access—JDBC, JNDI, and JAXP phần 1 pptx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... with Java Data Access Chapter List Chapter 1: Introducing Java Data Access Development Chapter 2: A Relational Database Primer 1 Chapter 1: Introducing Java Data Access Development In This Chapter • Understanding how enterprises use and store data • Using the Java technologies for accessing the different enterprise data stores Now more than ever, Java developers need to understand how to create data ... following snippets provide some examples of the SELECT statement: SELECT Ssn, Name FROM Employees Query output: SSN −−−−−−−−− 11 111 111 1 419 8765 41 312 654987 12 3456789 9876543 21 454020576 NAME −−−− Todd Larry Lori Jimmy John Andy Notice that the previous query returns the SSN and Name for all the rows in the table Using the WHERE statement enables you to select which rows to return For example, the following... relational databases • JNDI 1. 2, which provides support for interacting with naming and directory services • JDO, which enables you to easily persist Java objects in a variety of data stores • XML APIs, which consist of JAXP, JAX−RPC, JAXM, JAXB, and JAXR, and that enable you to parse, send, and transform XML document 11 Chapter 2: A Relational Database Primer In This Chapter • Understanding relational database... relational databases • Naming and directory services such as RMI Registries and LDAP−enabled directory services • XML documents containing self−describing data from databases or used in inter−application communication To help you access the various types of data storage containers in the previous list, Java provides the following data access technologies: 10 Chapter 1: Introducing Java Data Access... access the different types of data stores Figure 1 2 shows the role Java Data Access Technologies (JDATs) play in the enterprise environment 6 Chapter 1: Introducing Java Data Access Development From the figure you can see that JDAT includes JDBC, JNDI, JDO, and the XML APIs You use the JDBC API to access data stored in a SQL database The JNDI API gives you access to naming and directory services such... API to access relational databases without involving J2EE The remaining sections provide more details on the different Java data access technologies shown in Figure 1 2 Figure 1 2: The role Java Data Access Technologies (JDATs) play in the enterprise environment JDBC 3.0 JDBC, the Java database−access technology, is probably the most widely known Java data access API Many books and Web sites exist to... this option: SELECT * FROM employees WHERE name= ‘Todd’ Query output: SSN NAME SALARY HIREDATE LOC_ID −−−−−−−−−− −−−−−−−−−−−−−−−−−−−− −−−−−−−−−− −−−−−−−−− −−−−−−− 11 111 111 1 Todd 5000.55 16 −SEP−89 10 0 I mentioned earlier that you can retrieve data from multiple tables using the SELECT statement This enables you to pull records from related tables To build this type of query you must use create join between... 1 1 illustrates some of the more common kinds of data 2 Chapter 1: Introducing Java Data Access Development an enterprise uses and how it stores them It also shows how clients access the information residing in the data stores Figure 1 1: This figure shows an example of the more common kinds of data an enterprise uses and how it stores them For example, data most commonly takes the form of files stored... components 13 Chapter 2: A Relational Database Primer Understanding data storage The purpose of a database is to safely store data How it organizes the data on the physical storage device depends on the vendor Regardless, an RDBMS has two basic storage structures, tables and indexes Tables, the center of an RDBMS, hold the data Indexes, although not technically required, improve data access performance A database... as data updates and backups more frequently and reliably Today’s databases can store more than just simple character or numerical data The Internet has pushed database vendors to support more varied forms of data For example, most database systems now enable you to store multimedia data such as sound and video In addition, support for persisting native programming objects, such as those used by Java, . Types 11 0 In This Chapter 11 0 Java, Databases, and Data Types 11 0 Java to−JDBC Data Type Mappings 11 1 JDBC−to Java Data Type Mappings 11 4 Standard SQL data types 11 4 Advanced SQL data types 11 8 ii Table. Interface 14 0 Creating DatabaseMetaData objects 14 1 Using DatabaseMetaData objects 14 1 DatabaseMetaData example 14 4 Summary 14 9 Part III: Using Java Data Access Design Patterns 15 0 Chapter List 15 0 Chapter. Understanding JDBC Data Types Custom Data Type Mapping 12 8 Building custom data type maps 12 8 Using custom mapping 13 1 Summary 13 3 Chapter 8: Mining Database Metadata with JDBC 13 4 In This Chapter 13 4 The

Ngày đăng: 14/08/2014, 06:21

Từ khóa liên quan

Mục lục

  • Java Data Access—JDBC, JNDI, and JAXP

  • Table of Contents

  • Part I: Getting Started with Java Data Access

    • Chapter 1: Introducing Java Data Access Development

      • In This Chapter

      • Taking Stock of Enterprise Data Stores

        • Database systems

        • Naming and directory services

        • XML services

        • Introducing Java Data Access Technologies

          • JDBC 3.0

          • JNDI

          • JDO

          • Java XML APIs

          • Summary

          • Chapter 2: A Relational Database Primer

            • In This Chapter

            • The RDBMS in a Nutshell

              • Understanding data storage

              • Ensuring data integrity

              • Reviewing SQL Basics

                • Using Data Manipulation Language (DML)

                • Using Data Definition Language (DDL)

Tài liệu cùng người dùng

Tài liệu liên quan