I'm going to use this **broken link removed** site as an example of not necessarily what you want to do, but it introduces a technology. The technology is the iButton. Unfortunately, this lock only accepts one user.
The ibutton is basically a 2 wire (commonly called 1-wire because they don't include ground) which is programmed with a unique serial number. I THINK it's like 128 bits/
So, yea you need some sort of database management and security and in this case, a way to supply power when the batteries get depleated.
It does require physical contact.
So, the trick is in all cases is a database for who has access and it falls under the category of an "access control system".
So, here's a simple scenareo:
Many user keys
A key that puts th lock out of service
A key that puts the lock in service
An Add key
A delete key
A programming key
Lets say some lights, externally powered for now and lets say it's a washer.
If the washer is broken, you can take it out of service. when it's fixed, you can brig it back into service.
If you have to add a user, you use the add.user key and then read the next key. That user is added. The time/date of the new key is logged.
If you want to delete a user and you "have the key" you use the "delete key".
We have not used the "programming key yet". What that might do is give you access say via USB, Ethernet, WIFI or whatever. The "port" could be visible, but not connected during normal use.
When you add a key, the time stamps are available, so you can associate a user with the key. You do that association with a PC connected to the lock. USB serial port or even HTML. A lot depends on how many users. A 1000 users requires something diffferent.
Access restrictions would be set up..
You would also have the ability to reove a user when you didn't have the key returned. You could read keys.
I was involved with an early RFID based lock system. A credit card PCB with antennas on them and a small active electronics that fit in a milled recess covered with plastic on both sides. It would activate early store anti-theft systems. There was a door controller that handled multiple doors with a coax and lock strike power to the door.
At the "secure location" a printer, terminal, controller and dual cassette tape were located. Every access printed on the terminal and access rules were entered on the terminal and stored on the cassette tape. The system could be set to fail-safe or fail-secure. In the fail-safe mode any card would allow access. The cards had a pre-printed code on them, so if they were lost they could be associated with the user.
You didn;t have to take the card out of your wallet. You just had to wave it (wave you wallet) across where the hidden receiver was or back your butt onto it.
The iButton technology is use din reverse, for guard walk-arounds. The buttons are placed in the locations where the guard has to do his rounds.
Then you have magnetic stripe cards and the old master key type systems.