amazon simpledb分析
2011-04-21 17:22
204 查看
simpledb功能: 自动index; schemaless; 零管理成本; 高可用保证; 提供给应用读一致性选择接口; 扩展性(应用可以将数据切分到多个domain上,可见一个domain无法切分); fast simple to use designed for use with other aws secure (提供https) inexpensive simpledb数据模型: domains:类似一个table。 具有接口CreateDomain/DeleteDomain/ListDomains/DomainMetadata。 domain limit:最大10G,不超过1 billion的属性,每个user有250个domain。 Items:类似row。 表现为一个独立的对象包含一组attributes,每个item不超过256个属性对。 Attributes/Values: 类似column/cell。 value不超过1024bytes。attribute是以key/value组合作为唯一的,即相同的key可以有多个值。 PutAttributes/BatchPutAttributes/DeleteAttributes/BatchDeleteAttributes/GetAttributes/selectsimpledb部分接口说明:条件put: 例:https://sdb.amazonaws.com/?Action=PutAttributes&DomainName=MyDomain&ItemName=JumboFez&Attribute.1.Name=state&Attribute.1.Value=fuzzy&Attribute.1.Replace=true&Attribute.2.Name=VersionNumber&Attribute.2.Value=31&Attribute.2.Replace=true&Expected.1.Name=VersionNumber&Expected.1.Value=30 Expected:Expected.1.Name=VersionNumber&Expected.1.Value=30,满足key/value相等条件才可更新,可以认为提供了行事务性质,通过此来实现CAS的并发控制。 Replace=true:替换整个该key对应的一个或多个属性。
条件删除:语法类似put。
select语法:
select [code]output_listfrom
domain_name[where
expression][
sort_instructions][limit
limit] [/code]
expression有如下形式:<select expression> intersection <select expression>NOT <select expression>(<select expression>)括号表达式<select expression> or <select expression><select expression> and <select expression><simple comparison>comparison支持=,!=,大小比较,like,not like,between,in,is null,is not null,every()。every指每个keyword需要满足某条件。注意:系统以字符串形式比较,对于数值大小比较,则需要在前面填充0一致性保证: 读时可指定eventually还是consistent。这种consistent并不代表副本之间的一致性关系,而是代表反应给用户看到的一致性关系。这是有差别的,从amazon的文档看出consistent read保证读到的是最新的数据,这有很多做法,如另外有个最新数据的patch,对于consistent read,则需要访问最新数据的patch,eventually则不需要,写时写到patch就算成功,patch再完成向各副本的数据分发。如何实现自动index呢: 猜测simpledb是基于列存储的,类似inforbright。
相关文章推荐
- Amazon S3 & Simpledb内部实现分析
- Amazon云产品介绍(2) - Amazon SimpleDB
- java操作SimpleDB amazon 亚马逊数据库
- Programming Amazon Web Services: S3, EC2, SQS, FPS, and SimpleDB
- 使用 Amazon SimpleDB 进行云存储
- Amazon SimpleDB (一) 简介
- Using the Java Persistence API with Amazon SimpleDB
- Amazon SimpleDB (二) 使用
- ADO.net DataTable 和Amazon SimpleDB的相互转换
- DB/DC计划模式比较分析
- starrydb性能分析-Starrydb performance analysis
- Zend Framework教程之Zend_Db_Table_Row用法实例分析
- Amazon开发技术图书春季排行榜观察与分析
- [DB][Oracle]关于分页写法的性能分析及ROWNUM的补充说明
- sys.dm_db_index_physical_stats函数分析索引-游标
- 阿里云PolarDB及其共享存储PolarFS技术实现分析(上)
- AsimpleCache源码分析
- 在Amazon AWS部署运行S2JH,IO次数异常分析
- Simple JavaScript Inheritance 源码分析
- perl LWP::Simple分析土豆视频点击量