MariaDB Enterprise Spider Schema Design
Learn about the schema design of the Spider storage engine.
Create Tables
Create Tables in a Federated Topology
CREATE SERVER hq_server
FOREIGN DATA WRAPPER mariadb
OPTIONS (
HOST "192.0.2.2",
PORT 5801,
USER "spider_user",
PASSWORD "password",
DATABASE "hq_sales"
);
CREATE DATABASE spider_hq_sales;
CREATE TABLE spider_hq_sales.invoices (
branch_id INT NOT NULL,
invoice_id INT NOT NULL,
customer_id INT,
invoice_date DATETIME(6),
invoice_total DECIMAL(13, 2),
payment_method ENUM('NONE', 'CASH', 'WIRE_TRANSFER', 'CREDIT_CARD', 'GIFT_CARD'),
PRIMARY KEY(branch_id, invoice_id)
) ENGINE=Spider
COMMENT='server "hq_server", table "invoices"';Create Tables in a Sharded Topology
Connection Options
Option
Data Type
Definition
Last updated
Was this helpful?

