Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

loc-id-schema.sql 1.5 KB

You have to be logged in to leave a comment. Sign In
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
  1. CREATE SCHEMA IF NOT EXISTS locid;
  2. -- We cannot run more than 1 simulatneous import into this schema.
  3. -- For efficiency, the importer will dump tables and bulk-reload them.
  4. --- Nodes
  5. DROP TABLE IF EXISTS locid.nodes;
  6. CREATE TABLE locid.nodes (
  7. node_id SERIAL PRIMARY KEY,
  8. node_uuid UUID NOT NULL UNIQUE,
  9. node_iri VARCHAR
  10. );
  11. --- Authority record triples
  12. DROP TABLE IF EXISTS locid.auth_triples;
  13. CREATE TABLE locid.auth_triples (
  14. subject_uuid UUID NOT NULL,
  15. pred_uuid UUID NOT NULL,
  16. object_uuid UUID NOT NULL
  17. );
  18. DROP TABLE IF EXISTS locid.auth_literals;
  19. CREATE TABLE locid.auth_literals (
  20. subject_uuid UUID NOT NULL,
  21. pred_uuid UUID NOT NULL,
  22. lit_value TEXT NOT NULL,
  23. lit_lang VARCHAR NULL
  24. );
  25. --- BIBRAME work triples
  26. DROP TABLE IF EXISTS locid.work_triples;
  27. CREATE TABLE locid.work_triples (
  28. subject_uuid UUID NOT NULL,
  29. pred_uuid UUID NOT NULL,
  30. object_uuid UUID NOT NULL
  31. );
  32. DROP TABLE IF EXISTS locid.work_literals;
  33. CREATE TABLE locid.work_literals (
  34. subject_uuid UUID NOT NULL,
  35. pred_uuid UUID NOT NULL,
  36. lit_value TEXT NOT NULL,
  37. lit_lang VARCHAR NULL
  38. );
  39. --- BIBRAME instance triples
  40. DROP TABLE IF EXISTS locid.instance_triples;
  41. CREATE TABLE locid.instance_triples (
  42. subject_uuid UUID NOT NULL,
  43. pred_uuid UUID NOT NULL,
  44. object_uuid UUID NOT NULL
  45. );
  46. DROP TABLE IF EXISTS locid.instance_literals;
  47. CREATE TABLE locid.instance_literals (
  48. subject_uuid UUID NOT NULL,
  49. pred_uuid UUID NOT NULL,
  50. lit_value TEXT NOT NULL,
  51. lit_lang VARCHAR NULL
  52. );
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...