File: mysql-v2.ttl

package info (click to toggle)
redland 1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 27,592 kB
  • ctags: 12,328
  • sloc: ansic: 79,017; xml: 25,115; sh: 10,162; yacc: 5,985; lex: 3,682; makefile: 3,260; perl: 2,814; cpp: 59
file content (61 lines) | stat: -rw-r--r-- 1,687 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Redland MySQL storage schema - InnoDB
#
# Turtle with variable substitution
#

@prefix mysql: <http://schemas.librdf.org/storage/mysql> .
@prefix dbconfig: <http://schemas.librdf.org/2006/dbconfig#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

mysql:
  rdfs:label "Redland MySQL Schema V2 InnoDB";

  dbconfig:createTableStatements """
CREATE TABLE IF NOT EXISTS $(STATEMENTS_NAME) (
  Subject bigint unsigned NOT NULL,
  Predicate bigint unsigned NOT NULL,
  Object bigint unsigned NOT NULL,
  Context bigint unsigned NOT NULL,
  KEY Context (Context),
  KEY SubjectPredicate (Subject,Predicate),
  KEY PredicateObject (Predicate,Object),
  KEY ObjectSubject (Object,Subject)
) ENGINE=InnoDB DELAY_KEY_WRITE=1 MAX_ROWS=100000000 AVG_ROW_LENGTH=33
""";

  dbconfig:createTableLiterals """
CREATE TABLE IF NOT EXISTS Literals (
  ID bigint unsigned NOT NULL,
  Value longtext NOT NULL,
  Language text NOT NULL,
  Datatype text NOT NULL,
  PRIMARY KEY ID (ID)
) ENGINE=InnoDB DELAY_KEY_WRITE=1 MAX_ROWS=100000000 AVG_ROW_LENGTH=44
""";

  dbconfig:createTableResources """
CREATE TABLE IF NOT EXISTS Resources (
  ID bigint unsigned NOT NULL,
  URI text NOT NULL,
  PRIMARY KEY ID (ID)
) ENGINE=InnoDB DELAY_KEY_WRITE=1 MAX_ROWS=100000000 AVG_ROW_LENGTH=63
""";

  dbconfig:createTableBnodes """
CREATE TABLE IF NOT EXISTS Bnodes (
  ID bigint unsigned NOT NULL,
  Name text NOT NULL,
  PRIMARY KEY ID (ID)
) ENGINE=InnoDB DELAY_KEY_WRITE=1 MAX_ROWS=100000000 AVG_ROW_LENGTH=33
""";

  dbconfig:createTableModels """
CREATE TABLE IF NOT EXISTS Models (
  ID bigint unsigned NOT NULL,
  Name text NOT NULL,
  PRIMARY KEY ID (ID)
) ENGINE=InnoDB DELAY_KEY_WRITE=1
""";

.