Skip to content

Instantly share code, notes, and snippets.

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う

@akimichi
akimichi / adl.json
Created April 22, 2012 11:39
body-mass-index-archetype.json
"definition" : { "CComplexObject" : {
"occurrences" : { "Interval" : { "type" : "Integer", "lower" : 1, "upper" : 1, "lowerIncluded" : true, "upperIncluded" : true } },
"attributes" : [
{"CSingleAttribute" : {
"anyAllowed" : false, "path" : "/data",
"rmAttributeName" : "data",
"existence" : "REQUIRED",
"children" : [
{"CComplexObject" : {
"occurrences" : { "Interval" : { "type" : "Integer", "lower" : 1, "upper" : 1, "lowerIncluded" : true, "upperIncluded" : true } },
@akimichi
akimichi / lambda.scala
Created April 23, 2012 07:06
lambda.scala
// c.f. "Matching Objects With Patterns",p.19
object lambda {
//Class hierarchy
trait Term[a]
class Var[a] (val name : String) extends Term[a]
class Num (val value : Int) extends Term[Int]
class Lam[b, c] (val x : Var[b], val e : Term[c]) extends Term[b => c]
class App[b, c] (val f : Term[b => c], val e : Term[b]) extends Term[c]
class Suc () extends Term[Int => Int]
// Environments:
@akimichi
akimichi / maven.vim
Created April 23, 2012 10:45 — forked from schmmd/maven.vim
vim maven compiler file
" Compiler: maven
" Author: Michael Schmitz <michael@schmitztech.com>
" Last Change: 10/27/2011
if exists("current_compiler")
finish
endif
let current_compiler = "maven"
set makeprg=mvn\ clean\ compile
sealed trait HList {}
final case class HCons[H, T <: HList](head : H, tail : T) extends HList {
def ::[T](v : T) = HCons(v,this)
override def toString = head + " :: " + tail
}
final class HNil extends HList {
def ::[T](v : T) = HCons(v,this)
override def toString = "Nil"
}
object HList {
@akimichi
akimichi / gist:2625850
Created May 7, 2012 04:08
family.scala
trait Family {
type M <: Mother
type F <: Father
type C <: Child
class Father ( val name: String ) {
def kiss (m:M) =
println ( "Showing signs of affect ion towards " + m.name)
}
class Mother ( val name: String )
class Child ( val name: String ) {
<match mongo.**>
type mongo
database fluent
collection log
# Following attibutes are optional
# host fluenter
# port 10000
# Set 'capped' if you want to use capped collection
@akimichi
akimichi / XPathParser.scala
Created July 11, 2012 23:47 — forked from honnix/XPathParser.scala
simple xpath alike parser in scala combinator
// _[@type=="baoc" and ts10[@value=="1" and a==2] and ts20]
package com.honnix.xml.transformer
import scala.xml.NodeSeq
import scala.util.parsing.combinator.JavaTokenParsers
object XPathParser {
def apply(conditionalPath: String, topSelector: (NodeSeq, String) => NodeSeq) =
new XPathParser(conditionalPath, topSelector)
@akimichi
akimichi / Reader.scala
Created August 28, 2012 14:53 — forked from blouerat/Reader.scala
Reader Monad
/*
Based on the first part of the talk "Dead-Simple Dependency Injection in Scala" by @runarorama at NEScala 2012
http://marakana.com/s/dependency_injection_in_scala,1108/index.html
*/
class Connection {
def prepareStatement(query: String) = new Statement()
}
class Statement {
@akimichi
akimichi / .gitignore
Created September 2, 2012 14:37
.gitignore for sbt project
*~
.emacs.desktop*
target/