Org-roam uses a database, but it is not fully database-based. It only stores the mapping relationships between IDs in the database, but the content itself is not stored in the database.
However, org-supertag is database-based, storing both the content and the relationship mappings in the database.