Berkeley DB程序员参考--目录

Table of Contents 

Preface .................................................................................................... xi

序言

Conventions Used in this Book .....................................................................xi

文档约定

For More Information ..............................................................................xi

更多信息

Contact Us ................................................................................... xii

联系我们

1. Introduction................................................................................................1

   介绍

An introduction to data management ............................................................... 1

数据管理简介

Mapping the terrain: theory and practice .......................................................... 1

映射领域:理论与实践

Data access and data management .......................................................... 2

数据访问与数据管理

Relational databases ...................................................................................................................3

关系型数据库

Object-oriented databases ...................................................................................................................4

面向对象数据库

Network databases ...................................................................................................................4

网络数据库

Clients and servers ...................................................................................................................5

客户端与服务器

What is Berkeley DB? ...................................................................................................................6

Berkeley DB是什么

Data Access Services ...................................................................................................................7

数据访问服务

Data management services ...................................................................................................................7

数据管理服务

Design ...........................................................................................8

设计模式

What Berkeley DB is not .............................................................................8

Berkeley DB不是什么

Berkeley DB is not a relational database .................................................... 9

Berkeley DB不是关系型数据库

Berkeley DB is not an object-oriented database ........................................... 10

Berkeley DB不是面向对象数据库

Berkeley DB is not a network database .................................................. .. 10

Berkeley DB不是网络数据库

Berkeley DB is not a database server ....................................................... 10

Berkeley DB不是数据库服务器

Do you need Berkeley DB? .................................................................................................................11

你是否确实需要Berkeley DB

What other services does Berkeley DB provide? .................................................. 11

Berkeley DB还有那些服务未提供

What does the Berkeley DB distribution include? ................................................. 12

Berkeley DB发布版包括了哪些内容

Where does Berkeley DB run? .................................................................................................................12

Berkeley DB运行在哪里

The Berkeley DB products .................................................................................................................13

Berkeley DB产品系列

Berkeley DB Data Store.........................................................................14

Berkeley DB数据存储

Berkeley DB Concurrent Data Store .................................................................................................................14

Berkeley DB并发存储

Berkeley DB Transactional Data Store .................................................................................................................14

Berkeley DB带事务存储

Berkeley DB High Availability .................................................................................................................14

Berkeley DB的高可用性

2. Access Method Configuration..............................................................................................................15

配置数据访问方式

What are the available access methods?.........................................................15

 都提供了哪些访问方式

Btree .................................................................................................................15

B-

Hash .................................................................................................................15

哈希

Queue .................................................................................................................15

队列

Recno .................................................................................................................15

记录号方式

Selecting an access method ..............................................................................................15

如何选择一种数据访问方式

Hash or Btree? .......................................................................................................16

哈希还是B-树方式

Queue or Recno? .....................................................................................................17

队列还是记录号方式

Logical record numbers ...................................................................................................17

逻辑记录号

General access method configuration ...................................................................................19

通用访问配置

Selecting a page size ...............................................................................................19

选择页大小

Selecting a cache size ..............................................................................................20

选择缓存大小

Selecting a byte order ..............................................................................................21

选择字节序

Duplicate data items ...............................................................................................22

多值存储

Non-local memory allocation .......................................................................................23

非本地空间的申请 

Btree access method specific configuration ............................................................................23

B-树数据访问方式特殊配置

Btree comparison ...................................................................................................23

B-树比较方法

Btree prefix comparison ...........................................................................................25

B-树前缀比较方法

Minimum keys per page ...........................................................................................26

每页Key的最小化

Retrieving Btree records by logical record number ............................................................26

通过逻辑记录号读取B-树中的记录

Compression ........................................................................................................28

比较方法

Custom compression .........................................................................................29

定制比较方法

Programmer Notes ...........................................................................................32

编程说明

Hash access method specific configuration ............................................................................33

哈希数据访问方式特殊配置

Page fill factor .......................................................................................................33

页面填写因子

Specifying a database hash ........................................................................................33

指定一个数据访问哈希方法

Hash table size ..................................................................................................... 33

哈希表大小

Queue and Recno access method specific configuration .............................................................. 34

队列及记录号数据访问方式特殊配置

Managing record-based databases ...............................................................................34

管理基于记录的数据库

Record Delimiters .................................................................................................................34

记录分隔符

Record Length .................................................................................................................34

记录长度

Record Padding Byte Value .................................................................................................................34

记录填充字节值

Selecting a Queue extent size .................................................................................................................35

选择一个队列长度

Flat-text backing files .................................................................................................................35

平面扩展备份文件

Logically renumbering records .................................................................................................................36

逻辑记录号格式记录

3. Access Method Operations..............................................................................................................38

数据访问操作

Database open .................................................................................................................39

打开一个数据库

Opening multiple databases in a single file ...................................................... 40

在单一文件中保存多个数据库

Configuring databases sharing a file .................................................................................................................41

在单一文件中配置多个数据库

Caching databases sharing a file .................................................................................................................41

在单一文件中缓存多个数据库

Locking in databases based on sharing a file .............................................. 41

在单一文件中保存多个数据的锁定控制

Partitioning databases .................................................................................................................42

数据库分区

Specifying partition keys .................................................................................................................42

指定分区Key

Partitioning callback .................................................................................................................44

分区的回调函数

Placing partition files .................................................................................................................45

保存分区文件

Retrieving records .................................................................................................................46

读取记录

Storing records .................................................................................................................46

保存记录

Deleting records .................................................................................................................47

删除记录

Database statistics .................................................................................................................47

数据库统计

Database truncation .................................................................................................................47

数据库截断

Database upgrade .................................................................................................................47

数据库升级

Database verification and salvage .................................................................................................................48

数据库验证及恢复

Flushing the database cache .................................................................................................................48

刷新数据库缓存

Database close .................................................................................................................49

关闭数据库

Secondary indexes .................................................................................................................49

次级索引

Error Handling With Secondary Indexes .................................................................................................................53

次级索引的出错处理

Foreign key indexes .................................................................................................................54

外键索引

Cursor operations .................................................................................................................57

游标操作

Retrieving records with a cursor .................................................................................................................57

通过游标访问数据库记录

Cursor position flags .................................................................................................................57

游标位置标记

Retrieving specific key/data pairs .................................................................................................................58

读取特定的key-value

Retrieving based on record numbers .................................................................................................................58

通过记录号读取记录

Special-purpose flags .................................................................................................................58

特殊标记

Storing records with a cursor .................................................................................................................60

通过游标保存记录

 

 

 


 

 

 

 

 

 

 

 

Deleting records with a cursor .................................................................................................................61

通过游标删除记录

Duplicating a cursor .................................................................................................................61

复制游标

Equality Join .................................................................................62

相等连接

Example .................................................................................................................63

示例

Data item count .................................................................................................................65

统计数据

Cursor close .................................................................................................................65

关闭游标

4. Access Method Wrapup..............................................................................................................66

   访问方法的封装

Data alignment .................................................................................................................66

数据捆绑

Retrieving and updating records in bulk .................................................................................................................66

通过容器读取或者更新数据

Bulk retrieval .................................................................................................................66

通过容器检索数据

Bulk updates .................................................................................................................68

通过容器更新数据

Bulk deletes .................................................................................................................68

通过容器删除数据

Partial record storage and retrieval .................................................................................................................69

读取或者保存记录的部分数据

Storing C/C++ structures/objects .................................................................................................................71

存储C/C++结构体/对象

Retrieved key/data permanence for C/C++ .................................................................................................................72

C/C++中恢复持久化的Key-Value

Error support .................................................................................................................73

出错处理

Cursor stability .................................................................................................................74

游标的稳定性

Database limits .................................................................................................................74

数据库的限制

Disk space requirements .................................................................................................................75

硬盘空间的要求

Btree .................................................................................................................75

B-

Hash .................................................................................................................76

哈希

Specifying a Berkeley DB schema using SQL DDL ................................................ 77

通过SQL DDL创建一个Berkeley DB数据库模式

Access method tuning .................................................................................................................78

访问方式协调

Access method FAQ .................................................................................................................80

关于访问方式的FAQ

5. Java API..............................................................................................................83

Java configuration .................................................................................................................83

Java配置

Compatibility .................................................................................................................84

兼容性

Java programming notes .................................................................................................................84

Java编程参考

Java FAQ .................................................................................................................85

6. C# API .................................................................................................................88

Compatibility .................................................................................................................89

兼容性

7. Standard Template Library API .................................................................................................................90

   标准模板库

Dbstl introduction .................................................................................................................90

Dbstl简介

Standards compatible .................................................................................................................90

标准兼容

Performance overhead .................................................................................................................90

性能开销

Portability .................................................................................................................90

可移植性

Dbstl typical use cases .................................................................................................................91

Dbstl典型用例

Dbstl examples .................................................................................................................91

Dbstl示例

Berkeley DB configuration .................................................................................................................93

Berkeley DB配置

Registering database and environment handles .................................................................................................................94

注册数据库和环境变量

Truncate requirements .................................................................................................................94

截断需求

Auto commit support .................................................................................................................95

支持自动提交

Database and environment identity checks .................................................................................................................95

数据库及数据环境的身份检查

Products, constructors and configurations .................................................................................................................95

产品,构造和配置

Using advanced Berkeley DB features with dbstl ................................................. 96

使用Berkeley DB的高级特征——dbstl

Using bulk retrieval iterators .................................................................................................................96

使用容器迭代器

Using the DB_RMW flag .................................................................................................................97

使用DB_RMW参数标记

Using secondary index database and secondary containers ............................... 97

使用次级索引和次级容器

Using transactions in dbstl .................................................................................................................97

dbstl中使用事务

 

 

 


 

 

 

 

 

 

 

 

Using dbstl in multithreaded applications .................................................................................................................98

在多线程环境中使用dbstl

Working with primitive types..............................................................................................................99

与原始数据类型的兼容

Storing strings ................................................................................................................100

存储字符串

Store and Retrieve data or objects of complex types.............................................................................................................101

存储或读取复杂对象或者数据

Storing varying length objects ................................................................................................................101

存储变长对象

Storing by marshaling objects ................................................................................................................101

存储已封装对象

Using aDbstlDbt wrapper object ................................................................................................................102

使用DbstlDb封装对象

Storing arbitrary sequences ................................................................................................................103

存储任意序列

TheSequenceLenFunct function ................................................................................................................103

函数SequenceLenFunct

TheSequenceCopyFunct function ................................................................................................................104

函数SequenceCopyFunct

Notes ................................................................................................................104

备注

Dbstl persistence ................................................................................................................104

Dbstl的持久化

Direct database get ................................................................................................................105

直接从数据库读取

Change persistence ................................................................................................................106

改变持久化

Object life time and persistence.............................................................................................................107

对象生命周期及持久化

Dbstl container specific notes ................................................................................................................108

Dbstl容器特殊说明

db_vector specific notes ................................................................................................................108

db_vector特殊说明

Associative container specific notes ................................................................................................................109

关联容器特殊说明

Using dbstl efficiently ................................................................................................................109

高效的使用dbstl

Using iterators efficiently ................................................................................................................109

高效的使用迭代器

Using containers efficiently ................................................................................................................110

高效的使用容器

Dbstl memory management ................................................................................................................111

Dbstl内存管理

Freeing memory ................................................................................................................111

内存释放

Type specific notes ................................................................................................................111

特定类型的特殊说明

DbEnv/Db ................................................................................................................111

DbstlDbt ................................................................................................................112

Dbstl miscellaneous notes ................................................................................................................112

Dbstl其他说明

Special notes about trivial methods ................................................................................................................112

其他方法的特殊说明

Using correct container and iterator public types ................................................................................................................113

正确的使用容器和迭代器

Dbstl known issues ................................................................................................................114

Dbstl已知问题

8. Berkeley DB Architecture.............................................................................................................115

   Berkeley DB整体架构

The big picture ................................................................................................................115

整体图

Programming model ................................................................................................................118

编程模式

Programmatic APIs ................................................................................................................118

可编程API

C ................................................................................................................118

C++ ................................................................................................................118

STL ................................................................................................................119

Java ................................................................................................................120

Dbm/Ndbm, Hsearch ................................................................................................................120

Scripting languages ................................................................................................................120

脚本语言

Perl ................................................................................................................120

PHP ................................................................................................................120

Tcl ................................................................................................................120

Supporting utilities ................................................................................................................120

支持工具

9. The Berkeley DB Environment.............................................................................................................122

    Berkeley DB数据环境

Database environment introduction ................................................................................................................122

数据环境介绍

Creating a database environment ................................................................................................................123

创建数据环境

Opening databases within the environment ................................................................................................................125

在数据环境中打开数据库

Error support ................................................................................................................127

出错处理

 

 

 


 

 

 

 

 

 

 

 

DB_CONFIG configuration file ................................................................................................................128

DB_CONFIG配置文件

File naming ................................................................................................................128

文件命名

Specifying file naming to Berkeley DB ................................................................................................................128

Berkeley DB 指定文件名

Filename resolution in Berkeley DB ................................................................................................................129

Berkeley DB对于文件名的处理

Examples ................................................................................................................130

示例

Shared memory regions ................................................................................................................130

共享内存区域

Security ................................................................................................................131

安全性

Encryption ................................................................................................................132

数据加密

Remote filesystems ................................................................................................................134

远程文件系统

Environment FAQ ................................................................................................................135

关于数据环境的FAQ

10. Berkeley DB Concurrent Data Store Applications.............................................................................................................136

    Berkeley DB并发数据存储应用

Concurrent Data Store introduction ................................................................................................................136

并发数据存储介绍

Handling failure in Data Store and Concurrent Data Store applications ................................................................................................................138

在应用中处理数据保存及并发存储失败

Architecting Data Store and Concurrent Data Store applications ................................................................................................................139

设计并发数据存储应用

11. Berkeley DB Transactional Data Store Applications.............................................................................................................143

     Berkeley DB事务处理型数据存储应用

Transactional Data Store introduction ................................................................................................................143

事务处理型数据存储介绍

Why transactions? ................................................................................................................143

为什么需要事务处理

Terminology ................................................................................................................143

专业术语

Handling failure in Transactional Data Store applications ................................................................................................................144

事务处理型数据存储应用中的失败处理

Architecting Transactional Data Store applications ................................................................................................................145

设计事务处理型数据存储应用

Opening the environment ................................................................................................................150

打开数据环境

Opening the databases ................................................................................................................153

打开数据库

Recoverability and deadlock handling ................................................................................................................155

数据恢复及死锁处理

Atomicity ................................................................................................................159

原子性操作

Isolation ................................................................................................................160

事务隔离

Degrees of isolation ................................................................................................................163

事务隔离的级别

Snapshot Isolation ................................................................................................................163

快照隔离

Transactional cursors ................................................................................................................164

事务处理型游标

Nested transactions ................................................................................................................167

嵌套事务

Environment infrastructure ................................................................................................................168

基本数据环境

Deadlock detection ................................................................................................................169

死锁检测

Checkpoints ................................................................................................................170

检查点

Database and log file archival ................................................................................................................172

数据库及日志文件的打包

Log file removal ................................................................................................................175

日志清理

Recovery procedures ................................................................................................................176

数据恢复处理

Hot failover ................................................................................................................177

故障热切换

Using Recovery on Journaling Filesystems ................................................................................................................179

在日志文件系统中的灾备恢复

Recovery and filesystem operations ................................................................................................................179

灾备恢复及文件系统操作

Berkeley DB recoverability ................................................................................................................180

Berkeley DB的可恢复性

Transaction tuning ................................................................................................................183

事务处理的协调

Transaction throughput ................................................................................................................185

事务处理的吞吐量

Transaction FAQ ................................................................................................................187

事务处理相关的FAQ

12. Berkeley DBReplication.............................................................................................................190

     Berkeley DB复制

Replication introduction ................................................................................................................190

数据复制介绍

Replication environment IDs ................................................................................................................192

复制数据环境的句柄

Replication environment priorities ................................................................................................................192

复制数据环境的顺序

Building replicated applications ................................................................................................................192

构建带复制系统的应用

Replication Manager methods ................................................................................................................194

数据复制的管理

Base API Methods ................................................................................................................195

基本API

 

 

 


 

 

 

 

 

 

 

 

Building the communications infrastructure ................................................................................................................197

构建通讯基础

Connecting to a new site ................................................................................................................198

连接到新的站点

Running Replication Manager in multiple processes ................................................................................................................199

在多进程环境中运行复制管理器

One replication process and multiple subordinate processes ................................................................................................................199

一个复制进程多个下级进程

Persistence of network address configuration ................................................................................................................199

网络地址配置的持久化

Programming considerations ................................................................................................................199

编程参考

Handling failure ................................................................................................................200

出错处理

Other miscellaneous rules ................................................................................................................200

其他杂项

Running Replication using the db_replicate Utility ................................................................................................................200

使用db_replicate工具运行复制系统

One Replication Process and Multiple Subordinate Processes ................................................................................................................200

一个复制进程多个下级进程

Common Use Case ................................................................................................................201

常见用例

Avoiding Rollback ................................................................................................................202

避免回滚

When to Consider an Integrated HA Application ................................................................................................................203

何时该考虑构建一个整合HA的应用

Choosing a Replication Manager Ack Policy ................................................................................................................203

选择一个复制管理的接收策略

Elections ................................................................................................................204

选举

Synchronizing with a master ................................................................................................................207

与主节点同步

Delaying client synchronization ................................................................................................................207

有延迟的客户端同步

Client-to-client synchronization ................................................................................................................207

端对端的同步

Blocked client operations ................................................................................................................208

阻塞的客户端操作

Clients too far out-of-date to synchronize ................................................................................................................208

客户端超期过时的同步

Initializing a new site ................................................................................................................209

初始化一个新的站点

Bulk transfer ................................................................................................................209

大数据量传输

Transactional guarantees ................................................................................................................210

事务保证

Master Leases ................................................................................................................214

管理约定

Read your writes consistency ................................................................................................................216

写一致性

Getting a token ................................................................................................................216

获得一个令牌

Token handling ................................................................................................................217

令牌持有

Using a token to check or wait for a transaction ................................................................................................................217

使用一个令牌以检查或等待一个事务处理

Clock Skew ................................................................................................................217

时钟差

Network partitions ................................................................................................................218

网络分区

Replication FAQ ................................................................................................................220

有关复制的FAQ

Ex_rep: a replication example ................................................................................................................221

示例:  一个简单的数据复制用例

Ex_rep_base: a TCP/IP based communication infrastructure ................................................................................................................223

示例:一个基于TCP/IP的通讯基础架构

Ex_rep_base: putting it all together ................................................................................................................224

示例:整合如上的示例

13. Application Specific Logging and Recovery.............................................................................................................226

    应用日志和灾备恢复

Introduction to application specific logging and recovery ................................................................................................................226

应用日志和灾备恢复简介

Defining application-specific log records ................................................................................................................227

定义应用日志

Automatically generated functions ................................................................................................................229

自动产生日志

Application configuration ................................................................................................................232

应用配置

14. Programmer Notes.............................................................................................................235

    程序员参考指南

Signal handling ................................................................................................................235

信号处理

Error returns to applications ................................................................................................................235

在应用中处理错误返回

Environment variables ................................................................................................................237

环境变量

Multithreaded applications ................................................................................................................237

多线程应用

Berkeley DB handles ................................................................................................................238

Berkeley DB的句柄

Name spaces ................................................................................................................239

命名空间

C Language Name Space ................................................................................................................239

C语言命名空间

Filesystem Name Space ................................................................................................................240

文件系统命名空间

Memory-only or Flash configurations ................................................................................................................240

纯内存或者闪存数据库配置 

 

Disk drive caches ................................................................................................................242

磁盘驱动缓存

Copying or moving databases ................................................................................................................243

拷贝或者移动数据库

Compatibility with historic UNIX interfaces ................................................................................................................244

与历史UNIX接口的兼容性

Run-time configuration ................................................................................................................244

运行时配置

Performance Event Monitoring ................................................................................................................245

性能事件管理

Using the DTrace Provider ................................................................................................................246

使用DTrace提供程序

Using SystemTap ................................................................................................................246

使用SystemTap

Example Scripts ................................................................................................................246

示例脚本

Performance Events Reference ................................................................................................................248

性能事件参考

Programmer notes FAQ ................................................................................................................252

程序员参考相关的FAQ

15. The Locking Subsystem.............................................................................................................253

     加锁子系统

Introduction to the locking subsystem ................................................................................................................253

加锁子系统介绍

Configuring locking ................................................................................................................254

加锁的配置

Configuring locking: sizing the system ................................................................................................................255

加锁的配置:指定系统的标准

Standard lock modes ................................................................................................................257

标准加锁模型

Deadlock detection ................................................................................................................258

死锁检测

Deadlock detection using timers ................................................................................................................259

使用定时器进行死锁检测

Deadlock debugging ................................................................................................................260

死锁的调试

Locking granularity ................................................................................................................262

加锁的粒度

Locking without transactions ................................................................................................................263

没有事务处理的加锁

Locking with transactions: two-phase locking ................................................................................................................264

带事务处理的加锁:两阶段加锁

Berkeley DB Concurrent Data Store locking conventions ................................................................................................................264

Berkeley DB并发数据存储的加锁约定

Berkeley DB Transactional Data Store locking conventions ................................................................................................................265

Berkeley DB事务处理型数据存储的加锁约定

Locking and non-Berkeley DB applications ................................................................................................................267

对非Berkeley DB应用的加锁

16. The Logging Subsystem.............................................................................................................268

     日志子系统

Introduction to the logging subsystem ................................................................................................................268

日志子系统介绍

Configuring logging ................................................................................................................269

配置日志子系统

Log file limits ................................................................................................................270

日志文件的限制

17. The Memory Pool Subsystem.............................................................................................................271

     内存池子系统

Introduction to the memory pool subsystem ................................................................................................................271

内存池子系统介绍

Configuring the memory pool ................................................................................................................273

配置内存池子系统

18. The Transaction Subsystem.............................................................................................................274

     事务处理子系统

Introduction to the transaction subsystem ................................................................................................................274

事务处理子系统介绍

Configuring transactions ................................................................................................................275

配置事务处理子系统

Transaction limits ................................................................................................................276

事务处理的限制

Transaction IDs ................................................................................................................276

事务句柄数

Cursors ................................................................................................................276

游标

Multiple Threads of Control ................................................................................................................276

多线程控制

19. Sequences.............................................................................................................277

     队列

Introduction to sequences ................................................................................................................277

队列介绍

20. Berkeley DB Extensions: Tcl.............................................................................................................278

     Berkeley DB扩展:Tcl

Loading Berkeley DB with Tcl ................................................................................................................278

使用Tcl加载Berkeley DB

Installing as a Tcl Package ................................................................................................................278

Tcl包的模式安装

Loading Berkeley DB with Tcl ................................................................................................................278

使用Tcl加载Berkeley DB

Using Berkeley DB with Tcl ................................................................................................................279

Tcl中应用Berkeley DB

Tcl API programming notes ................................................................................................................279

Tcl API程序员参考

Tcl error handling ................................................................................................................280

Tcl出错处理

Tcl FAQ ................................................................................................................281

Tcl相关的FAQ

21. Berkeley DB Extensions.............................................................................................................282

     Berkeley DB扩展

 

 

 


 

 

 

 

 

 

 

 

Using Berkeley DB with Apache ................................................................................................................282

Apache中使用Berkeley DB

Using Berkeley DB with Perl ................................................................................................................283

Perl中使用Berkeley DB

Using Berkeley DB with PHP ................................................................................................................283

PHP中使用Berkeley DB

22. Dumping and Reloading Databases.............................................................................................................286

     数据库的导出

The db_dump and db_load utilities ................................................................................................................286

db_dumpdb_load工具

Dump output formats ................................................................................................................286

导出文件的输出格式

Loading text into databases ................................................................................................................287

将文本导入到数据库

23. Additional References.............................................................................................................288

     附加参考

Additional references ................................................................................................................288

附加参考

Technical Papers on Berkeley DB ................................................................................................................288

关于Berkeley DB的技术文章

Background on Berkeley DB Features ................................................................................................................288

关于Berkeley DB特性的背景

Database Systems Theory ................................................................................................................289

数据库系统理论

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值