Querying the database via a url and displaying the results? Some background context:
I have created a custom form, which inserts data into several tables when submitted. In fact, five new records are created in the node table on submit. A new record is also created in several other other tables, which are all related to these five newly created records in node. One of these node records is the root of everything: from the nid you can access all the related records

The aim:
Now, I'd like to be able to enter a url, like example.com/record/1, and for the '1' to be used as the nid from which to get this root node record from the database, and all its related records, and to display it all on a page.

The question:
How can I do this? I have looked into node_load and menu_get_object, but I can't find any documentation which describes the process of querying the database, using information in the submitted url, and displaying the results on a page.

Thanks
Direct answer to your question - you can get the parameter from the query string a number of ways:


use the arg() command (not recommended as best practice)
use the $_GET string, provided by PHP
use drupal_get_query_parameters


Any of these methods would get you the nid from the query string (in your example, 1) - you could then us db_query or node_load to load the data for this record and output it as desired but thats too much work. 

Much easier way to do this is to use the views module and add a contextual filter. Setup a basic view and then configure however you like (ex - display full node / teaser or views, etc). Set the path to 

record/%


where the percent sign indicates a variable you are going to pass to the contextual filter. Next, under advanced options


select 'contextual filters' and 'add'
search for and add one of type 'content: nid' 
on the next screen choose 'provide a default value' of type 'raw value from url', then select the url argument you want to use which in your case is '2'


Views will handle the querying for you and take care of sanitizing the input, and dealing with the output on the way.