Database Reference
In-Depth Information
MONGODB COLLECTION = RDBMS TABLE (ENTITY AT PHYSICAL LEVEL)
An entity at the physical level is a table in an RDBMS or a collection in MongoDB. A col-
lection is a set of one or more documents. So imagine if we had a million orders, with an
example being the one from the prior section. We can store all of these orders in one Order
collection:
From my relational experience, I am used to defining what the structure would look like
first before populating it. For example, I would define the order attributes like orderNum-
ber and orderShortDescription before loading any orders. In MongoDB however, you
can define the structure and data at the same time. Having a “flexible schema” (also known
as a “dynamic schema”) means incremental changes can be made to the database structure
as easily as adding new data. Having such a flexible schema is a big advantage because it
lets us add things we might have forgotten or not known about earlier and also because we
can test different structures very easily and pick the best one.
A TTRIBUTES
An attribute is an elementary piece of information of importance to the business that iden-
tifies, describes, or measures instances of an entity. The attribute Claim Number identifies
each claim. The attribute Student Last Name describes the last name of each student. The
attribute Gross Sales Amount measures the monetary value of a transaction.
Search WWH ::




Custom Search