Create tables for a dictionary?
Posted
by heffaklump
on Stack Overflow
See other posts from Stack Overflow
or by heffaklump
Published on 2010-03-19T12:22:52Z
Indexed on
2010/03/19
13:41 UTC
Read the original article
Hit count: 141
I'm making a dictionary database in SQLite and need some tips. My SQL is a bit rusty ;) Would you consider this good SQL? It's done with Java JDBC.
This is for creating the tables.
CREATE TABLE word (
id INTEGER,
entry STRING,
pos STRING
);
CREATE TABLE translation (
word_id INTEGER REFERENCES word(id),
entry STRING
);
And when filling with data i give each word a number (id) and that words translations get the same number as word_id. What would be the best way of pulling out translations for a specific word?
© Stack Overflow or respective owner