create table num (
num integer not null primary key,
roman text not null
);
create table lang (
id text not null primary key,
lng text not null
);
create table num_lang (
id_num integer not null references num,
id_lang text not null references lang,
txt text not null,
--
unique(id_num, id_lang)
);
create index ix_num on num(roman);
pragma foreign_keys = on;
insert into num values (5, 'V' );
insert into num values (7, 'VII' );
insert into num values (4, 'IV' );
insert into num values (2, 'II' );
insert into num values (9, 'IX' );
insert into lang values ('en', 'English');
insert into lang values ('de', 'German' );
insert into lang values ('fr', 'French' );
insert into num_lang values (7, 'en', 'seven' );
insert into num_lang values (7, 'de', 'sieben');
insert into num_lang values (9, 'fr', 'neuf' );
insert into num_lang values (9, 'de', 'neue' );
insert into num_lang values (2, 'de', 'zwei' );
The entire database is exported with the .dump command
sqlite3 db .dump > db.dump
Import the database
The database can easily be imported because .dump exported the database as SQL statements:
sqlite3 db < db.domp
Export file
For completness' sake, the dump file that was produces is:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE num (
num integer not null primary key,
roman text not null
);
INSERT INTO num VALUES(2,'II');
INSERT INTO num VALUES(4,'IV');
INSERT INTO num VALUES(5,'V');
INSERT INTO num VALUES(7,'VII');
INSERT INTO num VALUES(9,'IX');
CREATE TABLE lang (
id text not null primary key,
lng text not null
);
INSERT INTO lang VALUES('en','English');
INSERT INTO lang VALUES('de','German');
INSERT INTO lang VALUES('fr','French');
CREATE TABLE num_lang (
id_num integer not null references num,
id_lang text not null references lang,
txt text not null,
--
unique(id_num, id_lang)
);
INSERT INTO num_lang VALUES(7,'en','seven');
INSERT INTO num_lang VALUES(7,'de','sieben');
INSERT INTO num_lang VALUES(9,'fr','neuf');
INSERT INTO num_lang VALUES(9,'de','neue');
INSERT INTO num_lang VALUES(2,'de','zwei');
CREATE INDEX ix_num on num(roman);
COMMIT;