MongoDB and relational database comparisons, from the database design phase

Source: Internet
Author: User
Tags mongodb oracle database powerdesigner

1 relational databases such as Oracle, database design

The first step: to create a PDM as a physical data model through tools such as PowerDesigner (there should be a CDM, but the CDM design process can be omitted in the general development)

Step two: Import PDM into the Oracle database and generate the database tables. The table has a clear field .

The database design is complete.


2MONGODB Database, database design

The first step: through the PowerDesigner and other tools, create CDM or PDM can, this model actually does not have any use, the function has two points:

1) The total number of collection is the collection. 2) The business relationship between the data.

Only after this step, the database design is complete. (You need to create a collection in the previous model in MongoDB with visual management tools such as Robomongo). No, No. the database in MongoDB and databases, collection and collection are all added through the Web engineering program of Java EE. )


3 Summary:

1) that is, for programmers, the use of MongoDB means that there is no database , all fields (that is, the MongoDB document key) in the program is the Java EE Web Project control.

Summary of the SUMMARY:

In other words, relational databases like Oracle have only one point to be compared to MongoDB:

Using relational database such as Oracle to develop the Web project of Java EE, we should follow the database table and tables;

The use of MongoDB database development of Java EE Web project, can not be affected by the database, because MongoDB there is no database table field.

Since MongoDB does not have a database table field, then it is necessary to use an entity class like the Hibernate framework for the Web project of Java EE.

It is necessary to use entity classes to simplify database operations (such ORM frameworks have Morphia, etc.).

So:

MongoDB Database tables and table fields, in the Java EE Web project, in the code .

Tables and table fields of the relational database, on the database side .



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.