2013年8月20日星期二

ERStudio use

 

open ERstudio, click the New dialog box appears as shown:

 

choose the first one, which means that to create a new relational database model

 

here to mention that the database model into relational (relations) and dimensional (multidimensional) two kinds here mainly to introduce the relational database model based creation process.

 

second and third terms are redesigning existing databases and database model import and so on.

 

 

 

 

space right in the software, and then click Insert Entity, add entities:

 

 

 

then click on an empty space will appear

 

 

 

then right click and select Edit Entity, as shown below:

 

 

 

Click the Add icon, you can now start adding entities (both table objects), we need to enter the main information are the following:

 
      
  1. respectively, enter the table name (= entity name)
  2.   
  3. table properties (= table column)
  4.   
  5. column type and length
  6.   
  7. is empty
  8.   
  9. whether the primary key
  10.  
 

 

 

be a table of all the information entered, select the OK button,

 

 

 

 

 

information appears as shown below:

 

 

Similarly, other tables are the same operation: All tables have finished entering the information, you need to create a table and the table between the contact information, with two tables, as an example

 

 

 

Go to the toolbar: where a total of five kinds of logical relationships, from left to right are:

 
      
  1. Identifying Relationship
  2.   
  3. non-Identifying Relationship, mandatory relationship
  4.   
  5. optional relationship
  6.   
  7. one-to-to relationship
  8.   
  9. Non-specific Relationship
  10.  
 

( 1 ) ( to determine the relationship) Identityfying Relationship is a relationship must exist. Fruiting bodies must act as a foreign key attribute, and this foreign key must be the primary key of the parent entity, this relationship also eventually produce a composite primary key to determine the parent entity entity.

 

(2) (non-deterministic relationship) Non-Identifying, Optional Relationship fruiting bodies of non-primary key attribute for the purposes of generating a primary key of the parent entity, because this relationship optional foreign key is not required in the fruiting body. But there is a foreign key exists in the fruiting body, then in the primary key of the parent entity will be able to find the foreign key.

 

(3) Non-Identifying, Mandatory Relationship fruiting bodies of this relationship on the one hand against a non-primary key attribute in terms of the primary key of the parent entity produced; fruiting bodies have to have the other requirements of the foreign key, and foreign key must be in the the primary key of the parent entity is found.

 

(4) Non-Specific Relationship (non-specific relationship) This relationship is mainly to achieve many to many relationship. Because now-many logical relationship has not been satisfactorily resolved, so in this type of relationship can not under any foreign keys. This type of relationship is rarely used in the database model, if you want to standardize the database model, the best relationship between entities to remove this.

 

short, to determine the relationship of the parent entity's foreign key also acts as the primary key to the primary key of the parent entity itself to jointly decide the parent entity status; in non-deterministic relationship, the foreign key in the parent entity is pure foreign key, only the parent entity itself the primary key to determine the identity of the parent entity. For details refer to the various relationships ERStudio help documentation.

 

 

 

after the manner of selecting the appropriate link, first click on a table, and then click another table, two tables will automatically establish a link between, as follows:

 

 

 

 

 

this, the basic operation finished presentation.

 

 

attached a complete ER diagram:

 

 

 

 

没有评论:

发表评论