I have a table (X) with 10 columns, 6 of which are nullable foreign keys (bigint data type) and in every row 5 of them will be NULL.
SOLUTION: Divide table (X) into 2 tables: (X) and (XType) so that (X) includes a big int column (not foreign key) for insert one of six ID
and a XType_id
column for determining types of 6 data.
Is this solution optimal or the first table with 10 columns is better?