Database and Entity Data models

Source: Internet
Author: User

Have been unclear about the relationships between the objects in the database

Now I'm starting to understand.

1. Relationships between tables and views of the first database

A view is a table that is exported from one or more tables (or views). Views are different from tables (sometimes, in contrast to views, also known as Table--base table), which is a virtual table in which the data for the view is not actually stored, only the definition of the view is stored in the database, and the underlying table associated with the view is manipulated according to the definition of the view when the data is being manipulated.

A view is a virtual table, a table that is exported from one or several basic tables (or views), and only the definition of the view is stored in the system's data dictionary, not the data that corresponds to the view.
A view is a transformation of the raw database data and is another way to view the data in the table. The view can be viewed as a moving window through which you can see the data of interest. Views are obtained from one or more actual tables in which data is stored in the database. The table that is used to generate the view is called the base table for that view. One view can also be generated from another view.
The definition of the view exists in the database, and the data associated with this definition is not stored in the database. The data you see through the view is stored in the base table.
The view looks very much like the physical table of the database, and it operates like any other table. When you modify data through a view, you are actually changing the data in the base table, and conversely, the changes to the base table data are automatically reflected in the view generated by the base table. For logical reasons, some views can modify the corresponding base table, while others cannot (can only query).

A second database and entity Data Model

A data Model (EDM) is a specification used to define data that is used by applications built on the Entity Framework. Applications that use the EDM define entities and relationships in the application domain in the design schema. The design schema is used to build a programmable class that is used by application code. The storage structure that persists application data in this model is represented by another schema, called the storage schema. The mapping specification is used to connect the design schema to the storage schema.

Because the programmable object model is generated from the design architecture and the storage schema is mapped to the design schema, the mapping specification can effectively connect the programmable class to the storage structure. An entity defined by an EDM can be read in a serialized format by a data reader, or it can be materialized as an object. Materialized objects can be programmed in the CLR language and can be updated and saved without the need for embedded SQL strings or other database syntax. The EDM provides the basic entities and relationship types used in the EDM schema and mapping specifications. Developers can extend these types as needed to support application design.

Multiple paradigms for managing data in an application all have important advantages. The storage model has been optimized to store and retrieve efficiently. XML supports data exchange across platform boundaries. Object-oriented programming is a recognized standard for developing applications. These models are useful, but to transfer data between them, you may need multiple lines of code that are not related to the application scenario.

The data model may be an analysis of a unified Modeling Language (UML) or a chart on a whiteboard. Whichever method you take, you must conceptually organize your data types, their properties, relationships between data types, constraints on data, and so on, before you can implement them in your application code. The EDM extends the model that application designers use to describe data during development, and provides XML syntax to describe the results in detail in a form.

(Self-Understanding: The Data entity model is the ability to invoke the entity model directly in VS without invoking a database connection)

Database and Entity Data models

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.