Storing RFID info for multiple chips - grouped by identifier

Hi all,

I want to make an RFID system for a building each apartment having several RFID chips. I want to group each apartment's RFIDs. I have checked the Arduino DB and the EDB libraries, but they seem to use only one table. I need two tables - one with apartment number+other info and the other with apartment number and rfid. This is at least how I see it.

Is there another way of doing this?

(deleted)

Each apartment might have multiple different RFID keys.

(deleted)

Well then I find it difficult to check IDs -

for (recno = 1; recno <= apartments; recno++)
{
db.readRec(recno, EDB_REC logEvent);
if (logEvent.rfid1 == rfid)
{
if (logEvent.status == valid)
{
unlock();
}
}
else if (logEvent.rfid2 == rfid) {

}
else if (logEvent.rfid3 == rfid) {

}

else if (logEvent.rfid10 == rfid) {

}
}

If I make it with 10 columns and not every apartment have 10 chips - will I use unnecessary space?

I was also thinking for making lines repeat the apt.number - and not have the additional info(family, etc), but will also need to loop many lines when I try to disable all chips for particular apt.