As others have said, records are handled by individual Parishes. In the case of a Parish closing or being consolidated, the records would usually be moved to the next nearest Parish.
As far as I know, the Diocese only tracks numbers (total numbers of registered Catholics per Parish, and other demographic types of things).
This setup usually works well, but it has its challenges. I recently had a heck of a time (as an RCIA coordinator) trying to help somebody get their Baptismal record from a small Parish in Bolivia. She was Baptized as an infant, but had not continued in the faith. Decades later she went through the RCIA program and was prepared for Confirmation and First Eucharist, but was unable to produce the Baptismal certificate.
We ended up having to get a signed affidavit from her mother certifying that she had witnessed her daughter’s Baptism, with the details thereof, and they all had to certify that she had received none of the other Sacraments. With that, the Diocese allowed her to move forward and receive.
So decentralized record-keeping is usually very logical and efficient for an organization as big as the Catholic Church, but it is prone to these kinds of occasional difficulties ;). Believe me, there is no central database at even the Diocese level, at least not at any that I’ve dealt with. There’s certainly no central database at the Vatican!