Registration submission

Can any one help for the procedures of saving elgg registration details into data base.

From actions/register.php after doing validations what will be the next step to save it in database

which library function is responsible for doing this with SQl query ?

Is there any graphical modules available regarding the explanation of elgg coding and process structure of each modules ?