I have questions for text files!

1. What are the major differences between Random and Binary. If using Random to manipulate as a database, how can I tell the number of records in a text file?

2. For Lock, what is SHARED, LOCK READ, LOCK WRITE, LOCK READ WRITE?