Week 7 - CTS 363
Comparing MongoDB and MySQL:
Relational databases use tables with rows and columns to organize data. SQL is used to write and run queries. MongoDB stores files in JSON documents. Both support indexing however MongoDB avoids joins and used embedded documents instead. Relational databases using foreign keys and joins to link data across tables. MongoDB also only allows atomic operations, which must be fully completed or stopped all together. A system like inventory or banking would benefit from a relational database since the data needs to be structured and many relationships exist. MongoDB could be chosen when data can differ greatly between documents and efficiency is key.
Comments
Post a Comment