In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following brings you mysql" target="_blank" href="http://undefined">mysql how to generate pdm, hoping to bring you some help in practical application, MYSQL involves many things, theory is not much, there are many books on the Internet, today we will use the accumulated experience in the industry to do a solution.
1. Conditions
1.1 Tools powerDesigner 16.5
1.2 mysql database address or script
1.3 mysql-connector-odbc-5.3.4-winx64.msi
2. operation steps
2.1 database > DBMS change Select MySQL 5.0
2.2 Open the powerDesigner 16.5 tool, file > reverse Engineer > database
OK, then generate the corresponding pdm.
3. Display comments in graphic list
'* File: comment2name.vbs'* Purpose: Display Chinese comments for data columns in the PDM graphics window of PowerDesigner'* Title: Assign comment to field name '* Category: Open physical model and run script (Ctrl+Shift+X)'* Copyright:foxzz@163.com, 2006/07/25 . '* Author: foxzz'* Created: '* Modified: '* Version: 1.0'* Comment: Travels through all tables in the physical model, assigning a field's comment to a field's name. ' Questions to consider in replacing name with comment ' Name must be unique, while comment may not be unique. ' The solution is that if the comment of the field is duplicate, the name of the field =comment+1, 2, 3... ' 2. The comment value may be empty, in which case the name of the field will not be processed. ' For Oracle databases, add the comment on column field name is''; to the C:/pdcomment.txt file. ' After the supplementary comment is completed, it is easy to execute in the database. '******************************************************************************Option Explicit ValidationMode = True InteractiveMode = im_BatchDim system, fileSet system = CreateObject("Scripting.FileSystemObject")Dim ForReading, ForWriting, ForAppending 'Open File Options ForReading = 1 'Read only ForWriting = 2 'writable ForAppending = 8 ' writable and appending 'Open text file Set file = system.OpenTextFile("C:/pdcomment.txt", ForWriting, true)' Determine whether the current model is a physical data model Dim mdlSet mdl = ActiveModel If (mdl Is Nothing) Then MsgBox "Process Object No Model" ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then MsgBox "The current model is not a physical data model" Else ProcessFolder mdl,file End If file.Close'****************************************************************************** 'Current table Dim col 'current field dim curComment ' current field comment'processing tables in the model for each tbl in folder.tables if not tbl.isShortcut then if len(trim(tbl.comment))0 then 'You can display table comments here 'tbl.name = tbl.name+"("+trim(tbl.comment)+")" end if 'Processing columns in tables for each col in tbl.columns k = 0 curComment = trim(col.comment) if len(curComment)0 then 'Traversing through disparate comment arrays for j = 0 to i if ColumnComment(j) = curComment then 'If the same comment is found, the correlation counter is incremented by 1 ColumnCommentNumber(j) = ColumnCommentNumber(j) + 1 k = j end if Next 'If there is no identical comment, k=0, then ColumnCommentNumber(0) is also 0 'Otherwise ColumnCommentNumber(k) is not 0 if ColumnCommentNumber(k) 0 then col.name = curComment & cstr(ColumnCommentNumber(k)) else col.name = curComment 'ColumnComment(0), ColumnCommentNumber(0) are always empty 'Add a different comment record to the array i = i + 1 ReDim Preserve ColumnComment(i) ReDim Preserve ColumnCommentNumber(i) ColumnComment(i) = curComment ColumnCommentNumber(i) = 0 end if else 'Write to file file.WriteLine "comment on column "+ tbl.name+". "+col.code+" is '';" end if next end if 'Reinitialize at this time because the same name is allowed for different tables. 'Because ColumnComment(0) and ColumnCommentNumber(0) are empty, they can be retained ReDim Preserve ColumnComment(0) ReDim Preserve ColumnCommentNumber(0) i=0:j=0:k=0nextDim view 'current view for each view in folder.Views if not view.isShortcut then 'View comments can be displayed here 'view.name = view.comment end if next'recursively Dim subpackage 'folderFor Each subpackage In folder.Packages if not subpackage.IsShortcut then ProcessFolder subpackage , file end if Nextend sub
tools > excute commands > Edit/Run scripts
After reading the above tutorial on how to generate pdm in mysql, if you still have anything to know, you can find something you are interested in the industry information or find our professional technical engineers to answer. Technical engineers have more than ten years of experience in the industry.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.