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

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

Comments

Loading...