best way to 'tag' a record

Startbeitrag von Joel am 24.05.2009 13:13

Hi -

I have a table that lists documents - their names, locations, etc. I want to 'tag' each document with who has the ability to use it. What's the best way?

Right now I have another table that lists the doc with it's user - so there are multiple entries of each doc if it has more than one user.

I was also thinking that I could create a field in the doc table and store the user names directly in there, separated with a space or comma or something. Then use some sort of String manipulation to find out who can use it.

I'm sure there are other approaches, but not having a lot of experience, I'm not sure which way to go. Any suggestions?


Hello Joel

Your existing method of using another file is the best way. All it needs is the primary key of the document file and the primary key of the user file and it is indexed on both fields. This would provide a list of documents available to a user and users with access to a document.
With the addition of a "transaction" type and a date field this file could be used to provide not only an access permission record but also record of issue and return of the document if required.


von Al - am 24.05.2009 16:23
Great! and I like the 'record of issue' idea too!


von Joel - am 24.05.2009 16:34
Zur Information: hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.