Skip to content

Database

What is a database?

A database stores data on kdb Insights Enterprise. Available databases are listed under Assemblies of the Overview home page. If not available, create a database, insights-demo, to store your data.

Every kdb Insights Enterprise database has a schema to transform data to a format compatible with a kdb+ database, and a stream to process event data like real-time prices.

I want to learn more about databases.
I want to learn more about schemas.

Video tutorials

Database wizard

Custom database

Schema builder

Build a database

  1. From the Overview page, choose Build a Database:

    Select a build a database.
    Select a database to activate, then deploy.

  2. Give a Database Name.

  3. Click Next
  4. This step is optional as information on data to import is required. Create four schemas for each of weather, subway, health, and crime datasets; re-naming the initial table1, and adding new schemas with [+]

    column type char type
    timestamp p timestamp
    sensor s symbol
    airtemp f float
    name s symbol
    borough s symbol
    longitude f float
    latitude f float
    color s symbol
    column type char type
    trip_id s symbol
    arrival_time p timestamp
    stop_id s symbol
    stop_sequence h short
    stop_name s symbol
    stop_lat f float
    stop_lon f float
    route_id h short
    trip_headsign s symbol
    direction_id s symbol
    route_short_name s symbol
    route_long_name s symbol
    route_desc C string
    route_type h short
    route_url s symbol
    route_color s symbol
    column type char type
    name C string
    lat f float
    long f float
    neighborhood C string
    airquality f float
    trafficcongestion f float
    bikeacccnt i integer
    caracccnt i integer
    timestamp p timestamp
    column type char type
    event_id s symbol
    incident_time t time
    nypd_precinct s symbol
    borough s symbol
    patrol_borough s symbol
    call_x_geo j long
    call_y_geo j long
    radio_code s symbol
    description C string
    crime_in_progress C string
    call_timestamp p timestamp
    dispatch_timestamp p timestamp
    arrival_timestamp p timestamp
    closing_timestamp p timestamp
    latitude f float
    longitude f float
  5. Review the schema partitions; these are set automatically to the timestamp column, but in the case of multiple timestamp columns to select from, choose one:

    setting value
    Type partitioned
    Partition Column timestamp
    Timestamp Column timestamp
    setting value
    Type partitioned
    Partition Column arrival_time
    Timestamp Column arrival_time
    setting value
    Type partitioned
    Partition Column timestamp
    Timestamp Column timestamp
    setting value
    Type partitioned
    Partition Column arrival_timestamp
    Timestamp Column arrival_timestamp
  6. Click Next

  7. Review your database.

    Review the starter database with schemas.
    Review the starter database with schemas.

  8. Save and then deploy.

I want to learn more about databases.

Deploy a database

Data is stored in an active database. Select the database created previously or the pre-made insights-demo. Deploy the database to activate it, so it can receive data.

Select a database to activate, then deploy.
Select a database to activate, then deploy.

Activating a database starts a series of processes to prepare the database.

Deploying a database runs a series of processes.
Deploying a database runs a series of processes.

item description
Mount When a database is mounted, it is available for use. Mount(s) can be an hdb, idb or rdb.
Storage Database is ready to store data.
Data Access Data stored on the database is ready to be queried.
Stream Database is ready to receive event data; e.g. real-time prices.
Pipeline Data pipelines (if any) associated with the database are now active.

Active databases

Active databases will show a green circle with a white tick. Databases receive and store data when active.

An active database
An Active database.

Add data to database

Next, add data to the active database.

Guided Walkthrough

Guided Walkthrough has a ready-made database, insights-demo, with data schemas for the working examples. Deploy to activate it.