Transformation rules from E-R model to relational model:
1. Two-way connection conversion rules
(1) Conversion of entity type
Convert each entity type into a relational pattern, the attributes of the entity are the properties of the relationship, and the entity identifier is the key of the relationship.
(2) Conversion of contact type
aThe relationship between entities is 1:1. You can add the key of the other relational pattern and the attribute of the connection type to the attribute of the two entity types converted into any of the two relational patterns.
The relationship between b entities is 1:N. Then, the keys and attributes of the relationship pattern converted into the N-end entity type are added to the relationship pattern converted into the N-end entity type.
cIf the connection between entities is M:N, the contact type is also converted into a relational pattern, and its attributes are keys of the entity types at both ends plus attributes of the contact type, and the keys are a combination of the entity keys at both ends.
The conversion rules of two and three-way connections
(1)1:1:1 You can add the keys of the other two relationship modes (as foreign keys) and the attributes of the contact type to any of the three relationship modes converted into by the three entity types.
(2) 1:1:N adds two keys of the 1-end entity type (as foreign keys) and attributes of the contact type to the relationship mode converted into the N-end entity type.
(3)1:M:N also converts the contact type into a relational mode, its attributes are the keys of the M-terminal and N-terminal entity types (as a foreign key) plus the attributes of the contact type, and the keys are a combination of the M-terminal and N-terminal entity keys.
(4) M:N:P also converts the contact type into a relational pattern. Its attribute is a key of the three-end entity type (as a foreign key) plus the attribute of the contact type, and the key is a combination of the three-end entity keys.
The basic concept of relational model of database design and ER model (Chapter 2)
Basic terms of relational model Definition: A data model that uses a two-dimensional table to represent entity sets, and a data model that uses key codes to represent the connection between entities is called a relational model. Sometimes it is also accustomed to call relationships as tables or tables, tuples are rows (Rows), and attributes are columns. The number of attributes in a relationship is called "metanumbers", and the number of tuples is called "...
Introduction to Database Systems—From E-R Model to Relational Model
E-R model and relational model are both abstract logical representations of real-world abstraction. E-R model is not directly supported by DBMS, and is more suitable for modeling the real-world. Relational model is a data model directly supported by DBMS. Basic Elements in the E-R graph include entity sets, contact sets, attributes, elliptical frames...
Database system principle—ER model and relational model
Original link: /haovip123/article/details/21614887 I still remember the feeling of reading the book of heaven when I first read it, and it was in the clouds and fog: now...
Database—Database Design Transformation from E-R graph to relational model
1. Convert the following E-R diagrams of material management into a relational mode: Conversion principle ⒈ Convert an entity type to a relational mode. Properties of the relationship: Properties of the entity type: Code of the entity type ⒉ Convert an m:n connection into a relational mode (preliminary, may be adjusted later). ...
E-R entity relationship model of database
E-R diagram, also known as Entity Relationship Diagram, provides methods to represent entity types, attributes and connections, and are used to describe the conceptual model of the real world. 1. Representation method E-R is a conceptual structure model that describes the real world...
【SQL】Relational database concept, data model and relational model
1. Relational database Currently, relational databases are the mainstream of database applications, and the data models of many database management systems are developed based on relational data models. 1) Relational database: In a given application field, the set of connections between all entities and entities constitutes a relational database. 2 ...
Transformation from E-R graph to relational mode
Reprinted from: /qicaiqinxian/blog/item/ I was confused when converting E-R graphs to relationship models. I found the following article...
Summary of the essential knowledge points of the database (1)—the three-layer mode and secondary image of the database, E-R (entity contact diagram) diagram, relational model
Data base: a large collection of data that is stored in a computer for a long time, organized and shared. Basic features: permanent storage, shareable, and has a certain physical and logical structure. Data base management system (DBMS): Users and Os...
Generate a relational model of Oracle database using SQL Developer (ER diagram)
The customer wants a relational model diagram of the database, so he uses SQL Developer to do it. 1. SQL Developer version The latest version I downloaded on the official website (now it has reached 18.1, Oracle is updated too diligently): 2. Select as shown in the figure below...
Random recommendations
ASP.NET performs permission control of HTML elements (III)
Some things that were not considered in the previous blog have been changed this time as follows: Interface front desk:
List collection exercise one
package ; public class Person { private String name; private int age; public Person ...
Oracle EBS-SQL (PO-5):Purchase Order Control Information Query.sql
select distinct pla.po_header_id, --pha.type_lookup_code, pha.segment1 Purchase Order Number, appf.full_name ...
Android annotation uses Dagger2 to achieve project dependency decoupling
Preface: Recently, I led the company's app reconstruction work. How to reduce the coupling of projects through reconstruction. Improved development efficiency has always been the direction of my efforts. Today, let's learn about annotation framework Dagger2, and then see how to use it to reduce the coupling of projects. Dagger2...
C# Create and change Excel named region (NamedRange)
Creating a named area means setting a name for a selected cell or multiple cell regions. The purpose is to facilitate our reference to the cell region in other places in the file to simplify formula references or facilitate data management. The specific C# sample code is recorded below. Here, the creation of a named area is divided into...
JavaScript Array
JavaScript's Array can contain any data type and access each element through an index. To obtain the length of the Array, directly access the length attribute: var arr = [1, 2, 3.14, 'Hello', n ...
jquery notes summary
A.jquery event
yum -y install vnc *vnc-server* vncserver vncserver :2 vncserver -geometry 1900x1024 =============== ...
Android one-click lock screen source code
APK Download Source Program Download The lock screen process is as follows (refer to the entire process of Android one-click lock screen development [source code] [with picture]) The source code is referenced to one-click lock screen Source code There are 2 Java files in total: package...