Blockchain technology is necessary for smart contracts to function because it enables automated agreements to be conducted and carried out without the involvement of a third party.
Similar to smart contracts, database systems can have self-executing components such as triggers and stored procedures. Still, they cannot enforce immutability because anyone with administrator rights can undo any transaction, purge transaction logs, etc., and make it appear like it never happened. As a result, blockchain will always be required for smart contracts that need to be safe and tamper-proof. Unfortunately, complicated smart contracts are not supported by Bitcoin, the most popular cryptocurrency.