Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Delete and log issues, the use of PowerDesigner

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Delete and log questions:

On the question of delete deleting data:

We all know that using DELETE will delete all the data in the table. If you accidentally delete the data in the case of carelessness, you will get rid of the database without paper data or backup, so try to avoid using operations such as DELETE or DROP.

If you really want to use DELETE or DROP, be sure to do:

1. Create a copy before using it

two。 Back up the data

Add three columns to the table: status (record DELETE) and time (record deletion time) and user (record who deleted it)

Logs: used to record data pipelining

Advanced logging: each table is configured with a log table

The installation of PowerDesigner uses:

PowerDesigner can be downloaded from Baidu or the official website:

Because this is a paid software, it needs to be cracked after download and installation. In general, it is best to be offline when cracking. Cracking requires a cracking patch that can be downloaded from the Internet:

Extract the pdflm16.dll file, then copy it to the PowerDesigner installation directory, and replace the original pdflm16.dll file:

After the replacement is successful, the crack is completed, and then you can open PowerDesigner for use:

We can click the File option in the upper left corner to create a new model:

When you enter the creation interface, you can see that many types of models can be created:

Next we can try to build a database table model:

Create a successful interface:

Tip: if you accidentally close or block the Toolbox (toolbox) on the right during use, you need to turn it on in the View option in the menu bar, because the version 16.5 is different from the previous version, and Toolbox cannot be opened according to the previous version:

All right, open Toolbox and you can start creating a table model:

Click on the table in the interface and create it successfully. If the interface is too small, you can use the Ctrl+ scroll to enlarge the interface:

After creating the form, right-click the properties to enter the editing interface of the form. Let's first create a student table as an example:

After editing, click OK to complete the creation:

After the design of the table model is completed, the PowerDesigner model will automatically generate sql codes, which can be viewed in the attributes of the table model. These sql codes can be copied directly to the database management software for execution:

Build a relational model of the table:

The main thing about PowerDesigner is to create various types of relational models, first of all, to create a table model according to the requirements:

Click the tools in Toolbox to create relationships between tables:

When the creation is completed, the code will be automatically generated accordingly:

Check whether a foreign key is created on the code when you start the one-to-many table. Some versions need to be created manually:

Many-to-many relationship model:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report