If you look at the database you will see there are join tables between the tables that are related. An example is accounts_contacts which contains the cantact_id and account_id for the related records. This is all handled by the underlying php framework when saving records etc
The ids are generated by the framework on save if you wanted to manually import records into the database then you would have to create the id’s your self and also create the related records in the join tables.
There is no other way than the import wizard unless you write a custom script that uses the sugar bean framework to save all the records.