V
V
Vi Vola2018-08-11 07:56:20
PostgreSQL
Vi Vola, 2018-08-11 07:56:20

PostgreSQL, how to make references to other fields?

I must say right away that I worked very little on the database, and the questions will be stupid. (Already searched on the Internet)
Essence of the question:
There is a table

id   name      content
1    слово1   описание слова
2    слово2   описание слова
3    слово3   описание слова
..     ...           ...

I need to find word1 in the description of other words, and if this word is found, then make a link to this word (for example, word1 -> word2).
Initially, I thought that it would be possible to create another column with the array type and add an id there. But I think this is wrong. I found things like one-to-many binding, but didn't quite understand how to apply it to my case.
I will be happy with examples.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2018-08-11
@hakain

array column or full-text index on content, "one-to-many binding" - overhead

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question