Exporting the model diagram to SQL