BedquiltDB PostgreSQL 扩展

程序名称:BedquiltDB

授权协议: MIT

操作系统: 跨平台

开发语言:

BedquiltDB 介绍

BedquiltDB 是一款开源的PostgreSQL扩展,专门用于支持jsonb数据类型的存储,并且提供相应的开放API。BedquiltDB
旨在为开发人员提供一种功能强大的工具,在项目的早期阶段,用于处理松散结构化的数据。

优点:

  • 简单开放的API

  • 支持所有编程语言

  • 支持所有SQL语句,包括约束

  • 容易从”loose schema” 模式切换到 “well defined schema”而不需要改变数据库平台。

示例代码:

Python

import pybedquilt
bq = pybedquilt.BedquiltClient(dbname='bedquilt_test')
projects = bq['projects']

projects.add_constraints({
    'description': {'$required': 1,
                    '$notnull': 1,
                    '$type': 'string'},
    'tags': {'$required': 1,
             '$type': 'array'}
})

projects.insert({
    '_id':   "BedquiltDB",
    'description': "A ghastly hack.",
    'quality': "pre-alpha",
    'tags': ["json", "postgres", "api"]
})

early_projects = projects.find(
    {'quality': 'pre-alpha'})

api_projects = projects.find(
    {'tags': ['api']})

cool_project = projects.find_one_by_id('BedquiltDB')

Node.js

var BedquiltClient = require('bedquilt').BedquiltClient;

BedquiltClient.connect('localhost', function(err, client) {
  var tools = client.collection('tools');
  tools.find({type: 'blunt'}, function(err, results) {
    console.log(results);
  });
});

SQL

select bq_insert(
  'orders',
  '{"_id": "2001515",
    "customerId": "117176",
    "items": ["orange_coat", "socks", "plastic_teeth"]}'
);

select bq_find(
  'orders',
  '{"customerId": "220011",
    "items": ["socks"]}'
);

select bq_remove_one(
  'orders',
  '{"_id": "4401515"}'
);

BedquiltDB 官网

http://bedquiltdb.github.io

相关编程语言

SchemaCrawler提供一组用于增强标准JDBC Metadata的...
ER Master 是一个用于设计ER模型图的Eclipse插件。提...
Eclipse下用于画数据库ER图的插件,主要特性如下: ...
PowerDesigner 是Sybase的企业建模和设计解决方案,...
Mogwai ERDesigner NG是一个实体关系建模工具类似于...
Power*Architect 是一个数据建模工具,主要用在数据...