Patent attributes
Enclosed are a method and apparatus for operating a database. The method includes: performing, in response to determining a user indicated by a user identifier having a permission to operate on data targeted by a database operation statement, a digital signature on the database operation statement using a user private key to obtain signature information, generating transaction information according to the database operation statement, the signature information and the user identifier, and storing the generated transaction information into a local transaction information buffer pool; and selecting, in response to competing for a transaction information block recording permission using a preset consensus algorithm, transaction information in the local transaction information buffer pool to generate a block, parsing and executing a database operation statement in each piece of selected transaction information, concatenating the generated block to a local blockchain, and broadcasting the generated block to other database servers.