Inserting DB Records in a .install file
I've got a .install file where I describe my database table schema. The table in question has a dozen or so pre-defined records in it that track key values, etc. I'd like to be able to insert those records as part of the install process, in the .install file rather than check whether to insert or update the record in the module that uses them. Is there a method that would allow me to do that? I attempted to describe a function in the .install file that does all of the inserts. But I got error messages that the database table didn't exist.
Alternatively, what's the proper method to determine whether a record exists in the database table or not? I know how to insert a record. I know how to update a record. I just don't know what the conditional logic should be to see if the the record exists or not and then take the appropriate action.