Hotspot-Check for unique mac address & send to login.html

Hello, I am new to mikrotik and need some help.

I need to create a hotspot that will check the mac address of the device connected and if it doesn’t exists in its database then send it to an external login page where a form with personal details will be submitted.

Does Mikrotik have it’s own database that we can access and write? or do I have to setup and host a database externally?

Thanks in advance