File: mysql-v1.ttl

package info (click to toggle)
redland 1.0.17-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 8,780 kB
  • ctags: 4,263
  • sloc: ansic: 37,638; sh: 12,115; perl: 2,590; xml: 807; makefile: 587
file content (62 lines) | stat: -rw-r--r-- 1,717 bytes parent folder | download | duplicates (4)
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
62
#
# Redland MySQL storage schema - MyISAM
#
# 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 V1 MyISAM";

  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=MyISAM 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),
  FULLTEXT KEY Value (Value)
) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM DELAY_KEY_WRITE=1
""";

.