1. Introduction to PDM
The Physical Data Model (Physical Data Model) PDM provides the basic elements required for the initial design of the system and the relationship between related elements; the physical design stage of the database must be detailed on the basis of the background design, including the database stored procedures, operations, triggers, views and index tables;
PowerDesigner can be used to create various types of DBMS (Database Management System ), each type of DBMS contains a standard-defined file used to determine the associations between the PD and DBMS and provides an interface. Different DBMS can be created to generate different database scripts.
Main functions of the physical data model (PDM:
1. The physical design results of the database can be migrated from one database to another;
2. You can use reverse engineering to re-generate a physical model or conceptual model for the physical structure of an existing database;
3. You can customize standard model reports;
4. can be converted to OOM;
5. Complete the detailed physical design of multiple databases (covering DBMS of various commonly used databases) and generate. SQL scripts for database objects;
1.1 Basic Concepts in PDM:
1) Table
2) Columns
3) view
4) primary key
5) candidate keys
6) foreign key
7) Stored Procedure
8) triggers
9) Index
10) Integrity check Constraints
1.2 create a PDM object:
1) create a table
2) create a column
3) create a domain
4) create a view
5) create a primary key
6) create a candidate key
7) create a foreign key
8) Create an index
9) create integrity check Constraints
10) create a stored procedure
11) create a trigger
1.3 manage PDM objects:
1) create a user
2) set the table user
3) set the physical properties of a table
1.4 check PDM:
1) Check option settings
(1) Package)
(2) Table)
(3) Column)
(4) Index)
(5) Key)
(6) Domain)
(7) View)
(8) Reference)
(9) Trigger)
(10) Procedure (Stored Procedure)
(11) User)
(12) File)
2) correct errors/warnings
1.5 trigger and stored procedure/function:
1) create a trigger
Set trigger types (Insert, Update, Delete)
2) create a stored procedure/Function
1.6 generate Database
1) select Database → GenerateDatabase menu item
2) option settings
(1) Database
(2) User
(3) domain
(4) tables and columns
Primary Key and candidate key
Foreign key
Index
Trigger
(5) Stored Procedure
3) format settings
4) Select an object
(1) view packages
(2) Select All/cancel all
(3) Use the objects selected in the graph
1.7 create PDM:
1) create a PDM
(1) Select File> New Model Menu item
(2) Select Physical Data Model from the Model type list on the left.
(3) enter the model name on the right, select the DBMS type from the DBMS drop-down list, and select Physical divisor from the First divisor drop-down list.
2) Forward Engineering: Generate PDM from CDM/LDM
3) Reverse Engineering: generates PDM reversely from existing databases
The PDM generated by the forward and reverse engineering will be separately organized into an article, which is not described here.
1.8 script generated by PDM:
In the end, PDM needs to be imported into our database. PDM can generate corresponding SQL statements for different databases, or directly deploy scripts in the database. This can be selected when generating the database.
Generally, the SQL script is compiled and then executed in the database.