Feb-20-2017, 08:28 PM
It is a straight forward procedure in any relational database management system that I have worked with to unload a complete schema to external files.
I don't know how to do this in MySQL, here's how it's done in sqlite3, MySql will have some sort of dump program
The database is one of mine:
a simple procedure to reload in sqlite3.
I don't know how to do this in MySQL, here's how it's done in sqlite3, MySql will have some sort of dump program
The database is one of mine:
sqlite3 StockMktDb sqlite> sqlite> .output StockMktDb.sql sqlite> .dump sqlite> .quitpartial results:
Output:PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE ASXListed ( CompanyName VARCHAR, AsxSymbol VARCHAR, GicsIndustryGroup VARCHAR);
INSERT INTO "ASXListed" VALUES('Company name','ASX code','GICS industry group');
INSERT INTO "ASXListed" VALUES('MOQ LIMITED','MOQ','Software & Services');
INSERT INTO "ASXListed" VALUES('1-PAGE LIMITED','1PG','Software & Services');
INSERT INTO "ASXListed" VALUES('1300 SMILES LIMITED','ONT','Health Care Equipment & Services');
INSERT INTO "ASXListed" VALUES('1ST AVAILABLE LTD','1ST','Health Care Equipment & Services');
INSERT INTO "ASXListed" VALUES('333D LIMITED','T3D','Food, Beverage & Tobacco');
However, that aside, once a database has been dumped to .sql files, it'sa simple procedure to reload in sqlite3.
sqlite3 newdb sqlite> .read StockMktDb.sqlThat's all there is to it