Hibernate and Oracle

本文深入探讨了Hibernate框架的应用,包括其与关系型数据库交互的基本原理、四种不同的关联获取策略、对象状态管理和缓存机制等内容,并提供了关于Java序列化机制和JMX规范的相关介绍。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

To use hibernate effectively, a solid understanding of the relational model and sql is a prerequisite. You will need to use your knowledge of sql to tune the performance of your hibernate application.

java has a built-in persistenece mechanism: serialization provides the ability to write a graph of objects to a byte-stream ,which may then be persisted to a file or database.

you can use an xml configuration file to fully configure a sessionfactory.The java management extension is about the management of systems components or ,bettter of system services.

The jmx specification defines the following components:

The jmx MBean--- a reuable component that expose an interface for mangement.

It is vital to understand the difference between object identity and object equality before we discuss terms like database identity and how hibernate manages identity.

In its lifecycyle, an object can transition from a transient object to a persistent object to a detached object.

在hibernate中, 用new操作符生成的对象实例不会被立即持久化。它们的状态是瞬时的;这表示它们不与数据库中的任何一行相关;因此,一旦它们不被引用,它们就会从应用中消失。

Hibernate allows you to choose among four fetching strategies for any association, in association metadata and at runtime.

A cache keeps a representation of current database state close to the application, either in memory or on disk of the application server machine.The cache is a local copy of the data. The cache sits between your application and the database. The cache may be used to avoid a database hit.

 

关系型数据库的概念很容易理解,关系型数据库就是以表的形式组织的相关信息的集合。按照关联中的运算符来划分,关联条件分为两种:相等关联与不等关联;按照集合运算来划分;关联条件又分为三种:内连接;外连接;自连接。单列函数主要有五种类型:字符函数;数值函数;转换函数;日期函数;正则表达式函数。

字符串函数:
ASCII(x):返回字符x的ASCII值;
CHA(x):返回ASCII值x对应的字符;
CONCAT(X,Y):在x字符串后面追加y;
INITCAP(X):把x字符串的字母全部变成大写;
INSTR(X,FIND_STR[,START] [,OCCURRENCE]):在x中查找find-str的位置;
length(x):字符串x的长度;
lower(x): coverts the letters in x to lowercase;
lpad(x,width [,pad_str]):pads x with spaces to left to bring the total length of the string up to width characters.

自相关子查询:外部查询的每一行一次一个的传递给子查询;子查询依照顺序读取外部查询返回的每一行.

A ref cursor is a pointer to a cursor, and is similar to a pointer in the c++ programming language.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值