A simple
fraction[
^] can be defined by having a denominator and a numerator. To simplify things let both denominator and numerator be of biginteger and we will store a all our simple fractions in reduced form.
So to get started there will be a table that stores all simple fractions in reduced form:
biginteger id
biginteger denominator
biginteger numerator
Let id be an autoincrement PK and denominator and numerator form a unique index.
If you also want to have complex fractions you'll probably need to introduce expressions (as a tree).
Best Regards,
-MRB