I would like to create a database for synonymous and antonymous, but im not sure how to make the relationships between tables for better performance and also which index should i create.
First i thought:
table name: synonymous
id (int) primary key
name (varchar) text index
syn_group_id (int)
ant_group_id (int)
So all the synonymous will have the same syn_group_id but this is not possible as all the words dont share the same synonymous, same happens for antonymous. So im totally lost on how to do this.
I would image you could simply have a structure like this:
The synonyms and antonyms tables are simply just many-to-many join tables related to the words table.
So a sample lookup query could be: