Anytime you need to put restrictions on data you should seek to leverage the security system to accomplish your goal first.
In privilege set permissions you can CRUD restrict down to the record level in most cases.
Thank you for your reply. I am aware of how to set editing / viewing privileges for a User through the Manage / Security settings.
What I'm trying to achieve is a script that would in essence do the same thing, but on a record-by-record basis, and one that would not require a person with administrative rights to manually adjust the Security settings.