Forum Moderators: phranque
The most flexible way would be to have one table with two columns: UserName and FileName
so if user Foo had two files: Bar1 and Bar2 it would be stored as
UserName FileName
-------- --------
Foo Bar1
Foo Bar2
select FileName from [tablename] where UserName='Foo'
The single table I described above is probably the best way of storing the relationships between users and files.
If you need to store more user information then JOIN the table above to a separate User table in the SQL query.