blog




  • Essay / MySQL vs MongoDB, a NoSQL database and coding - 996

    Introduction. The introduction of the computer has dramatically changed our lives in a very short period of time. Originally, computers were designed to help a person calculate numbers and today, a computer makes it possible to store huge amounts of information in a small space, easily calculate math problems, and communicate with other people via social networks. Between the 1960s and 1970s, different types of databases appeared to satisfy the need for data storage and retrieval. in an organized and coherent manner. The growing needs of the industry and the huge amount of data collected by software are becoming a real problem for businesses/organizations today as storage technologies do not advance and do not work as expected. data that needs to be organized, analyzed and stored in databases accessible by multiple users/applications at the same time. The databases are also prepared to retain all stored data in the event of an outage or disaster. The purpose of this report is to compare two different databases, a relational database like MySQL, considered a well-defined concept and based on a solid and mature foundation. theory, with MongoDB the most popular NoSQL database defined as a new concept of database used for complex queries (ability to handle unrelated and unstructured data very quickly). This report will include: • Presentation of transaction management theory • Brief introduction to the two databases. • Analysis of recovery and competition • Advantages and disadvantages • Brief conclusion. ..... middle of paper ......mmit the current transaction and start a new transaction.Here is some simple test code on the default transaction: Output: Observe that:• How InnoDB is specified as the engine of storage for the table.• How to disable the auto-commit flag.• How uncommitted changes can be rolled back.• Uncommitted changes are rolled back at the end of the session.Here is another simple test code on other transactions than the default ones: Output: Note that: • "jack" is in the table because the previous commit statement terminates the transaction other than the default one. The insert instruction on "jack" is automatically validated. • “user1” and “user2” are in the table because transactions cannot be nested. A "start transaction" statement commits the changes and terminates the current transaction. • "user4" is in the table because the previous rollback statement terminates the non-default transaction..