I am designing a database on a logical level to later pass it on for programmers to deliver. I am only superficially familiar with how they work, so I am struggling to phrase my problem succintly. Here's my problem:
I have a table named MEANINGS.
I have a table named WORDS.
I have relational table named M-to-W.
I have a table named GRAMMAR.
Words can have multiple meanings, meanings can have multiple words. But I also wanna add grammar. I could just add a row in WORDS, but sometimes a word behaves differently depending on meanings (like the past tense is “He hanged himself” for suicide and “He hung a picture on the wall” for putting). Hence, I see two solutions on a logical level:
- GRAMMAR could be linked with the M-to-W relational table with another relational table, referencing entire relationships (certain meanings of certain words have specified forms).
- GRAMMAR items could be referenced by M-to-W in additional row.
I have only created relational databases with Django/MariaDB (pretty much automatically), so I don't know if these can have more than two columns. I don't know if referencing pairs of properties is possible.
Is any of these solutions possible, or is there a better practice to handle this kind of structural problem? Is using composite keys easier? Please assume keeping words and meanings in separate tables is necessary.