Terms table.factor value.power value:
power is greater than 1, include 'X^' and the power value.power is 1, include only 'X'.power is 0, include neither 'X' nor '^'.factor, and the term representation to form the term string.GROUP_CONCAT to aggregate all term strings in descending order of power.
erDiagram
Terms {
int power
int factor
}