This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-17. For the latest, interactive version please visit https://mariadb.com/kb/.

Connect Storage Engine

Hi

Can i store multiple file types(txt,csv,xml,xls,etc.) in a single table using Connect Storage Engine.

Basic idea is want to store structured and unstructured data.

If yes , can you help me out giving some examples. Your help will be greatly appreciated.

Regards, Suneel Y.

Answer Answered by Olivier Bertrand in this comment.

Of course, you can do it using the TBL table type, for instance:

CREATE TABLE t1 ( a INT NOT NULL, message CHAR(10) NOT NULL) ENGINE=connect TABLE_TYPE=XML;;

CREATE TABLE t2 ( a INT NOT NULL, message CHAR(10) NOT NULL) ENGINE=connect TABLE_TYPE=BIN;

CREATE TABLE t3 ( a INT NOT NULL, message CHAR(10) NOT NULL) ENGINE=connect TABLE_TYPE=CSV;

CREATE TABLE total ( a TINYINT NOT NULL, message CHAR(20) NOT NULL) engine=CONNECT table_type=TBL table_list='t1,t2,t3';

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.