Why use flat files?
If you use a database you can have a unique ID for each customer in a customer table. A film table that holds a a unique film ID and the title and then a Rental table which would hold a record for each rental. Each rental record would contain a unique rental ID (just for primary key purpose), store the user id, and the film id that was rented. This could be extended to store date issued and issue length etc. Flat files are not really flexible or fast enough for this kind of system