Position: Home page » Blockchain » Blockchain database integration

Blockchain database integration

Publish: 2021-05-13 22:42:23
1. const SHA256 = require(crypto-js/SHA256);< br />class Block{
constructor(index,timestamp,data,previousHash='&# 39;)< br />{
this.index=index;< br />this.timestamp=timestamp;< br />this.data=data;< br />this.previousHash=previousHash;< br />$this.hash=this.calculateHash();< br />}

calculateHash(){
return SHA256(this,index+this.previousHash+this.timestamp+JSON.stringify(this.data)).tostring();< br />}
}
class blockchain{
constructor(){
this.chain=[this.createGenesisBlock()];<
}
/ / create a generated information block
creategenesis block() {
return new block (0, & quot; 01/01/2019",& quot; Genesis block", 0);
/ / the date is the user's data. In fact, it is the hash value obtained by adding several values together. Here, the information is encrypted and the picture is encrypted. Then the data is still stored in the database, but all the data are hash values. To get this data, you must know the hash value of the previous data block. Then, if the hacker needs to crack all the nodes, the hash value is decrypted, Then all the blocks from the first node to the last node can be decrypted to get the real data. So the security of data stored in the blockchain depends on whether the data is encrypted. If the plaintext is not encrypted, then it is not a blockchain
}
/ / get the last block
getlatesblock() {
return this.chain [this.chain. Length-1]
}
/ / create block
addblock (newblock) {
newblock. Previoushash = this. Getlatesblock(). Hash< br />newBlock.hash=newBlock.calculateHash();< br />this.chain.push(newBlock);< br />}
}
2. What's the difference between the Internet of things, blockchain and big data
in the near future, the number of devices in the Internet of things will explode, which may be hundreds of billions or trillions. If such a huge network is still managed in a centralized networking mode, the infrastructure investment and maintenance of the data center should be incalculable
in essence, big data belongs to a small branch of database, so this problem is attributed to the relationship between big data and database. Database is a very old research field in software, Internet and it. From the initial file system to ER model, to the three achievements of traditional database, which are known to all, relational model, transaction processing and query optimization, to the rise of NoSQL database after the popularity of Internet, database technology is constantly developing and changing, Then it also includes semi-structured data processing represented by XML and unstructured data processing such as text and voice

it seems that the relationship between blockchain and database is actually such a relationship. From the evolution process of database technology, we can find that it always comes from how to meet new business requirements and then create new data processing technologies. For example, from the beginning of the file system, why do we need the ER model? It is because with the development of the financial instry, people have further requirements for these fast accounting, high concurrency data writing and access, which leads to the emergence and rapid development of the entity relationship model. Why did NoSQL database appear later? It is because the rapid development of the Internet puts forward higher requirements for updating the database, so in essence we think that the whole Internet is a big database
things are always developing. Of course, after we solve the problem of massive real-time data processing on the Internet through NoSQL database and cloud storage, the next problem must come, that is, how to solve the authenticity and effectiveness of data in a large-scale way
for example, it may be related to our diet, from the problem of food and clothing at the beginning, to the problem of nutrition structure, and then to the problem of food safety that everyone is concerned about. The development of database is the same. When we can solve these problems of data storage and data access through ER entity relationship model and NoSQL database, Next, we need to care about and solve the problem of authenticity and effectiveness
so at this stage, these technologies, represented by blockchain, must be a new starting point and new requirements for the authenticity, validity, unforgeability and tamper resistance of data compared with the current database. We can clearly feel that the trend of database and blockchain integration is actually very close and irresistible, just like the movie just mentioned, the procers of content begin to develop in the direction of virtual reality and augmented reality; From the perspective of database, blockchain is a new way of data organization. We believe that big data and blockchain are integrated.
3. Chongqing jinwowo: as for how to build a rigorous database, the method of blockchain is to innovate the structure of the database, divide the data into different blocks, link each block to the back of the previous block through specific information, and present a complete set of data in sequence, which is also the source of the three words "blockchain".
4. That's ten times the survival rate he set. If you lose one, you'll get ten. It's set in the game
5. This scoring trading platform has servers, wallets,
blockchain,
and the price is not expensive. Hundreds or thousands of yuan are OK
6. No

bitcoin trading platform has many running platforms, such as mtgox in Japan, bitcoin in China and so on
therefore, investors need to choose a reliable bitcoin trading platform. The reference factors are: 1. The longer the running time, the better; 2. The bigger the instry reputation, the better; 3. The larger the team size, the better; 4. Being able to visit<

it is suggested that China choose "fire coin net", which is cooperated by Wukou School of finance of Tsinghua University. Sequoia Capital has invested 10 million US dollars; The choice of coinbase in foreign countries is an important choice for Silicon Valley banks to invest.
7. The way to distinguish Chongqing jinwowo analysis is as follows:
distinguish blockchain from ordinary database;, The main point is that the specific rules for putting data into the database are different. In other words, it can not conflict with other data already in the database. It is only added, immutable, and the data itself is locked to an owner (which can be owned). It is replicable and available. Finally, everyone agrees that the state of data in a decentralized database is compliant.
8. Big data refers to the data set that can not be captured, managed and processed by conventional software tools within a certain period of time. It is a massive, high growth rate and diversified information asset that needs new processing mode to have stronger decision-making power, insight and process optimization ability. 5V features of big data (proposed by IBM): Volume (large amount), velocity (high speed), variety (diversity), value (low value density), veracity (authenticity)
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750