class_docstr: Class implementing database connection.
  
  Example
  -------
  >>> AMPLIGRAPH_DATA_HOME='/your/path/to/datasets/'
  >>> # Initialize GraphDataLoader from .csv file
  >>> data = GraphDataLoader("data.csv", backend=SQLiteAdapter)
  >>> # Initialize GraphDataLoader from .txt file using indexer
  >>> # to map entities to integers
  >>> data = GraphDataLoader(AMPLIGRAPH_DATA_HOME + "fb15k/test.txt",
  >>>                        backend=SQLiteAdapter("database.db",
  >>>                        use_indexer=True))
  >>> for elem in data:
  >>>     print(elem)
  >>>     break
  [(1, 1, 2)]
  >>> # Populate the database with raw triples for training
  >>> with SQLiteAdapter("database.db") as backend:
  >>>     backend.populate(AMPLIGRAPH_DATA_HOME + "fb15k/train.txt",
  >>>                      dataset_type="train")
  >>> # Populate the database with indexed triples for training
  >>> with SQLiteAdapter("database.db", use_indexer=True) as backend:
  >>>     backend.populate(AMPLIGRAPH_DATA_HOME + "fb15k/train.txt",
  >>>                      dataset_type="train")
docstr: Defines SQL queries to create a table with triples and indexes to
  navigate easily on pairs subject-predicate, predicate-object.
  
  Returns
  -------
  db_schema: list
       List of SQL commands to create tables and indexes.
docstr_tok: ["Defines","SQL","queries","to","create","a","table","with","triples","and","indexes","to","navigate","easily","on","pairs","subject-predicate",",","predicate-object",".","Returns","--","--","--","-","db_schema",":","list","List","of","SQL","commands","to","create","tables","and","indexes","."]
code: def _get_db_schema(self):
      """Defines SQL queries to create a table with triples and indexes to
      navigate easily on pairs subject-predicate, predicate-object.
  
      Returns
      -------
      db_schema: list
           List of SQL commands to create tables and indexes.
      """
      if self.data_shape < 4:
          db_schema = [
              """CREATE TABLE triples_table (subject integer,
                                          predicate integer,
                                          object integer,
                                          dataset_type text(50)
                                          );""",
              "CREATE INDEX triples_table_sp_idx ON triples_table (subject, predicate);",
              "CREATE INDEX triples_table_po_idx ON triples_table (predicate, object);",
              "CREATE INDEX triples_table_type_idx ON triples_table (dataset_type);",
              "CREATE INDEX triples_table_sub_obj_idx ON triples_table (subject, object);",
              "CREATE INDEX triples_table_subject_idx ON triples_table (subject);",
              "CREATE INDEX triples_table_object_idx ON triples_table (object);",
          ]
      else:  # focusE
          db_schema = [
              """CREATE TABLE triples_table (subject integer,
                                          predicate integer,
                                          object integer,
                                          weight float,
                                          dataset_type text(50)
                                          );""",
              "CREATE INDEX triples_table_sp_idx ON triples_table (subject, predicate);",
              "CREATE INDEX triples_table_po_idx ON triples_table (predicate, object);",
              "CREATE INDEX triples_table_type_idx ON triples_table (dataset_type);",
              "CREATE INDEX triples_table_sub_obj_idx ON triples_table (subject, object);",
              "CREATE INDEX triples_table_subject_idx ON triples_table (subject);",
              "CREATE INDEX triples_table_object_idx ON triples_table (object);",
          ]
      return db_schema
  
imports: import logging
  import os
  import sqlite3
  import tempfile
  from sqlite3 import Error
  from urllib.request import pathname2url
  import numpy
  import pandas
  import tensorflow
  from ampligraph.utils.profiling import get_human_readable_size
  from .data_indexer import DataIndexer
label_desc: Use image node_id 8 for calling the SQLiteAdapter obj's underlying member method code with example usage: obj._get_db_schema() and returns: db_schema