I exported the sales_flat_order table and uploaded it to phpmyadmin where I wanted to create a FK with customers table as sales_flat_order does have a customer_id column, although some values show as null but the less. The linking to FK failed with the typical error "cannot add or delete foreign key etc". So I wanted to see what the customer_id values looked like and on doing this:
select customer_id from sales_flat_order
as it shows a lot of NULLS it fails in linking to customers table, but I need that link in order to be able to relate customers to their orders. Unless there is other way.