Professional Documents
Culture Documents
26/11/2007
pgDesigner
DatabaseDesignerforPostgreSQL
UserManual
rev.26/11/2007
rif.vers.1.1.0
Page1of119
pgDesignerUserManual rev.26/11/2007
Index
Preface.............................................................................................................................................................4
Introduction.......................................................................................................................................................6
TheApplication.................................................................................................................................................8
TheMainWindow............................................................................................................................................................9
Menus.............................................................................................................................................................12
TheMainMenu..............................................................................................................................................................12
PopupMenus................................................................................................................................................................18
TheMenuProject.....................................................................................................................................................18
TheMenuEdit..........................................................................................................................................................18
TheMenuBar................................................................................................................................................................19
ThePanelTools............................................................................................................................................................21
TheStatusPanel...........................................................................................................................................................22
ThePanelProjects........................................................................................................................................................24
AreaofDesign/Diagram.........................................................................................................................................24
TheViewList...........................................................................................................................................................24
TheObjectList.........................................................................................................................................................24
Project.............................................................................................................................................................26
CreateaNewProject....................................................................................................................................................27
CreateaProjectimportingstructurefromadatabase(reverseengineering)...............................................................28
Openinganexistingproject...........................................................................................................................................30
FileLoading.............................................................................................................................................................30
UploadingfilesfromSql...........................................................................................................................................30
ExportProject................................................................................................................................................................31
ExportstofileSql.....................................................................................................................................................32
ExportsonDatabase...............................................................................................................................................32
SavingProject...............................................................................................................................................................34
PrintingtheDiagram......................................................................................................................................................35
Preview....................................................................................................................................................................35
Print..........................................................................................................................................................................36
ImageFileCreation..................................................................................................................................................36
Reporting.......................................................................................................................................................................37
DocumentationinHTMLformat...............................................................................................................................37
DocumentationinPDFformat..................................................................................................................................38
DocumentationinTXTformat..................................................................................................................................39
Otherfunctions..............................................................................................................................................................40
ConfiguringpgDesigner...........................................................................................................................................41
ThewindowStatistics..............................................................................................................................................46
Changinglocationcoordinatesofanobject.............................................................................................................49
Customizingcolorofanobject.................................................................................................................................50
Findingobjectswithinaproject................................................................................................................................51
Viewingofthelog.....................................................................................................................................................52
Seriouserrors..........................................................................................................................................................53
ProjectView/Display....................................................................................................................................................54
Page2of119
pgDesignerUserManual rev.26/11/2007
MainView................................................................................................................................................................54
CreatingCustomViews...........................................................................................................................................54
Managingobjectsinacustomizedview...................................................................................................................55
EntitiesandObjects........................................................................................................................................57
Creation.........................................................................................................................................................................58
Dimensions....................................................................................................................................................................58
Movement......................................................................................................................................................................58
Editing............................................................................................................................................................................58
Deleting.........................................................................................................................................................................58
Copyonanotherproject................................................................................................................................................58
DescriptionofObjects...................................................................................................................................................60
Area.........................................................................................................................................................................61
Domain.....................................................................................................................................................................62
Procedure/Function..................................................................................................................................................64
Relation....................................................................................................................................................................67
Sequence.................................................................................................................................................................69
Stamp.......................................................................................................................................................................70
Table........................................................................................................................................................................71
Tablespace..............................................................................................................................................................77
Text..........................................................................................................................................................................79
Trigger......................................................................................................................................................................80
View.........................................................................................................................................................................82
ViewCreationWizard..............................................................................................................................................85
GeneralConfiguration.....................................................................................................................................89
Theconfigurationfile.....................................................................................................................................................89
Structureofconfigurationfiles.......................................................................................................................................90
TheFileProject...............................................................................................................................................93
StructureFileProject.....................................................................................................................................................94
INIFormat................................................................................................................................................................94
XMLFormat...........................................................................................................................................................103
License.........................................................................................................................................................111
GNUGENERALPUBLICLICENSE.............................................................................................................112
Page3of119
pgDesignerUserManual rev.26/11/2007
Preface
pgDesignerisanopensourceprogramforgraphicdesigndatabasetoPostgreSQL.Thecodeiswrittenin
thelanguageGambas,andcurrentlyrunsonlyonLinuxoperatingsystem.
Currently,theGambaslanguagecomesintwoversions:stableanddevelopment.Becauseofitsadvanced
featuresthanthestablefortheconstructionofpgDesignerwasusedthesecond.
pgDesignerisinastateofcontinuousdevelopmentandupdating,giventhecontinuingevolutionofGambas
andPostgreSQL,bothcontinuoustechnologicalimplementationsrequiredbythecontinuingevolutionof
softwareingeneral.
Althoughitisconstantlyevolving,pgDesignercanbesafelyusedasabasisforbuildingdatabaseengine
basedonPostgreSQL.
Atpresentareimplementedthefollowingfeatures:
Managementmultiproject.
Managementviewsoftheproject.
Copyingobjectsbetweendifferentprojects.
CreatingobjectbasedPostgreSQL,suchastables,fieldsandindexes,views,relations,tablespaces,
procedures,triggers,types,domainsandsequences.
Creatingareasdelimitationrectangular,withcustomizationofcolorfillandtext.
Creatingtextasgraphicsinthediagramoftheproject.
Savingfilesonprojects,bothinformatINIandXML.
ManagingreleaseofPostgreSQL,fromversion7.0to8.2.
ReverseengineeringconductedbyPostgreSQLservers,localorremote.
Customizingvisualenvironmentingeneral,thebasicsettingsofindividualprojectorindividual
object,managementofvisualdetails.
Managementoftheprojectonadiagramchart.
Automaticupdatingofrelationsbetweenobjectsoftheproject.
Eachobjecttypedistinctfromspecialicon.
Placementofobjectsbydraggingwiththemouseorthroughmanualinsertioncoordinates.
Automaticupdatingofrelationsbetweentables.
Wizardfortheconstructionofviews.
Panelprojects,viewingandmanagementofmultiplesimultaneousprojects.
Listofitemsineachproject.
Listofviewsforeachindividualproject.
Panelinstrumentscontainingobjectsorentitiesthatcanbeinsertedinthedraft.
StatePaneltoviewthecurrentstatusofthecurrentproject.
ViewingandwritefilesonSQLcommandsnecessarytocreatethedatabase.
CreatingdirectdatabaseonaserverPostgreSQL.
Managementpreviewforthelayoutoftheprintgraphicdesign,withthepossibilityofsendingprinter
orimagefiles.
Page4of119
pgDesignerUserManual rev.26/11/2007
Managementreportsprojectwithpreview,textfilesorsendingtotheprinter,informats:text,html
andpdf.
Customizingglobalcolor,orofindividualobjects.
CreatingprojectsonuploadingfilescontainingSQLcommands.
Functionsearchobjectsintheproject.
ToperformpgDesigneryoumustinstalltheentiredevelopmentenvironmentorsunlibrariesGambas2
(developmentversion),availablefromtheofficialsite:
http://gambas.sourceforge.net
ThelatestversionoftheprogrampgDesignercanbedownloadedat:
http://sourceforge.net/projects/pgdesigner.
ForusersoftheItalianlanguageisalsoavailableontheForumwebsite:
http://www.ldrweb.net.
Note:DevelopingpgDesignerfollowsconstantlyupdatesGambas2.Oftentheychangesomeinternal
features,orimplementednewfeaturescomparedtopreviousversionsofGambas2,soitisnecessaryto
updatethelibrariesoflanguage.Inanycase,inChangeLogfiletothepackagepgDesigner,willbereported
eachtimetheversionofGambas2whichwascompiledpgDesigneratthetimeofissue.Normally,the
programcomesincompressedformat,containingthesources,bothinRPMformatforthetracks,asthe
latterhastobearinmindthatthecontentistheresultofthecompilationofsourceswiththeversionof
Gambas2ofthemoment,foritispossiblethattheseareincompatiblewiththeoperatingsystem,makingit
necessarytorebuildfromthesourcecode.
PostgreSQLisaregisteredtrademarkofPostgreSQLGlobalDevelopmentGroupUniversityofCalifornia,andreleasedunderBSD
license.
GambasisreleasedundertheGNUGeneralPublicLicense.
PgDesignerisreleasedundertheGNUGeneralPublicLicense.
Page5of119
pgDesignerUserManual rev.26/11/2007
Introduction
TheprojectpgDesignerwasdesignedtoprovideagraphicalenvironment,opensourceandnoncommercial,
asanaidforthedesignandcreationofdatabasePostgreSQL.Ineffectonthemarketsimilarapplications
exist,andcertainlymoreadvancedpgDesigner,butareoftencommercial,nonfreeorsubjecttorestrictive
licensing.
pgDesignerwasbornafteralongandunsuccessfulsearchnetworkofsimilarprograms,andalsoformy
personalbet,becauseatthatIheardaboutanewlanguage,Gambas,whichisalsoopensource,andthat
seemstopromisemuchgoodasanalternativetoVisualBasicinaLinuxenvironment,thethingIwasso
intriguedbythenitwilltesttherealabilityandpotential,thenIaskedmyself,whynotcombinethetwo?
Asevidencedbyitsauthor(BenoitMisinini)ontheofficialwebsiteofGambas,thislanguagedoesnotwant
tobeabsolutelyacopyoftheWindowsenvironment,andfromwhatIhaveseenisactuallythecase.
Gambas,whilemaintainingthebasicstructureoftheBasiclanguage,seemstobewillingtofixmanybugs
andshortcomingsofitsantagonist,whilepreservingsnellezzaandpower,inadditiontothefactthatthiswas
bornandworksunderLinux.
Afterosannathislanguage,wespeakofthismanual:pgDesigner.
Currentlytheprogramhasbeeninasufficientlyfunctional,withthenecessarygroundworkfordeveloping
projectsforthecreationofdatabasetoPostgreSQL.Theapplicationisbasedessentiallyonasingle
environment(SDI),withwhichitispossibletodesignthestructureofanarchive.
ThedevelopmentofPostgreSQLisconstantlychanging,especiallyinrecenttimeswheretheyarewell
knownRDBMSsuchasOracleandDB2,itispossiblethatsomenewimplementationshavenotyetbeen
addedtotheprogram,butnotdesperate...
Theinterfaceisverysimpleandisdescribedinsubsequentchapters.
NOTE:ThisdocumentationmakesreferencetothecurrentversionofpgDesigner,whichcurrentlyis1.1.0
anditispossiblethatsomereferencesorimagesdifferlater.Normallydocumentationshouldfollowastep
bystepevolutionofthesoftware,butthisispossibleonlyinenvironmentsmedium/large,thenumberof
peopleisgreaterthanone;unfortunatelycurrentlytheonlydeveloper,testerandmanagerofthe
documentationisaonly,andthisbeinganoncommercial,developedinthelimitedtimeavailable,in
conditionsverysignificantparallelprocesses.
Page6of119
pgDesignerUserManual rev.26/11/2007
Ithankallthosewhohelpedwithtranslations,ideas,adviceandvariousaid.
Iinviteeveryonetocontributetotheimprovementoftheprogrambyprovidingadviceorsuggestions.
Iamalsowillingtoconsiderpartnerships,bothfortheenvironmentanddevelopmenttests,whichforthe
documentation.
LuigiCarlotto
RomaItaly
email:md9327@mclink.it
Page7of119
pgDesignerUserManual rev.26/11/2007
TheApplication
TheprogrampgDesignercomesineithersource(suchasfromopensourcepolicy),bothinbinaryformat,to
alloweasyinstallation,bothsourceandbinariesareprovidedintheformofRPM,whosesystemiswidely
usedonmostLinuxdistributions.
Thesepackagesareavailableonthesitehttp://sourceforge.net/projects/pgdesigner/,updateswillbe
reportedthroughtheclassicstoryofthesite.
Athttp://pgdesigner.sourceforge.netthisisthewebofdocumentationthatreflectsthatprovidedinthisguide,
providedinotherlanguages.
ForusersItalianisalsoactivesitehttp://www.ldrweb.net,wherethereisaforumwhereyoucanexchange
chat,getinformationandassistanceonpgDesigner,orevenproposefeaturesforimprovingapplication.
ButnowwemovetothedescriptionofpgDesigner.
Theexecutioncanbecarriedoutindifferentways,dependingontypeofinstallationdone.Asdescribedin
theabovelines,pgDesignercomesineithersourcebinaryform(iereadytorun)iftheoperatingsystem
allowstheinstallationofRPM,itbecomesquiteeasy,giventhattheinstallationcreatesisthedirectoryin
whichtheapplicationwillresideandrelatedfiles,isthenecessarylinkinthe/bindirectorystructureofthe
operatingsystem,anditsentryinthemenuGUI(egKDE).Iftheoperatingsystemdoesnotallowthistypeof
installation,thenyoumustmanuallyunpackingthecompressedfilecontainingthesourceofpgDesigner,
compilationanddeployment,thesestepsaredescribedinthedocumentationattachedtothecompressed
file.
Itshouldbeborneinmind,however,thatpgDesignerrequiresmandatorylibraryGambas2you,andyou
needtoruntheinstallationofGambas2beforeproceedingtoinstallpgDesigner.
Onceinstallationiscomplete,pgDesignercanberunfromaterminal,runthefollowingcommand:
# ./pgDesigner.gambas
WiththecurrentversionofpgDesigneryoucanstartautomaticallyuploadingexistingprojects,inthiscaseit
issufficienttoindicatethenamesoffilescompletepath,followingthecommand,forexample:
# ./pgDesigner.gambas /home/test.ini /home2/test.xml
Attheendofthebootprocess,pgDesignerlaunchfunctionsloadingfiles,makingthemavailableandvisible
totheuser.
If,asdescribedabove,theinstallationwascarriedoutbytheRPM,forthelaunchofpgDesignerjustclickon
themenuitemonthedesktop.
Page8of119
pgDesignerUserManual rev.26/11/2007
TheMainWindow
When,andasyoucanseefromthefigure,pgDesignershowsarathersimpleandratherconformstothe
structureofmanyoftheexistingapplications.
Themainmenupresentsaclassicgeneral,andtheareabelowisdividedintofunctionalareas.Thewindow
canberesizedatwill,whilethevariouspanelscanbehiddenorresizedtoallowabroaderviewofthe
charts.
Inanyparticulararea,orpanel,hasaspecificfunction,whichallowsyoutocontrolsomeaspectsofaproject
orviewthecurrentstatusoftheprojectactive.Onthefollowingpagedescriptionoftheseareas.
Page9of119
pgDesignerUserManual rev.26/11/2007
Descriptionoffunctionalareas
MainMenu Likenearlyallexistingapplicationsonthemarket,andnot,pgDesignerhasamainmenu
containingalltheitemsandoptionsforthemanagementandcontrolofprogramand
projectmanagement.Asyoucanseefromtheprecedingpage,therearefivemain
elements:File,Edit,Project,ToolandHelp;Eachoftheseelementsgroupanumberof
voices,dividingthistypefunctionsandmeaning.Insubsequentchapterswillbedescribed
indetailthesignificanceofeachitemandfunctionwithintheprogram.
MenuBar
Toassistthemainmenu,belowthisisahorizontalpanel,whichcontainsasetofbuttons
thatrepresentsomeofthefeaturesmostusefultotheuser.Ontherightaretwocombo
that,whenenabled,allowsswitchingbetweendifferentprojectsopen,orselectoneofthe
displaysofcurrentproject.Accordingtothecurrentstatus,applicationorproject,the
buttonscanbedisabled,fortheitemsinthemainmenu.
Inchapter'Menu'isdescribedindetailthefunctionofeachbutton.
Panel Asyoucanseeintheillustrationonthepreviouspage,totheleftofthemain
Instrument windowhasaverticalbarwithaseriesofbuttonswithapicture.Thispaneliscalled
s PanelInstruments,andcontainsbuttonsnecessarytothecreationofobjectstobe
includedintheproject,accordingtotheversionofPostgreSQLdatabasechoicefor
theproject,someofthesebuttonscanbedisabled.Insubsequentchapterswillbe
describedthefunctionofeachoneofthesebuttons.
Page10of119
pgDesignerUserManual rev.26/11/2007
Descrizionedelleareefunzionali
Panel Inthecentralareaofthemainwindow,
projects thereisapanelthatdisplaysallprojects
openeachfolderinaseparateand
identifiablebythenameoftheprojectin
itstongue;projectsintheabsenceofthis
panelishidden,showingacompletely
empty.
Eachcardcontainsprojectistheareaon
whichgraphicdesignschemeofthe
project,isalistofitemscontainedinthe
draft,thelistissimilarlytothestructureofadirectory,withallreferencesobjectsofthe
projectrepresentedbytheirnamesandfolderscontainedinsubdividedbytype.Uptothis
listisacombocontainingviewsoftheproject,andwithwhichyoucanselectonefor
viewing.Insubsequentchaptersdescribesthemeaningoftheconceptviewedasaproject
andmanage.
State
Panel
Atthebaseofthemainwindowisavisiblehorizontalpanel,whichcontainsgraphicsand
textareas.Thispaneldisplaysallrelevantinformationonthecurrentstatusoftheproject,
someoftheseobjectshavealsofeatureactive.Insubsequentchapterswillbedescribed
featuresandthetypeofinformationdisplayedeachoftheseareas.
TheMenuBar,thePanelInstrumentsandtheStatePanelcanbemadeinvisibleandinsomeinstances,
suchasthelistofprojectitems,resized.EachvariationofthevisualisstoredinaconfigurationfileGeneral,
whichwillberestoredthenexttimetheprogram;ofthisfilestructurewillbedescribedinsubsequent
chapters.
Page11of119
pgDesignerUserManual rev.26/11/2007
Menus
Asmentionedintheprecedingparagraph,theapplicationpresentsanumberofmenus;comparedtothe
mainmenu,whichcontainsalltheentriesandfunctionalityprovidedbypgDesigner,thereareotherauxiliary
menu,includingsome,suchasthemenubar,alwaysvisible,whileotherscalledPopupMenusareactivated
andmadevisibleincertaincircumstances.Thesetaketheformofadropdownmenuwithitemsalone
enabledbythecurrentactivityistobenotedthattheitemsinthesemenusareactuallyblocksofthemain
menu.
TheMainMenu
Themenucontainsallthenecessaryitemsoutofthebasicfunctionalityoftheprogramandproject
management.Someoftheitemslistedcontainevenmoreitemsbelow,inordertoregroupsoitslogical
functionality.Someoftheseelementsareconnectedtospecificfunctions,whileothersoffermorechoicesby
theotherarestilltoggle,oreveryclickreversetheirstatus,makingactivemenuoraparticularcondition,in
thiscasethestateisindicatedachecksymbolnexttotheentry.
Theentriesaregroupedbytype,andtheirfunctionisdescribedbelow:
File
NewProject Createanemptyproject.Itgivesadialogforsettingtheparametersoftheproject,
includingthenameoftheprojectitselfandtheversionofthedatabasetowhichyou
wanttosee.Theconfirmationofthedatabaseiscreatedanewcardproject,
includinganewlistofobjectsandanewlistviews.
ProjectOpen Getafilepreviouslysavedproject.Itgivesadialogbox,soyoucanselectthe
desiredfileinthedirectoryoftheoperatingsystem.Theextensionofuploadedfile
extensionissetasthedefaultforfuturerescue.Withthisfeatureyoucanalsocreate
aprojectbyreadingafilecontainingSQLstatements,inwhichcaseitissufficientto
selectafilewiththeextensionsql.Filesofthistypearenotconsideredprojectfiles
withintheapplication,sothenextrescueaskedforthenameofthefileassociated
withthenewproject,theoriginalfilewillnolongerbetakenintoaccount.
RecentOpen Itallowsyoutoselectandloadapreviouslysavedprojectfilesfromalistcontaining
thelast<n>projectsworked,where<n>correspondstothenumbersetinthe
generaloptions.Themenuappearsonlywhenactivatedoptionsingeneralandif
youhaveworkedatleastonefile.
Importfrom Importstructurefromanexistingdatabase,hencecreatinganewproject.Itgivesa
database windowfortheselectionoftypesofobjectsyouwanttoimport,thenthewindowwill
bedisplayedfortheloginandconnectiontothedatabaseserver.Theloadingis
doneforallofthepersonalpropertywhichhasbeentheconnectiontotheexclusion
ofanythingelse,includingobjectsofthesystem,althoughpresentinthesame
database.AccordingtotheversionofthePostgreSQLserveritispossiblethatsome
kindofpurposearenotavailable.
SaveProject Savethecurrentprojectfiles.Currentlyitispossibletosavedataineitherini(text),
Page12of119
pgDesignerUserManual rev.26/11/2007
whichinXMLformat,therearenodifferencesbetweenthetwoformats,butonly
structuraleachformatalsocontainsthesameinformationastheotherforthesame
project.Iftheprojectisnew,thereisadialogboxtosetthenewfilenameorwrite
aboveadiskalready.Theextensionusedforthefilenameissetasthedefaultfor
futuresavesandwillnolongerberequired,unlessweusetheitemdescribedbelow.
SaveProjecton... Allowssavingprojectonfilewithadifferentnameanddifferentformat.Asdescribed
inthepreviousitem,nowyoucansavedataineitherini(text)formatxml.Itgivesa
dialogboxtosetthefilenameorwriteaboveadiskalready.Theextensionof
uploadedfilesissetasthedefaultforfuturerescue.
Closeproject Closesthecurrentprojectiftheprojecthasundergonechangeswillbeproposed
rescuingthelatestchanges.
Printsetup... Itallowsyoutoconfiguretheparametersofthepressandthedefaultprintertosend
prints.Inanycase,youcanchangethesesettingslaterifrequired(egprintingor
graphicreports).Thetotalvaluesettingsandcustomizationsoverridetheindividual
project,withtheexceptionofprojectsloadedafterchanges,whichmaintainthe
settingssavedonthefile.
Exit ClosesapplicationpgDesignerandreturnstotheoperatingsystem,ifoneormoreof
theprojectshasbeenamendedopenedbeingproposedrescue.
Edit
ObjectCopy Createacopyoftheselectedobject.Itgivesthedialogboxforeditingdataobject.It
shouldbeborneinmindthatitisnotpossibletocreatemultipleobjectswiththe
samename,soitislikelythatistobeamendedoneproposedforcopying.The
objectcreatedwillbeaddedtothecurrentprojectanddisplayedlocatedintheupper
leftofthediagram.
Deleteobject Deletefromtheprojectselectedobject.Thatoperationissoughtfurtherconfirmation.
Ifyouwanttodeletetheobjectcontainsreferencestootherobjects,theyare
deleted.ThedeletefunctionisvalidonlyintheMainView(seecharts,viewsand
displayproject),whileifperformedinotherviewsoftheproject,thesubjectwillbe
deletedonlysight,howeverremainingwithintheprojectanddisplayedinviewof
Main.
Editobject Itallowsyoutoeditthepropertiesoftheselectedobject.Itgivesadialogtomanage
itsdata,leadingtotheamendment,anychangeswillbereflectedontherecord,
includingcancellation.Itshouldbekeptinmindthatchangesordeletionsmadeby
furthereditingwindowsactivatedfromtheprimarydialogbox(seeeditpropertiesof
thefieldsofatable)willnotberecoverable,evenifnochangeismadeinthedialog
boxfirst.
Moveobject Movetheselectedobjectinadifferentpositioninthediagram.Itgivesadialogbox
inwhichyoucansetmanuallynewX,Ycoordinatesoftheobjectinthechart,
representingtheupperleftofthediagramandcomparedtothecurrentdisplay.This
featurecanalsobeactivatedbytheStatePanel,doubleclickthemouseinthat
displaysthecurrentpositionoftheobject.
Colorobject Itallowsyoutocustomizethecolorsoftheobjectselected.Itgivesadialogbox,for
differenttypesofobject,thenyouchangethesettingofcolor,includingcolorsthat
Page13of119
pgDesignerUserManual rev.26/11/2007
cantaketheobjectindifferentstates.Thiscustomizationwillbeoverwrittenifthe
settingsarechangedinthegeneraloptions.
Copyondisplay Itallowsyoutocopythereferenceoftheselectedanotherviewonthesameproject.
MenuProjectisavoicewithwhichyoucansetinageneralviewsandarticles
relatedtothem,unlikethisfunctionissetforthemanagementofasingleelement,
whichisthecurrentsubject.
Deletefrom Itallowstoremovethereferenceoftheselectedsightactive.Itshouldbebornein
display mindthatitisnotpossibletoremoveobjectsfromthemainview(MainView),forthe
physicaleliminationoftheprojectisavoiceandaspecificfunction.MenuProjectis
avoicewithwhichyoucansetinageneralviewsandarticlesrelatedtothem,unlike
thisfunctionissetforthemanagementofasingleelement,whichisthecurrent
subject.Asalreadydescribed,fromtheeliminationofadifferentviewfromthatMain
doesnotcausetheactualremovalfromtheproject,butthemeresightdisconnect
itselfthesubjectwillstillbevisibleintheMainView.
Copyonproject Thisfeatureallowsyoutocopytheselectedobjectonanotherprojectsite.Itshould
beborneinmindthatwillbecopiedonlytheobjectanditscharacteristicsand
properties,withtheexceptionofreferencestootherobjectsintheprojectsource.
New Inthismenuareaseriesofrelateditems,withwhichyoucancreatenewobjectsin
theproject.Thesamefunctionalityisexercised,andmadeeasierbyPaneltoolson
theleftsideofthemainwindow.Enablingorlessofitemsonthismenuisdependent
ontheversionofdatabasePostgreSQLchosenfortheproject.
Area Itallowsyoutocreateanobjectrectangular.Anareacanbeusedtodefineor
highlightagroupofotherobjects,onlyapurelygraphicaldiagramoftheproject,not
anyfunctionorinterferencewiththeoperationscreationofthedatabase.Inany
conditionsuchitemswillalwaysdrawnwithoutcovermostsignificantobjects(eg
linesrelation...),thenremainasbackgroundtotheplot.Thistypeofobjectyoucan
definethefillcolorand,optionally,alineoftextthatappearsstartingfromtheupper
leftcorneroftheinternalarea,thesizeandpositioncanbechangedatanytime.
Stamp Createasimplebutparticularsubject.Theobjectiscomposedofasimplerectangle,
whichshowssomeownershipoftheprojecttowhichitbelongs.Foradetailed
descriptionofthisitemcanbefoundinlaterchapters.
Domain CreateadomainPostgreSQL.Itgivesadialogboxforenteringthenecessarydata
andsettingproperties.TheitemispartoftheobjectsunderPostgreSQL,andthe
descriptionwillthereforerefertotheofficialdocumentation.
Procedures Createaprocedure(orfunction)PostgreSQL.Itgivesadialogboxforenteringthe
SQL/PlSQL necessarydataandsettingproperties.Theitemispartoftheobjectsunder
PostgreSQL,andthedescriptionwillthereforerefertotheofficialdocumentation.
Relation Createarelationshipbetweentwotables.Thereportisactuallycreatedafterthe
connectionestablishedbetweenthetables,selectingwiththemouse,leadingtothe
selectionispresentedwithadialogboxforenteringthenecessarydataandthe
completionofthepropertiesofrelation.Tocreatearelationisthattheprojectmust
containatleasttwotables,completetheirrespectivefields,itisnotpossibleto
definerelationsintheabsenceoftablesandfields.Theitemispartoftheobjects
underPostgreSQL,andthedescriptionwillthereforerefertotheofficial
Page14of119
pgDesignerUserManual rev.26/11/2007
documentation.
Sequence CreateasequencePostgreSQL.Itgivesadialogboxforenteringthenecessary
dataandsettingproperties.TheitemispartoftheobjectsunderPostgreSQL,and
thedescriptionwillthereforerefertotheofficialdocumentation.
Table CreateatablePostgreSQL.Itgivesadialogboxforenteringthenecessarydataand
settingproperties;throughthiswindowyoucanalsoaccesstheeditingfieldsand
indexesofthetable.Itshouldbeborneinmindthatsomeofthedatamaybe
enteredunlesstherearerelateditemsintheproject,forexample,youcandefinethe
tablespacetable(oranindexofthetable)unlessthereisatleastanobject
tablespacetheproject,inthiscasethecombowillcontainareferencetothis
tablespaceallowingthehooktothetable.Theitemispartoftheobjectsunder
PostgreSQL,andthedescriptionwillthereforerefertotheofficialdocumentation.
Tablespace CreateatablespacePostgreSQL.Itgivesadialogboxforenteringthenecessary
dataandsettingproperties.Thecreationofatablespaceisneededifyouwantto
combine,forexample,objecttoatable.Theitemispartoftheobjectsunder
PostgreSQL,andthedescriptionwillthereforerefertotheofficialdocumentation.
Text Createanobjecttext.Itgivesadialogboxforenteringthenecessarydataand
settingproperties.Asfortheareas,thetextobjecthasnorealfunctiononthe
database,andisconsideredonlyagraphicwithinthediagram,whichmaybeused
asanoteortodefineareaslogical.Thestringoftextenteredwillbedisplayedinthe
diagramtothedesiredpositionandcanbedragged,modifiedanddeletedasany
otherobjectoftheproject.
Type CreateatypePostgreSQL.Itgivesadialogboxforenteringthenecessarydataand
settingproperties.Thetypesintheprojectwillbepresentedwheneveritis
necessary,appearonlistswiththetypesofdefaultPostgreSQL.Theitemispartof
theobjectsunderPostgreSQL,andthedescriptionwillthereforerefertotheofficial
documentation.
Trigger CreateatriggerPostgreSQL.Itgivesadialogboxforenteringthenecessarydata
andsettingproperties.Itshouldbeborneinmindthatsomeofthedatamaybe
enteredunlesstherearerelateditemsintheproject,forexample,youcandefinethe
referencetableoftriggeronlyifthereisatleastonetableintheproject,inthiscase
thecombocontainreferencestothistableallowingthehooktotrigger.Theitemis
partoftheobjectsunderPostgreSQL,andthedescriptionwillthereforerefertothe
officialdocumentation.
View CreateaviewPostgreSQL.Itgivesadialogboxforenteringthenecessarydataand
settingproperties.AmongthefunctionspgDesignerisalsoawizardtohelpyou
createcustomviews.TheitemispartoftheobjectsunderPostgreSQL,andthe
descriptionwillthereforerefertotheofficialdocumentation.
ViewWizard Runthewizardtobuildaview.Itgivesadialogboxwhereyoucanselectthetables
andfieldscomponentsviewnowisnotmanagedthedefinitionofWHERE
conditions.Theobjectcanbecreatedmanuallyamended.Attheendofincluding
property,willcreateanewvisionandaddedtotheprojectandinthediagram.
ChartUpdate Runsupdatingthegraph.Thisfeatureredrawallobjectsinthegraph,correctingany
visualanomalies.Insomecases,employeesalsothespeedoftheprocessorand
Page15of119
pgDesignerUserManual rev.26/11/2007
videocard,aswellasthenumberofobjectsinthediagram,itispossiblethatthe
graphicsengineiscompletelyupdatedcomparedtothesettingsofobjectsinthe
draft,sotheymaybeabnormalitiesoccurpurelyvisual,thatyoucanarrangeforcing
theapplicationtoupgradetheentirediagram.
Reorganize Thisfunctionperformstherepositioningoftheobjectsinthediagrambasedona
diagram verysimplealgorithm,placingobjectsinthediagramaccordingtoapurely
mathematical,withouttakingintoaccountanyrelationshipbetweentheobjects
themselves.Theobjectsarearrangedinorderofcreation,startingfromlefttoright
andfromtoptobottomonthechart;toreachingthelimitsofthedesign,
repositioningstartspreadingagaincoordinatedbyinitials.Thislogiccanbeapplied
initiallytothefirstloadingofaprojectfromadatabaseorfilesql,toallowusersto
realizethemagnitudeandthenumberofelementsoftheproject,allowingthen
placingobjectsinamorehumanlylogic.
Findobjects Thisfunctionopensadialog,allowingyoutosearchforitemswithinaproject.Fora
detaileddescriptionofthisfeaturepleaserefertothelaterchapters.
Project
OpenProjects Thismenuisdisplayedunlessthereareactiveprojects.Itcontainsasubmenu,with
thelistofprojectsopen,eachofwhichinturncontainsanothersubmenuwithalist
ofviewsoftheproject,includingtheMainView.Selectingoneoftheseviews,
changetheappearanceofthegraphics,anddisplayallobjectsrelatedtothesame
view.Itshouldbeborneinmindthattheselectionofaviewputstheprojectina
stateofchange,becausethesettingisconsideredasanamendmentandsavedin
theprojectfileandthesubsequentloadingofthelastprojectoverrideyourviewwas
selected.
CreateDatabase Thisfeatureallowsyoutocreateobjectsdirectlyonanexistingdatabaseonaserver
PostgreSQL.Itgivesawindowfortheselectionoftypesofobjectsyouwantto
create,thendisplaysthewindowtologinandconnecttothedatabaseserver.It
shouldbeborneinmindthatyouusedtoaccessthedatabasemusthavethe
appropriatewriterightstocreateobjectscontainedinthedraft.
ExportSQL CreatethenecessarySQLcommandsthestructureoftheprojectandsavesthemto
afilewithextensionsql,ordisplaytheminanappropriatedialogbox.Asforexport
database,thereisawindowfortheselectionoftypesofobjectsyouwanttocreate.
PrintDiagram Runsprintinggraphoftheproject.Itgivesadialogboxthatdisplaysthegraph
dividedintopages,asconfiguredintheparametersofprinter;pagescanbe
esporateasimagefilesorsentdirectlytotheprinter.
PrintReport Throughthisitemontoafurthersubmenucontainingsomeitemswithwhichyou
cancreatereportingprojectindifferentformats.
HTMLFormat Runreportoftheproject,containingalltheinformationconcerningtheprojectand
object,inhtmlformat.Thereportisthendisplayedonaspecialdialogbox,from
whichyoucanthenprintorsavethecontentsonfile.
PDFFormat Runreportoftheproject,containingalltheinformationconcerningtheprojectand
object,inpdfformat.Thereportisthendisplayedonaspecialdialogbox,fromwhich
youcanthenprintorsavethecontentsonfile.
Page16of119
pgDesignerUserManual rev.26/11/2007
TXTFormat Runreportoftheproject,containingalltheinformationconcerningtheprojectand
objects,textformat.Thereportisthendisplayedonaspecialdialogbox,fromwhich
youcanthenprintorsavethecontentsonfile.
Project Throughthisitemallowsaccesstothegeneralsettingsofthecurrentproject.The
Configuration functionpresentsadialogboxthatletsyouchangetheparametersoftheproject,
includingthenameandversionofthedatabase.Itshouldbeborneinmindthatthe
programtakesintoaccountthecharacteristicsofPostgreSQLversionsofchoice,
includingthesizeofnamesandtheexistenceofcertaintypesofobjects(which
couldbeavailableinlater),soitispossiblethatsomeentriesthemainmenuand
someofthebuttonsintheinstrumentpanelaredisabled.
ProjectStatistics Viewawindowtothegeneralstateoftheproject,thetotalnumberofobjects
separatedbytype,alistofobjectsandfieldsofthetablessortedbyname,linksand
otherinformation.Throughthiswindow,youcanchangeaccessonindividualitems
containedinthedraft.
DisplaySet Todefineviewsofprojectglobally.Inthewindowthatappearsmanagementis
possibletocreate/modify/deleteviews(excepttheMainView),addorsubtract
elements.
Tool
Viewlog DuringprocedureselaborativeandmanagementwithinpgDesignerareissued
messagesonthecurrentstatusofthecompilation,especiallyinthecaseoferroror
warning,thesemessagesarestoredonafilethatcanbewatchedtoseeifany
abnormalities.Thefeatureonthemenuallowsyoutoreadthislogfile,thecontentof
whichisshownintextformatonadialogbox;throughthiswindowyoucansendthe
contentstofileorprinter.
Options Withthisoption,youcanaccessthesettingsgeneralpgDesigner.Thisopensa
dialogboxwhereyoucansetsomebasiccharacteristicsoftheapplicationandaffect
themodalitiesfortheestablishmentofnewprojects,itispossibletovarythe
appearanceofopenprojects,suchascolorordetailwithwhichitemsaredisplayed.
Itshouldbeborneinmindthattheamendmentofsomeofthesesettingswill
overridethecustomizationsmadeonsomeitemsorpropertyprojectsopen.
Help
Help Showwindowcontainingthishelp.
AboutpgDesigner Displaysadialogwithgeneralinformationontheapplication.
Page17of119
pgDesignerUserManual rev.26/11/2007
PopupMenus
Asmentionedabove,duringthevariousphasesofprojectmanagement,youcanaccesssomeaccessories
menu,dependingonthetypeofoperationthatcanbemadeatthistime.Thesemenuscanbeactivatedat
theclickoftherightmousebuttoninanareaofthediagram,nparticularonanobjectorobjectsontheright
ofthisboardoftheproject,nexttooneofthenamesonthelist.Thesemenuenhancements,commonly
calledpopupmenusallowaccesstosomefeaturesoftheprogram,however,alsopresentinthemainmenu.
TheMenuProject
Thispopupmenuisdisplayedduringoperationsingeneralabouttheproject,suchassaving,printingor
updatingofthediagram.Themenuisactivatedwiththerightmousebuttonnexttotheboardtabonthe
projectornametopsthelistofobjectsontherightsideofthecard.Theoptionsshown(orvoices)
correspondtothosepresentinthemainmenuunder"Project",andlikewisethegeneralmenu,someof
thesecanbedisableddependingonthecurrentstatus,orsubmitadditionalevidence.
TheMenuEdit
Thispopupmenuisdisplayedduringoperationsperformedonaparticularobjectortocreateanewobject
ontherecord.Themenuisactivatedwiththerightmousebuttonnexttoanobjectonadiagramornames
listeditemsontherightsideofthiscardproject.Theoptionsshown(orvoices)correspondtothosepresent
inthemainmenuunder"Edit"andlikewisethegeneralmenu,someofthesecanbedisableddependingon
thecurrentstatus,orsubmitadditionalevidence.
Page18of119
pgDesignerUserManual rev.26/11/2007
TheMenuBar
Underthemainmenuisahorizontalpanel,whichcontainsanumberofbuttonsandsomecombo(see
figure).
Usingthebuttonsonthispanelcanbeaccessedquicklytosomeofthefeaturespresentinthemainmenu,
inparticular:
NewProject Createanemptyproject.Seethedescriptioninthemainmenu.
ProjectOpen Getafilepreviouslysavedproject.Seethedescriptioninthemainmenu.
Importfrom Importstructurefromanexistingdatabase,hencecreatinganewproject.Seethe
database descriptioninthemainmenu.
SaveProject Savethecurrentprojectfiles.Seethedescriptioninthemainmenu.
SaveProjectas... Allowssavingprojectonfilewithadifferentnameanddifferentformat.Seethe
descriptioninthemainmenu.
Printsetup... Itallowsyoutoconfiguretheparametersofthepressandthedefaultprintertosend
prints.Seethedescriptioninthemainmenu.
DiagramUpdate Runsupdatingthegraph.Seethedescriptioninthemainmenu.
Reorganize Thisfunctionperformstherepositioningoftheobjectsinthediagram.Seethe
diagram descriptioninthemainmenu.
CreateDatabase Thisfeatureallowsyoutocreateobjectsdirectlyonanexistingdatabaseonaserver
PostgreSQL.Seethedescriptioninthemainmenu.
ExportSQL CreatethenecessarySQLcommandsthestructureoftheproject.Seethe
descriptioninthemainmenu.
DiagramPress Runsprintinggraphoftheproject.Seethedescriptioninthemainmenu.
PrintHTMLReportRunreportoftheproject,inhtmlformat.Seethedescriptioninthemainmenu.
PDFPrintReport Runreportoftheprojectinpdfformat.Seethedescriptioninthemainmenu.
TXTPrintReport Runreportoftheprojectintextformat.Seethedescriptioninthemainmenu.
Project Throughthisitemallowsaccesstothegeneralsettingsofthecurrentproject.See
Configuration thedescriptioninthemainmenu.
ProjectStatistics Viewawindowtothegeneralstateoftheproject.Seethedescriptioninthemain
Page19of119
pgDesignerUserManual rev.26/11/2007
menu.
DisplaySet Todefineviewsofprojectglobally.Seethedescriptioninthemainmenu.
Options Withthisoption,youcanaccessthesettingsgeneralpgDesigner.Seethe
descriptioninthemainmenu.
Inadditiontothebuttons,therearetwocombo,whichyoucanselectthecurrentproject(betweenprojects
open)orthecurrentdisplay(includingdisplaysontheproject).
Thepanelcanbemadeinvisiblebyactingonthegeneraloptions.
Page20of119
pgDesignerUserManual rev.26/11/2007
ThePanelTools
Theinstrumentpanelislocatedtotheleftofthewindow,andcontainsbuttonsnecessarytothe
creationofobjectsinaproject.Eachtypeofobjectisidentifiedbyanicondifferent.Currently,the
schemehasthefollowingitems:areas,stamp,domains,procedures,relations(foreignkey)
sequences,tables,tablespace,text,triggers,viewsandtypes,someoftheseobjects,suchasareas
andtexts,willbeusedsolelyforthelookandfeeloftheplot,failingtofunctiononthemanagement
ofthedatabase.
Thepanelhasbeenimplementedforconvenience,giventhatthesamefeaturesarealsopresentin
themainmenu,andcanbemadeinvisiblebyactingoptionsingeneralpgDesigner.
Pleaserefertothesubsequentchaptersforadetaileddescriptionoftheindividualobjects.
Page21of119
pgDesignerUserManual rev.26/11/2007
TheStatusPanel
Thepanelofstate,containsalltheinformationaboutthestatusofthecurrentproject,insomecasesmay
havefeaturesactivatedviamouseclickincertainareasofthepanel.Theareaislocatedatthebottomofthe
windowandisdividedintosectors,eachdesignedtoprovideaspecificinformation(fromlefttoright):
LED: Ifyellow,whichindicatesisgearingcreatingarelation.
Definition SelectinganobjectreportfromtheMainMenuorthePanelInstruments,activemodeto
Relation createarelationshipbetweentwotables.Thisprocessbeginsbyselecting(withtheclick
oftheleftmousebutton)atableinthisdiagram,andendingwithselectionofthesecond
table(withtheclickoftheleftmousebutton)thatyouwanttorelate.Themodeisabortive
iftheselectionismadeonanobjectotherthanatableorclickingonablankareaofthe
diagram.
LED: Ifyellow,whichindicatesanobjectisgearingmoving.
Object Thisindicatorisilluminatedwhenanobjectisindrag,orwhenanobjectinthisdrawingis
Movement selectedwiththemouseandmovedongraphics.Thereleaseofthismodedisablesand
theindicatoristurnedoff.
Itshouldberememberedthatthedraggingofanobjectputstheprojectinastateof
alteredtoallowstorageofnewcoordinatesoftheobject,sotheywillbeaskedtorescue
theclosure.
LED: Ifyellow,whichindicatesanobjectisgearingchanging.
Objectedit Theindicatorisactivatedwhenitisineditmode,orwhenyoucreateanewobject,or
selectedwithadoubleclickorgraphicsdirectlyinthelistonthepanelontheright,in
whichcasethereisawindowtoallowthechangingthepropertiesoftheselectedobject.
Attheclosingofthewindowtoamendtheindicatorisoff.
LED: Ifred,indicatingthattheprojecthasbeenchangedandthechangeshavenotyetbeen
AmendedDraft saved.Tosavetheprojecttheindicatorisoff.
Fileextension Thisfieldcontainstheextensionofthecurrentprojectfiles(default=ini).
project
Locationofthe Thisfieldcontainsthecoordinatesx,ytheupperleftcornerofthecurrentobject,asis
currentobject currentlypositionedinthediagramandthecurrentdisplay.Doubleclickwiththeleft
mousebuttononthisfield,itdisplaysawindowinwhichyoucanmanuallychangethe
currentcoordinatesoftheobject,thefunctionissimilartothemovementdonewiththe
mouse,exceptthatthecoordinatesare,inthiscase,setmanually.
Itshouldberememberedthatthemovementofanobjectputstheprojectinastateof
alteredtoallowstorageofnewcoordinatesoftheobject,sotheywillbeaskedtorescue
Page22of119
pgDesignerUserManual rev.26/11/2007
theclosure.
Printerstatus Thefieldshowsthecurrentsettingsofthepress,suchassize,orientation,resolution.
Typeandname Inthisareadisplaystheinformationonthetypeandnameofthecurrentlyselected.If
ofthecurrent therearenoobjectsselected,thefieldisempty.
object
Page23of119
pgDesignerUserManual rev.26/11/2007
ThePanelProjects
ThePanelProjectsislocatedatthecenterofthemainwindow,andintheabsenceofprojectsishidden.At
theopeningorcreatinganewdraftofthispanelismadevisible;anyopenprojectisassociatedwithafolder,
whoselabelwillcontainthenameoftheproject.
Tomakevisible,andsoon,aprojectsimplyselectthefolderbyclickingonthenameofthetongueor
throughthemainmenu.
AreaofDesign/Diagram
Eachfoldercontainsaprojectthatisdesignedgraphicallydiagramoftheproject,whileontherightisalist
containingvisible,brokendownbytype,theobjectsoftheprojectonthislistisacombowithwhichyoucan
selecttheview(ordisplay)active.Theareaofthediagramhasatotalsizeofabout4x3sheetsofprinting
A4;throughthescrollbarsontherightandbottom,youcanmovetothediagram,andthenreachany
objectsandoutofview.
TheViewList
Ontherightofthediagram,asIsaid,thisisanareacontainingacomboandalist(similartoadirectory),the
combocontainsalistofthedisplaysintheproject,andwithwhichyoucanselectoneandmakeitvisiblein
diagram.Thenameappearsviewshowstheactivecurrent,andtheselectionofadifferentviewwillchange
fromtheappearanceofthediagram,displayingonlyobjectsbelongingtothatview.Eachprojecthasa
defaultview,whichcannotbechangedorerasableandthatcontainsanddisplaysallobjectsoftheproject,
thisviewshowsthelabel"MainView."
TheObjectList
Underthecomboabove,wehavealistthatshowsastructurefolders,similarlytoadirectorysystem,with
Page24of119
pgDesignerUserManual rev.26/11/2007
groupingsofobjectsbytypeintheproject,eachofthesefoldersarelistedindividualobjects,representedby
itsname(unique),andbyagroup.Selectinganobjecthere,thisbecomestheobjectorsubjectisactive,
doubleclickonthenameofanobjectactivemodedataoftheobjectitself,andtheopeningofthewindowon
propertymanagement.
Page25of119
pgDesignerUserManual rev.26/11/2007
Project
Toenteritemsintheplanisnecessarytocreateanewproject,aloadfromanexistingfile,orimportdirectly
fromanexistingdatabase.Eachprojectcanbesavedtoafileandreloadedatwill.Currentlytherewillbe
twofileformats:iniandxml,andthetwotypesoffilesdifferonlyinthesyntax,bothcontainingthesame
information,forwhichaprojectcanbestoredindependentlyonafiletypeortheother,withoutanylossof
information.
Theprojectfilesarestoredallsettingsoftheproject(egnameandversionofthedatabase,personalization,
etc..),Thepropertiesofobjectsandtheirpositioninthediagram,takingintoaccountdifferencesbetween
differentdisplay.
Inthefollowingpagesdescribesthebasicfunctionsforthemanagementoftheprojects,whilethefile
structureoftheprojectisdescribedinsubsequentchapters.
Page26of119
pgDesignerUserManual rev.26/11/2007
CreateaNewProject
TocreateanewprojectsimplyselecttheitemwithinthegroupFileMainMenu.Itgivesadialog,whichcan
besetpropertiesoftheproject,includingthenameandversionofPostgreSQLyouwanttouseorwhereto
directtheproject.
Asshowninthefigure,inadditiontonameandcombostothelistofdriversPostgreSQLanticipated
pgDesigner,itispossibletodetermineinadvancethescopeofthenewprojectfile,enterthenameofthe
authorandabriefdescriptionoftheprojectitself.Exceptforthenameandtypeofdatabase,allremaining
fieldsareoptional,orwillberequiredwhennecessary.
Intheeventofcancellationunderdevelopment,theprojectwillbeeliminated.
Page27of119
pgDesignerUserManual rev.26/11/2007
CreateaProjectimportingstructurefromadatabase(reverse
engineering)
Selectingtheitemunderthefilemenu,youcanstarttheprocessofloadingthestructurefromanexisting
database,thisPostgreSQLonaserver(localorremote).Beforeyoumaketheconnection,thereisawindow
inwhichtodeterminewhichtypesofimporteditems.Thefeatureloadsalltheobjectsrelatedtowhichthe
connectionismade,discardingallotherelementsevenifpresentonthesamedatabase(egsystemobjects).
DependingontheversionofthePostgreSQLserverinuse,itispossiblethatsomeitemsarenotavailable,
regardlessoftheselectionmadeinthesettingsloading.
Thefigurebelowshowsthedialogboxforsettingtheparametersofloading:
Theloginwindowallowsyoutospecifythedatarequiredforconnectingtothedatabaseserver.Except
password,allsettingsaresavedintheconfigurationfileoftheprogram,andrestoredthenextaccess.As
showninthefigurebelow,thewindowprovidestheopportunitytoenteralltheparametersusefulforthe
connection.Accordingtotheconfigurationoftheserver,someofthesedatacannotbenecessaryordefer
theClassicPostgreSQL.ThroughtheTestbuttonisunabletoverifythecorrectnessofinputparameters,
whiletheConnectbuttonconnectsandstarttheprocessofloading.TheCancelbuttonallowsyoutocancel
theprocedure,inthiscasetheprojectiseliminated.
Page28of119
pgDesignerUserManual rev.26/11/2007
Duringloadingfromthedatabasewillseeaprogressbar,whichwillshowtheprogressinrealtime.Once
started,itisnotpossibletocancelloading,itisnecessarytowaituntiltheendoftheprocess.
Page29of119
pgDesignerUserManual rev.26/11/2007
Openinganexistingproject
pgDesignerallowsrestoreaproject,uploadingrelevantinformationbyspecificstructuredfiles,whichcontain
allthenecessaryinformation.Conceptuallyfilesaretextfiles,andaresettoincludeallthepropertiesofthe
projectandobjectscontainedtherein,includingallcustomizationsleveldisplay,colorandpositioninthe
diagram.Atpresent,therearetwotypesofload,describedbelow,essentiallybasedonfilesinthesystem.
FileLoading
AlsothroughonthisitemintheMainMenuundertheFile,youcanloadapreviouslysavedprojectfiles.It
givesadialogboxthatletsyouselectthefiletoloadfromdiskbasedonitsextension(iniorxml).Once
uploaded,thefileextensionissetasthedefaultprojectandusedinthesubsequentrescue.
Duringtheuploadofthefileandthedecodingofitscontent,youwillseeaprogressbar,whichwillshowthe
progressinrealtime.
UploadingfilesfromSql
Inadditiontostandardprojectfiles,youcanalsocreateaprojectuploadingafilecontainingcommands
purelySQL(egexportdirectlyfromadatabase).Itshouldbeborneinmindthattheorderoftheobjectsin
thefile,andthentherelevantSQL,mustrespecttheorderofcreationoftheobjectsonthedatabase,ifnot
thefunctionofloadingmightbeunabletomakethenecessaryconnectionsandproperlydefiningrelations
betweenobjects.ForthecreationwillbetakenintoconsiderationonlytheonlyitemsunderpgDesigner,and
willbeexcludedfromloadingallthosewhoarenotrecognized.Frombearinmindthatthecomplexityof
decodingSQLcommandsmaycauseerrorsandthuscancelingloadingresultingincancellationofthenew
project.
Asforthestandardprojectfiles,whileuploadingfilesandthedecodingofitscontent,youwillseeaprogress
bar,whichwillshowtheprogressinrealtime.
Page30of119
pgDesignerUserManual rev.26/11/2007
ExportProject
Youcanexportaproject,orSQLrelatedobjectscontainedtherein.InGroupProjectoftheMainMenuisits
voice.Thisopensadialogboxthat,similarlytouploadfeaturefromthedatabase,whichallowsyoutoset
exportitemsandsomeadditionalfeatures,asshowninthefigurebelow,thewindowshowsatopfieldin
whichyoucantypethenamefile(includingpath)onwhichyouwritetheSQLcommands.Optionally,bythe
iconlocatedontherightsideofthefield,youcangorightonthediskdirectoryinwhichtosavethefileitself.
Asalreadynotedseveraltimes,certificationorlessofthetypesofaccommodationprovidedinthepresent
andforselectingparametersexportdependentirelyonPostgreSQLversionselectedfortheproject,itis
possiblethatsomeoftheitemsarenotavailableandoptionsaredisabled.
Asanalternativetowritingonthefile,youcanexportandseethesequenceofinstructionsdirectlytoa
dialogbox,soyoucanimmediatelyseethefinalresult,fromthiswindowwillbepossiblethensaveorprint
thecontents.
Page31of119
pgDesignerUserManual rev.26/11/2007
ExportstofileSql
Asmentionedinthepreviousparagraph,youcancreateandthenexporttofileSQLcommandsrelatingto
thestructureoftheproject.Theresultingfileisatextfile,withsqlextension.Aftersettingtheparameters
definedandexportthefilenametobewritten,willstarttheprocedurecodingSQL,duringwhichyouwillsee
awindowwithascrollbarindicatingtheprogressionofprocessing.Oncestarted,theprocesscannotbe
stopped.
ExportsonDatabase
OverextractionofSQLcommandsonfiles,pgDesigneralsoprovidesforthepossibilityofexportingthe
projectdirectlycreatingthedatabaseonaserverPostgreSQL.Asforexporttofile,theprocedureforexport
databaseprovidesawindowonwhichsettheparametersandobjectsyouwanttocreate.
Asalreadynotedseveraltimes,certificationorlessofthetypesofaccommodationprovidedinthepresent
andforselectingparametersexportdependentirelyonPostgreSQLversionselectedfortheproject,itis
possiblethatsomeoftheitemsarenotavailableandoptionsaredisabled.
Attheendofthedefinitionofparameters,willbepresentedthewindowtoconnecttotheserverPostgreSQL.
Itshouldbeborneinmindthattheoperationiscarriedoutwiththenameandpasswordthatislogged,soit
makessensethatthedatabaseexistsandthattheuseristheowner,oratleasthasalltherightsnecessary
Page32of119
pgDesignerUserManual rev.26/11/2007
forthecreationofobjectscontainedinthedraft.Itemsalreadyinthedatabase,ownedbyotherusers,and
correspondingtothosecontainedinthedraftcauseblockageoftheprocedure,thereleaseofanerror
message.
Itisimportanttonotethat,atpresent,itisnotpossibletoperformanupgradeofexistingobjectsin
thedatabase,anyexistingobjectcorrespondingtothatcontainedinthedraft,willbecompletely
overwritten,resultingineliminationofallexistingdata.Beforeperformingtheprocedureforexport,
werecommendmakingabackupofpreventiveandcomprehensivedatabase.
Note:thepossibilityofcreatingdatabaseinaparticulartypeofobjectisdependentontheserverversion
PostgreSQL,itisnecessarytobecarefulbeforeproceeding,andanyinconsistenciescauseblockageofthe
procedureandreleaseofanerrormessage.
Duringtheprocessofcreatingthedatabasewillseeaprogressbar,whichwillshowtheprogressinreal
time.
Page33of119
pgDesignerUserManual rev.26/11/2007
SavingProject
Tosavetheprojectfile,sothatyoucanrestorelatertomakefurtherchangesorcreateadatabase.As
mentionedpreviously,youcansavefilesontheprojectintwoformats:iniandxml.Itgivesadialogboxto
allowthetypeofthefileanditsextension(iniorxml),theextensionofthefilewillbeusedasadefaultinthe
draftandusedforthenextrescue.
Accordingtotheselectedfiletype,thetimerequiredforrescuecanbeverydifferent;usuallyaniniisfaster
while,byitsinherentstructure,savingafilexmlbemuchlonger,thesamedata.
Whenyousavethefileyouwillseeaprogressbar,whichwillshowtheprogressinrealtime.
Page34of119
pgDesignerUserManual rev.26/11/2007
PrintingtheDiagram
ComparedtothepreviousversionofpgDesigner,thepreviewandprintdiagramofaprojecthasbeengreatly
enhanced.Withthisfeatureyoucansendgraphicdiagramontheprinteroradiskimagefile.
Preview
ByselectingtheiteminthisgroupProjectofthemainmenuopensawindow,asshownbelow:
Asshowninthefigure,thepreviewwindowismadeupofsomeareas.Intheupperzonearesomefields
thatdisplaythecurrentconfigurationofthepress,whichyoucanchangeusingthe"PrintSetup".Ontheright
isaverticalpanel,whichdisplaysthumbnailsofpagesinwhichitbrokedowntheplotoftheproject,
dependingonsize,theirorientationandprintresolution,theformatoftheseminiaturesmaybedifferent.At
thecenterisapanelthatdisplaysthecurrentpage,thepagedesignisforobviousreasonsdimensionedto
fittoavailablebutgivesanideaofhowthereleasewillbemadefinal.
Apagecanbeselectedanddisplayedinthecenterpanelbyclickingontheleftbuttononathumbnail
displayedonthesidepanel,theselectedpagewillbedesignedwithdimensionsgreatercentralpanel,while
theminiaturewillbehighlightedbyaborderofred.Inoneofthefieldstotheupperwindow,seethecurrent
pagenumberandthetotalnumberofpageswhichmakeuptheplot.
Giventhesizeoftheplotoftheproject,asdescribedinpreviouschapters,pgDesignerprovidesanalgorithm
thatdeterminestheareasusefultothepress,eliminatingareasthatdonotcontainobjectsorgraphic
elements(seeareasandkeyrelation);this,soavoidunnecessaryprintingblankpagesandconsequently
Page35of119
pgDesignerUserManual rev.26/11/2007
wastingpaper(alittleeconomyandlesswoodtobecut).
Asmentioned,eachpagecontainsasectiondiagramoftheprojecttoidentifypagesoneachsheetisdrawn
oneedgeand,externally,basicinformation,includingthenameoftheprojectandthedateofrevision,the
datepressandpagenumber.
Asmentioned,youcanatanytimechangetheprintsettings,accessingtoawindowinwhichyoucan
determineboththedriverandthedestinationprinter,thesizeandorientationoftheprints.Thesettingwill
remainvalidevenaftertheclosureofthepreviewwindow,andreportedonthediagram.
Asyoucanseeinthewindowaretwocheck,thefirsteverythingpossibletoreducethegraphinasingle
page.Obviously,thesizeofthegraphcanheavilyinfluencethischoice,averylargegraphcouldbeillegibile
ifreducedandprintedonasinglepage,speciallytrainedinverysmallprint.Thesecondcheckcansavethe
graphicimagetoafile.
Print
Asdescribedmorefullyenoughinthepreviousparagraph,usingthepreviewwindowcanbesenttothe
printerpageswhichmakeupthediagram,withtheprintsettingsdefinedinPrintSetup.Itshouldbebornein
mindthattheentireplotofaprojectisbuiltonascaleindicativeof4x3A4pages,soasmentionedinthe
previousparagraph,itispossiblethatifIcheck"FittoPage"selectedthefinalprintisillegible.
ImageFileCreation
CheckPrintasImage",onthewindow,allowsyoutoexportthegraphimagetoafile,sothatwecanenter
intoanydocumentation.Currentlymanagedanumberofimagetypes:PNG,BMP,GIF,JPGandXPM.
Page36of119
pgDesignerUserManual rev.26/11/2007
Reporting
AmongthevariousbackgroundsprovidedinpgDesigner,itispossibletoproduceaseriesofdraft
documentsindifferentformats.Thedocumentscontain,inatextualanddescriptivecontentoftheproject,
theobjectscontainedthereineachwithitsrespectivepropertiesandconfigurations.Atpresent,andthe
inclusizioneanewlibrary,itispossibletoproducethedocumentsinthreedifferentformats:html,pdfand
text.Theresultisdisplayedonawindowwhereyoucanexportthecontentstofileorsenditdirectlytothe
press.Inthefollowingparagraphsdescribestheparticularitiesofeachoftheseformats.
DocumentationinHTMLformat
SelectingitsvoiceinthegroupProjectofthemainmenu,youcancreateprojectdocumentationinHTML
format,whichmakesitpossibletobereadinaweb.Whenthestructureofthistypeofdocumentationis
fixed,withcolorgraphicsanddefaultsettings.Aswithotherformats,documentationmainlyconsistsofa
header,listingallthegeneralpropertiesoftheproject,andthedetailsofeachobjectwithallitsfeatures,
exceptforthepropertywithinthegraphicdiagram.
Thewindowshowninthefollowingfigureshowsanexampleofdocumentsinthisformat.Asyoucansee,
thewindowalsopresentsasimplemenu,throughwhichyoucansavethecontentstoafileorsenditdirectly
tothepress.
Page37of119
pgDesignerUserManual rev.26/11/2007
DocumentationinPDFformat
SelectingitsvoiceinthegroupProjectofthemainmenu,youcancreateprojectdocumentationinPDF
format.Aswithotherformats,documentationmainlyconsistsofaheader,listingallthegeneralpropertiesof
theproject,andthedetailsofeachobjectwithallitsfeatures,exceptforthepropertywithinthegraphic
diagram.
Thewindowshowninthefollowingfigureshowsanexampleofdocumentsinthisformat.Asyoucansee,
thewindowalsopresentsasimplemenu,throughwhichyoucansavethecontentstoafileorsenditdirectly
tothepress.Underthemenuisabarthatallowsyoutoviewpagescomponentsdocumentation,sizeand
thecontentaccordingtotheirneeds.
Page38of119
pgDesignerUserManual rev.26/11/2007
DocumentationinTXTformat
SelectingitsvoiceinthegroupProjectofthemainmenu,youcancreateprojectdocumentationintext
format.Aswithotherformats,documentationmainlyconsistsofaheader,listingallthegeneralpropertiesof
theproject,andthedetailsofeachobjectwithallitsfeatures,exceptforthepropertywithinthegraphic
diagram.
Thewindowshowninthefollowingfigureshowsanexampleofdocumentsinthisformat.Asyoucansee,
thewindowalsopresentsasimplemenu,throughwhichyoucansavethecontentstoafileorsenditdirectly
tothepress.
Page39of119
pgDesignerUserManual rev.26/11/2007
Otherfunctions
IntheparagraphscontainedinthischapterdescribessomefeaturespgDesignernottiedtoaproject,butare
usedoraretoassistinthemanagementoftheapplication.
Page40of119
pgDesignerUserManual rev.26/11/2007
ConfiguringpgDesigner
ThesettingsgeneralpgDesignerareenclosedinaseparatewindow,accessibleviathemainmenu.Through
thiswindow,youcanchangeboththelookandfeelofopenandprojects,bothdefaultparametersfornew
projects.
ThewindowconsistsofaseriesoffolderscontainingthegeneralsettingsandcurrentpgDesigner,observed
bythegeneralconfigurationfile,whichwillbediscussedinlaterchapters.
Asyoucanseeinthefigurebelow,intheMiscellaneousfolder,thereareavarietyofsettings,definingboth
theoveralllookandfeelofpgDesigner,theconditioningofsomefeaturesofthebackground,ortoconfigure
thedefaultvaluesfornewprojects.
Checkthe"Toolbar"letsyouhidethepanelunderthemenu;
CheckStatusPanel"allowsyoutohidethelowerpanelinthemainwindow;
Checkthe"Paneltools"letsyouhidethepanelofinstrumentsontheleftsideofthemainwindow;
Check"Tooltip"enablesthedisplayofdescriptionsthatappearwhenyoumouseoveranobject(ega
button);
Thecombo"Panelprojectsdeterminesthepositionoftabspanelprojects;
"AutoSave"isusedtobeaprocedureinthebackground,whichperformsautomaticsavingprojects
changed.Thevaluecontainedinthisfielddeterminestheperiodoftimebetweenarescueandthenext,
thevalueisconfigurablewithstepsof5minutes,avalueofzerodisablesfunctionality;
Thevaluecontainedinthe"elementsinthelist"determinesthemaximumnumberofhistoricalitems
storedintheconfigurationfile,andusedtopopulatethemenuRecentunderthemainmenu,whichis
usedtodirecttheopeningofaprojectonthisdisc;
Page41of119
pgDesignerUserManual rev.26/11/2007
Checkthe"Limitspage"featureenablesthedesignofdividinglines,orlimits,pagewithinthediagram,in
ordertoseehowthegraphcouldbedividedintobeingprinted.Theselimitsaredesignedintheformof
dottedlinesoflightgray,inordernottointerferewithvisualobjectscontainedinthediagram;
coordinatesandsizeoftheresultingareasaredeterminedbasedonthecurrentprintsettings,andthe
correspondingsizeandtheorientationofthepaperprint.
The"fileextensionproject"definesthedefaultextensionfortherescueofnewprojects;thisvalueis
purelyindicativeandsubjecttoconstantchange,beinginfluencedbyloadingproceduresandrescue
projects;
Thecombo"PostgreSQL"determinesthedefaultdatabasedriver,thesettingisusedasadefaultfor
newprojects,buthastobearinmindthatcouldaffecttheloadingofprojectsfromsqlfiles,whichdonot
providepreciseidentitydatabasedestination;
Checkthe"Panellistitems"affectsvisibilitypanellocatedtotherightofthediagramofaproject,the
conditionisnotessential,sincethesizeofthispaneltocompletediscretion,evenwhenusingthe
application.
Inthenextfolder,thesecondfromtheleft,containssomesettingsthataffectthevisibilityofobjectsinsideof
theprojects.Specifically:
Fortablesyoucanhidethedetails,orthelistoffieldscontainedinthesametable,ordecidewhetheror
nottodisplaytheonlykeyprimary,orevensimplyviewthetypeofeachfield;Notallcombinationsare
possible,infactifyouchoosenotgenerallyseethedetailsofthefieldsinyourtable,youcannotselect
thecheckonlykeyfields.Checkalsoaffectsthedisplayofotheritems,forexamplefortherelationswe
canseewhetherornotthenamesofobjects(intheformoflabelsplacedatthecenterofeachline),or
forproceduresdisplayorhideparametersentryandexit;
Checkthecontentsinthe"Objects"allowyoutohidecertaintypesofobject,withtheexceptionoftables
andrelationsintheabsenceofwhichtheplotwouldbemeaningless;
In"Relations"therearesomesettingstothetypeofdisplayyouwanttoconfigureonlyforrelations;
Page42of119
pgDesignerUserManual rev.26/11/2007
check"Labels"letsyouhidethelabelswiththenamesofrelationsonthediagram,while"Typeline"and
"Typehook"youcandeterminehowtheyaredrawnlinesrelation.Ifthe"Typeline"issetto"direct",the
linefollowsadirectlinefromthetableoforigintothedestinationtable,butifitissetto"Segment"lineis
presentedasaseriesofhorizontalandverticalsegmentsperpendicular.If"typehook"tobeimposedon
"Table",thelinewillstartfromthebottomofthetableoforiginandendingontopofthetablelocation,
butifitissetto"Field",thelinestartsfromtherightsideatthefirstfieldusedinthereportinthe
establishmentoforiginandendingontheleftsideatthefirstfieldusedinthereportofthedestination
table.
Inthethirdfolder,thefile"Colors",therearethreeotherfoldersinwhichyoucandefinethecolorsof
individualtypesofobjectsdesignedinthediagram.Itshouldbeborneinmind,andwillbedescribedlaterin
laterchapters,whichpgDesignerinsidedefinesthreeclassesofobjects,accordingtotheapproachand
graphicsfromwhichitisputintotheprojectgenerallyobjects(tables,etc..),relations,andtexts;forthe
zones(anobjectpurelychart),thecolorsettingsareincludedinthesamecustomizedandindividually.
Eachcolorfoldercontainswithinitalistofdescriptions,referencestomanyaspectsgraphicsforthetypeof
objectthatisgearingtreatingeveryreferencetotherightonabutton,thecolorofwhichreflectsthecurrent
settingofthepropertydescribed.Ontherightofthewindowisapanelwhich,accordingtothetypeofobject
thatisgearingsetting,graphicallyshowsanexampleofhowthiswillbedisplayedinthediagram.Tochange
acolorsimplypressthebuttoncorrespondingtothepropertytobeamended,soastoopenadialogbox,
whereyoucandefinethenewcolor,includingthroughtheestablishmentofRGBvalues.Theamendment,
onceconfirmed,willbeshownintheexample.Attheendofconfiguration,andsavethenewsettingswillbe
presentedwithaconfirmationmessage,whichwillbepossibletodeterminewhetherthenewapproachwill
beappliedtoallprojectsopenononlyactiveproject,orsimplystoredforthenextnewprojects.Itis
consideredthatifthechangesareconfirmedandappliedtotheprojects,theywriteaboveallcustomizations
madeonindividualitems,andwillbesavedwiththeproject,otherwiseanycustomizationperformedon
individualobjects,loadingaproject,theytakeprecedenceoverthedefaultsettings.
InFolder"Objects"arethesettingsofcolorforallitems,exceptrelations,areas,andtext.Apartfromthese
particulargroupsofobjects,everythingelseisgraphicallyasawindow:atitle(thenameoftheobject)ina
Page43of119
pgDesignerUserManual rev.26/11/2007
rectanglesimilartothetitleofawindowonthedesktop,andalightgray,containsdetailsoftheobject(inthe
caseofatable,thelistoffields...).
Inthesecondfolder"Colors",therearethecolorsettingsfortheobjectsoftyperelation.Objectsoftype
relationoccurintheformoflines,whosecontinuityisconditionedbythetypeofrelationship(mandatory,not
mandatory,etc.)Betweentables.Thepointofattackwiththesourcetable(Tablefather)isdefinedwitha
smallsquareoffullcolor,whilethepointofattackonthedestinationtable(Tabledaughter)isdesignedasa
bitofarrowalwaysfullofcolor;inexactlyhalfthislineisalsoasmallrectanglefullcolor,andifIcheck
"Label"isenabled,nexttoitthenameofthereport.Thecolorsettingsforboththepointsattachethatthe
sameline.
Page44of119
pgDesignerUserManual rev.26/11/2007
ThelastfolderTexts"candefinecolorsoftheobjectsoftypetext.Asyoucanseefromthefigure,these
objectsaresimpletextchartscontainedinasmallareaofsizedependenttext.Insubsequentchaptersthis
typeofobjectwillbedescribedinmoredetail.
Page45of119
pgDesignerUserManual rev.26/11/2007
ThewindowStatistics
Thestatisticswindowcontainsawealthofinformationtiedtothecurrentstatusofaproject.Asyoucansee
inthefigurebelow,inthetopofthewindowdisplayssomeoftheinformationthatispresentinthe
parametersoftheproject,namely:thenameoftheproject,thenameofthefilecontainingtheproject,the
projectdescription,extendingusedforfileandanicon(orLEDs)toindicatethestatetoamendcurrent(red=
amended).
Inbelowareaseriesoffolderscontainingsomestatisticalinformation:StatisticsListobjects,fields,display.
InFolder"Statisticsarethevaluescorrespondingtothenumberofelements,dividedbytype,containedin
thedraft.
Page46of119
pgDesignerUserManual rev.26/11/2007
Thefolder"Listitems"listcontainsthenameandtypeofallobjectsintheproject.Thelistalsohasa
function,thedoubleclickofthemouseonalinelistedmakesactiveontheobjectcorrespondingdiagram
andopensthewindowforeditingpropertiesoftheobjectitself.
Thefolder"Fields"presentsalistwiththenamesofallthefieldsinalltablesintheproject,inadditiontothe
nameofthefieldarealsodisplayedreferencestothenameofthetabletheybelong,thetypeandsizeofthe
Page47of119
pgDesignerUserManual rev.26/11/2007
field.Asforthelistcontainedinthefolderpriortothefeaturelistalsoactive,doubleclickthemouseonaline
listedmakesactiveonthetablecorrespondingdiagramandopensthewindowforeditingpropertiesofthe
objectitself.
Thelastfolder"Display"containsalistofdisplaycontentintheproject.Aswiththeprevioustwofolderslist
hasafunction,thedoubleclickofthemousemakesthedisplaycorrespondingactive,displayingthecurrent
diagram.
Thestatisticswindowalsohasamenuwithwhichyoucansavetofileorprintertosendlistsofitems
described.
Page48of119
pgDesignerUserManual rev.26/11/2007
Changinglocationcoordinatesofanobject
Tochangethepositionofanobjectintheplot,eventakingintoaccounttheactivedisplay,thereareseveral
options:movingthroughmouse(pressingtheleftbuttonanddraggingonthedesiredcoordinates),orby
settingcoordinatesmanually.Inthesecondcase,thefunctioncanbeactivatedbyopeningthemenupopup
byfirstselectingtheobjectwiththemouse,ordoubleclickonthepanelarestateatthecampwheretheyare
usuallydisplayedatthecurrentcoordinatesoftheobjectselected,allcasesmustfirstproceedtothe
selectionoftheobject.Themotionrequirescoordinatedbytheuseofadialogbox,onwhichtherearetwo
fieldstoXandYcoordinatesoftheupperleftcornercomparedtothediagram,usingthesetwofields,you
canenterthenewcoordinates,bearinginmindthesizeofthecurrentanddiagrams,soasnottoplacethe
objectoutsidethegraphics.
Page49of119
pgDesignerUserManual rev.26/11/2007
Customizingcolorofanobject
Asforthegeneralsettings,whichyoucandefinegloballycolorsoftheobjects,itisalsopossibleto
customizethesesettingsforasingleobject.Thefunctionisactivatedbyselectingtheobjectandopeningthe
popupmenu,dependingonthetypeofobject,thewindowispresentedthatcantakeseveralaspectsbutin
anycaseisverymuchlikethatofthegeneraloptions.Eveninthiswindowaretwodistinctareas,leftpanel
containsalistofsettingsfortheobjectcolorandbuttonsforediting,whileontherightispresentexamplesof
thepanel,whichisdisplayedinthepreviewissuegraphobjectwiththenewcolorsettings.
Asdescribedabove,customsettingsonasinglesubjectwillbeundoneifthesettingischangedgeneral.
Page50of119
pgDesignerUserManual rev.26/11/2007
Findingobjectswithinaproject
InpgDesignerwasimplementedasearchfunction,whichallowsuserstofindspecificitemswithinaproject.
Thewindowisactivatedfromthemainmenuanddisplaysasimplefieldinwhichyoucantypeyourname,or
partthereof)tosearch,asearchforpartialoronpartialnames,youcanusethecharacter'*'.Afterthe
search,iffoundcorrespondence,thelistwilldisplayalistofobjectsfoundandwherethereare(forexample
afield,thenameofthetablethatcontains).Doubleclickofamouseontheobjectselectlineinthediagram
andopensitseditingwindow.
Page51of119
pgDesignerUserManual rev.26/11/2007
Viewingofthelog
Duringitsoperation,pgDesignerstoresthecurrentstatusofaspeciallogfile.Youcanseethecontentsof
thisfilebyopeningthewindowfromthemainmenu.Thecontentsofthewindowcanbeexportedtoanother
fileorsentdirectlytotheprinterviamenuitemsinthesamewindow.
Thelogfileisplaintext,anddesignedtocontainreferencestothedateandtimeoftheeventanda
descriptionoftheevent.
Note:EveryrestartpgDesignerthefileisclear,therefore,theinformationpriortothelastlaunchwillbelost
incaseofanomaliescouldbeusefultohaveavailablethecontentsofthelog,soyoushouldsavethefilein
ordertotransmititinattachedtoapossiblereporting.
Thelogfileiscontainedinthedirectory.pgdesigner/log,inHOMEdirectoryofuser.
Page52of119
pgDesignerUserManual rev.26/11/2007
Seriouserrors
IfthereisaseriousanomalyintheuseofpgDesigner,thewindowispresentedinthefollowingfigureshows.
Thiswindowcontainstheerrorcodefound,andabriefdescriptionofthelocationwhereitoccurred.Ifbugs,
theinformationwillbeusefultoidentifyandcorrecttheerror,soitwillbeusefultorefertothesedatawhen
reportingthebug.
Note:Theclosureoftheapplicationwindowwillbefinishedanyway,andtheunsavedchangeswillbelost.
Page53of119
pgDesignerUserManual rev.26/11/2007
ProjectView/Display
Foreachproject,youcancreateviews(display,orevenschemes),whichisgivenaparticularmodeofvisual
objectsoftheproject.
MainView
EachprojectislinkedaMainVista,whichcontainsallobjectsoftheproject.Throughthecreationof
additionalviews,itispossibletoseparateobjectsinlogicalgroups.Anexamplecouldbeseeninagroup
"Codes"allpurelyobjectscontainingdataencryption(egmeansofpayment),orasight"customers"all
tablesonthemanagementofcustomers(egdata,invoices,etc..).Unlikepersonalviews,theMainViewcan
notbealteredorerased,sinceitcontainsallobjectsoftheproject.
CreatingCustomViews
Asdescribedinthepreviousparagraph,exceptforthemainview,allviewsorcustomcreatedcanbe
modified(addingorremovingitems),orremovedfromtheproject.Anytransactionmadeontheviewdoes
notaffecttheobjectsoftheproject,butitisalsopossibletomanageeverysingleitemregardlessofitsplace
inanyview,inthisway,anychangeinconfigurationofanobjectwillbereflectedinallviewscontainingit.
Uniquesettingemployeesight,isthepositionoftheobjectinview,whichcanbedifferentandmodified
independentlyoftheother,soitispossibletomodifythelayoutofeachview,independently,indifferent
waysbyplacingobjectsonitcomparedtootherviews.
Page54of119
pgDesignerUserManual rev.26/11/2007
Managingobjectsinacustomizedview
Itshouldbenotedthat,withregardtotheobjectstableviewwillbereflectedinalltherelationsbetweenthe
sametablewillnot,however,appearlinkedtorelationstablesNotinsight,althoughoneofthetablesis
presentisthenessentialthattoseearelationmustbeseeninallandtworelatedtables.
Notethattherelationobjectsaretheonlyitemsthatcannotbedefinedmanuallywithinasight,and
thereforedependonlogicalconditions.
Throughthewindow(selectablefromthemainmenu),asshowninthefigurebelow,youcancreatenew
viewsoramendthosealreadyintheproject.
Incombo"Display"listsallviewsontheprojectwiththeexceptionofMainView,whilethelist"items"
displaysalistofallobjectsintheproject.Foreachview,youcanenterabriefdescription.
Atthebottomofthescreenarebuttonswithwhichyoucancreateanewview,modifyordeleteanexisting
one,thebuttons"Save"and"Cancel"willbeshownexclusivelyinthestateofchange,respectively,and
allowyoutosavechangesmadeavieworrestorethepreviousconditions.Anychangewillbereflected
immediatelyinthegraphatthecloseofthewindow.
Thenameofeachnewdisplayissetautomaticallybytheprogram,accordingtotheorderofcreation.On
loadingaproject,alldisplayswillberenamedinhowweresaved.
Selectingadisplayinthecombo,allobjectsinviewassociatedarehighlighted.Itispossibletomodifythelist
ofitemsvision,selectingwiththemouse;removingthehighlightofanobject,itisremovedfromdisplay.
Selectingmultipleobjectscanbedonebyholdingdownthecontrolkeykeyboardandactingwiththeleft
mouseclickontheelementsofthelist.
Page55of119
pgDesignerUserManual rev.26/11/2007
Itshouldberemembered,aswelldescribedinpreviouschapters,andthroughthepopupmenuorthemain
menuallowsyoutocopyanobjectinadifferentview,inwhichcasetheprocedurepresentsawindowin
whichtodefinetheviewofdestination:
Asshowninfigureisreportedbythenameofthecopy,whilethecombo"Display"presentsalistofallviews
intheproject,excludingMainVista.
Page56of119
pgDesignerUserManual rev.26/11/2007
EntitiesandObjects
Eachelementinaprojectistreatedasanobjectdefinedbyitspropertiesandcharacteristics,whichwillbe
usefulinbuildingthephysicalelementinthedatabase.Thesepropertiesaresavedintheprojectfilealong
withthepositiononthecharts,includingthepositionwithineachviewdefinedintheproject.Thenext
readingprojectfile,restorethepropertiesandpositionspreviouslysaved,includingtheirpositionsinthe
graph.
Everysingleobject,bothvisuallyandwiththeexceptionofobjectsoftyperelation,text,andareasisshown
onthechartasasmallwindow,completewithtitle(nameoftheobject),andanyotherdetails(egfieldsa
table).Aspecialicontotheleftofthistitle,visuallyidentifiesthetype(orgroup)oftheobject.
Inadditiontotheiconofthegroup,inordertodistinguishoneobjectfromanother,eachelementmust
necessarilyhaveaname,whichhasuniquewithinthesameproject.Thenameisbeingsetcreation,butcan
bechangedlater(obviouslyrespectingthelogicofmandatoryanduniqueness).Thislogicisvalidalsofor
PostgreSQL,whichallowsformoreobjectswiththesamename,althoughofadifferentnature.
Asfortheobjectsoftypetablesandviews,youcanmakevisibleonthechartalsotheirfields.Thetablesare
displayed:nameofthefield,typeandsizeaswell,ifinanindex,theindextype(single,primarykey,foreign
key...).Theviewsdisplayonlynamesofthecolumns.Ontherightofeachfield,youseeaniconthat
identifieswhetherthisisaprimarykey,aforeignkeyoranormalfield.
Itispossibletosetthedetailsofthecontentofitemsaffectingthelookandfeelwithinthediagram,for
exampletablesandviews,youcanseewhetherornotthefields.
Asfortheobjectsoftyperelation,forobviousreasonstheseobjectsfollowacompletelydifferentlogic;their
graphicrepresentationisdependentonthepresenceandpositionofrelatedtables.Therelationappearsin
theformofaline,whichcanbecontinuousordashed,accordingtothetypeofconnection(mandatoryor
otherwise)betweenthetwotables.Atthemomentitisnotpossibletomanuallymovearelation,whose
designisdoneautomaticallybytheprogram.Theyarestillafewpossibilitiesforcustomization,internal
engineusedbytheapplication,whichaffectsomeaspectsandthevisualtrackingofarelation:thetypeof
connectionandthetypeofcouplingbetweenthetwotables.Throughthefirstapproachcanbedefinedas
thelineisdrawnfromtabletotabledaughterfather,whichmaybeonlytwoways:withastraightorastraight
linesegmentscomposedofhorizontalandverticalperpendicular,whichpointsstartandendarelinkedthe
twotables.Thesecondapproachdeterminesaspointsofattackontwotablesarecalculatedandshownon
thechart:thetopandbottomedgesofthetableoratcampsintherelation,inthefirstcase,thelineisdrawn
fromthebottomofthetableandendingfatheronthetopedgeofthetabledaughter,thesetwopointsare
representedinrealtime,atthemovementofoneoftwotables,andtheirpositioniscalculatedautomatically
evenconsideringtheexistenceofotherrelationsonthesametable,inthesecondcaseriggingpoints
startingfromtherightsideofthetablefatheratthefirstcampthatmakestherelation,andendingontheleft
sideofthetabledaughteralwaysatthefirstfieldinrelation.
Thepointofthelineofrelationisrepresentedbyasmallsquare,whilethefinalpointcomesasabitofarrow,
thisapproachwillhelpyouunderstandimmediatelythedirectionofrelationandhowthetwotablesarelinked
witheachother.Aswithotherobjects,youcanselectactiveandmakearelationwiththeclickofamouse
nexttothelineorpointsofattackandifthedisplayisactivelabels,theclickofamouseonthenameofthe
relation,whichisdisplayedincentralline,willallowtheselectionofrelation.Doubleclickonarelationwill
Page57of119
pgDesignerUserManual rev.26/11/2007
bringchangeforthemanagementofthepropertiesoftheobject.
Creation
ThecreationofanobjectispossibleviatheToolsPanel,whichcontainsbuttonsforalltypesofobjectthat
canbeincludedinaproject,orthroughtheMainMenu,whichcontainsentriescorrespondingtopanel
buttons.Inadditiontothisyoucanopenthepopupmenuinthediagram,whichcontainsthesameitemsin
theMainMenu.
Dimensions
Allgraphicelementsinthediagram,withtheexceptionofobjectsoftypeareaandrelation,areautomatically
sized,anddependingonthetypeofdetaildefinedinthewindowofbroadoptions.Forobjectsoftypearea,
youcanchangetheirsizeactingwiththemouseattherightandbottommargins,holdingdowntheleft
buttonnexttothesemarginsanddraggingthemouseuntilitreachesthedesiredsizevisually.Asalready
mentioned,thedesignofrelationsisperformedautomaticallybytheengine,basedonthecurrentpositionof
thetworelatedtables.
Movement
Allgraphicelements,withtheexceptionofobjectsoftyperelationcanbemovedwithinthediagram,forthe
movementsimplyselectingtheobjectwiththemouseandholdingdowntheleftbutton,dragtheobjecttothe
desiredposition.DoubleclickonthePanelofStateatthebottomofthemainwindow,atthefieldthat
displaysthecurrentcoordinatesoftheobject,opensadialogboxwhereyoucansetthepositionofmanually
enteringvaluesinpixelsXandYcoordinatescorrespondingtotheupperleftcorneroftheobjectinrelation
tothediagram.Asalreadymentioned,thedesignofrelationsisperformedautomaticallybytheengine,
basedonthecurrentpositionofthetworelatedtables.
Editing
Asalreadymentionedintheprecedingparagraphs,modificationofthepropertiesofanobjectcanbecarried
outinseveralways:withthedoubleclickofthemouseonthesamewithinthediagram,orwiththedouble
clickofthemouseonthecorrespondingnameinthethislistofitemstotherightintheproject.
Deleting
Youcandeleteanitemfromtheprojectbyopeningthepopupmenudirectlyonthediagramofthesameat
selectingitwiththemouseor,asmodified,bythelistofobjectspresentintheproject.Onceremoved,the
objectwillnolongerberecoverable,andallreferencestoitarealsodeleted,incaseofremovalofatable,it
willalsodeleteallreportsrelatedtothis.
Copyonanotherproject
Asforthecopyondisplay,pgDesignercancopytheinformationandthepropertiesofanobjectonanother
Page58of119
pgDesignerUserManual rev.26/11/2007
projectamongthelistofprojectsopen.Theobjectinthiswillberecreatedinsidethetargetproject,cloning
itspropertyanditsfeatures,exceptforreferencestootherobjects.Ifthetargetprojectisalreadyanobject
withthesamename,thecopywillbecanceled.
Asyoucanseefromfigureinthewindowacopyappear:thenameoftheobjecttocopy,thesourceanda
combocontainingthelistofprojectsopeninpgDesigner;viathecomboyoucanselectwhichprojectwillbe
copiedtotheselectedobject.
Page59of119
pgDesignerUserManual rev.26/11/2007
DescriptionofObjects
ThischapterdescribesindetailallobjectsusedwithinpgDesigner.Moreoverbedescribedaschangingthe
propertiesandcharacteristics.
Exceptincertaincases,theywillnotbegiventechnicalexplanationsontheuseandfunctionalityofobjects
withinadatabase,whichcanbefoundintheofficialdocumentationofPostgreSQL.
Atthecurrentstatusareprovidedalltheinformationnecessarytocreateobjectsfromversion7.0upto8.2of
PostgreSQL,thisrequiresaknowledgeofthecharacteristicsofthedatabasethatyouwanttocreate,soitis
possiblethatsomefeaturesarenotavailableintheserverdatabasethatyouhaveorthatyouuseforthe
project.
Bychangingthecharacteristicsofeachobjectdescribedinthefollowingparagraphs,thereisadialog,which
isdifferentdependingonthetypeofobjectthatisgearingdealingwith.Allwindowsareactivateddescribed
inmodal,oryoucannotactoutsideofthem,untiltheirclosureforconfirmationorcancellationofoperations
changes.Normally,eachwindowismadeupofanareathathasseenthenameoftheobject;acentral,
possiblydividedintofolders,containingallthenecessarycontrolsforthesettingsrelatingtothesubject
property,andabaronlowerwherearethenecessarybuttonsfor:savingchanges,deletetheobjector
reverseanychanges.Anychangesmadeandsaved,thedatainthiswindowwillbestoredinthe
configurationoftheobjectitselfand,accordingtothedefinedgraphics,displayeddirectlyinthegraph.For
someitems,suchastables,therearemorebuttonstoactivatethemanagementofindividualfieldsofthe
objectoritsindices;forsuchobjectsaremorewindows.Itisconsideredthatanychangesmadeand
confirmedinthewindowstomodifyelementsofanobjectbelow,therearevoidifchangesaremadevoidin
theprimary,forexample,tables,changesmadeandconfirmedonindividualfieldsarenotannulledby
pressingtheCancelbuttonintheeditwindowofthetable.
Page60of119
pgDesignerUserManual rev.26/11/2007
Area
Theareasareanewtypeofobjectgraph,whichallowstodrawcoloredrectangularareaswiththe
opportunitytoviewatextontheinside,thistypeofobjectisusefulforinstancetodefinegroupsofobjectsin
thediagramrelatingaparticulartypeorfunctioninsidethedatabase.Theseobjectshavepropertiesnot
active,orexerciseanyinfluenceonobjectscontainedinthedraft,andcanbedefinedindependentlyofany
displayoftheproject.Foreacharea,youcandefinethefillcolorand,optionally,alineoftextasa
descriptionofwhatyouwanttoenclose.Creatingobjectinselectingthepanelinstruments,fromthemain
menuorfromthepopupmenubypressingtheleftmousebuttoninachartdisplayinganddraggingthe
cursortothesizedesired;releasingthebuttonwillsetthefinalcoordinated.Duringbuilding,appearonthe
chartthenewarea(initiallygraycolor),whichconstantlymonitorthedesignphase,soastoenabletheuser
toverifyinrealtimetheactualsize.Itshouldbeborneinmindthat,forpracticalreasons,theareaswith
smallersidesof50pixelspersidewillbeautomaticallyeliminated,whynotconsideredusefulandto
eliminatethepossibilityofcreatinginvisibleobjects(suchasanobjectfrom1x1pixels)thatcouldcreate
problemsfortheircancellation.Thenyoucanchangethesettingsofthenewbusinessdoubleclickwiththe
leftmousebuttononhimself,whowillpresentadialogwiththecurrentownershipofthenewitem.Atany
timeyoucanmoveorresizeasubjectarea:inthefirstcase,aswithothertypesofobject,justselectthe
objectwiththemouseandholdingdowntherightbutton,dragthegraphicelementtothepositiondesired,in
thesecondcase,thesizecanbechangedbydraggingtheedgesorbottomrightuntilhereachesthedesired
size.
ThefigurebelowshowsthewindowistomodifyanobjectArea.Likeallobjects,thewindowpresentsafield
whereyoumustenterauniquenameinthedraft.
The"Text"letsyouenteradescription,thatnotewillbedisplayedintheupperleftcornerinsidethegraph.
Optionally,youcanhighlightthetextinbold,actingonthecheck.
Incorrespondenceofthe"Color"isabuttonthatrepresentsthecurrentbackgroundcoloroftheobject,
pressingthisbuttonwillaccessthewindowforselectingcolors,tochangethecurrentsetting.
Inadditiontotheabovesettings,youcanmanuallydefinethepositionandsizeofthechart,enteringthe
coordinatescorrespondingdirectlyatthetopleftcorneroftheobjectanditssizewidthandheight.
Anysuchchangewillbeeffectedreflectedinthediagramoftheprojecttoclosethewindowchange.
Page61of119
pgDesignerUserManual rev.26/11/2007
Domain
FortechnicalspecificationsrelateddomainscanbefoundintheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjectdomain.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupofthreefolders,groupinginthedifferentlogical
characteristicsoftheobject
Inthefirstfolder"data"arethebasicpropertiesoftheobject.Thecombo"Type"containsalistofalldata
typesallowedforthereleaseofPostgreSQLselected,andifyoupositionyourmousenexttothecombo,and
ifitturnstooltipoptionsingeneral,youseeabriefdescriptionthetypecurrentlyselected.
Thesecondfolderisanareawhereyoucanenteradescriptionoftheobject;PostgreSQLprovidesfor
almostallobjectsapropertyComment,toallowtodocumentobjects.
Page62of119
pgDesignerUserManual rev.26/11/2007
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page63of119
pgDesignerUserManual rev.26/11/2007
Procedure/Function
Fortechnicalspecificationsregardingtheprocedurescanbefoundintheofficialdocumentationof
PostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjectprocedure(orfunction).
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupoffourfolders,groupinginthedifferentlogical
characteristicsoftheobject.
The"Topics"youcanenteralistofparametersoftheprocedure,separatedbyacomma;theprocedure
checksthevalidityofstringsenter,whichmustmatchinthetypesacceptedbyPostgreSQL,includingtypes
defined(asdescribedinthefollowingparagraphs).Ontherightofthisfieldisalsoabutton,whichopensa
shortlistcontainingalltypes;selectionwiththedoubleclickofthemouse,movethetypeselectedtopicsin
thefield.
Thecombo"Returns"containsalistofallthedatatypesareallowedonallversionsofPostgreSQL,at
presentthereisnodistinctionbetweenthevariousversions,andmonitoringshouldbecarriedoutbythe
user.
Thelastthreecombosallowyoutodefinethemodusoperandioftheprocedure.
Page64of119
pgDesignerUserManual rev.26/11/2007
InFolder"Definition"canbeinsertedinthecodesqldesiredlanguage,accordingtotheapproachselectedin
thepreviousfolder.Bydefault,andonlyfornewprocedures,youenteratextalreadypreset,whichcan
serveasthebasisforwritingfunctionistobeborneinmindthatthestructureofthetextofdefaultBasa
languagepgsql,itispossiblethatisnotusableifyouselectadifferentapproach.
Note:Stringsincludedsinglequotes(SQLsyntax),inthedefinition,areautomaticallyandproperlyconverted
forthecreationofproperprocedureinthedatabase.
Thethirdtab"Links"presentsatreestructuredlist,whichdisplaysanyreportsoftheprocedurewiththe
otheritemscontainedinthedraft.Thelistisforinformationalpurposesonly,andhasnofunction.
Page65of119
pgDesignerUserManual rev.26/11/2007
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page66of119
pgDesignerUserManual rev.26/11/2007
Relation
Fortechnicalspecificationsonrelationsbetweentables,seetheofficialdocumentationofPostgreSQL.
Regardingthecreationanduseoftherelations,hasalreadybeengivenfullexplanationinparagraficiearlier.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjectrelation.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupoftwofolders,groupinginthedifferentlogical
characteristicsoftheobject.
InFolder"Topics"arethreelists.Thelistleftlistsallfieldsinthesourcetable(orfather),whilethelistonthe
rightlistsallthefieldsinthedestinationtable(ordaughter),incentrallistcanbefoundallrelationsfield/field
betweenthetwotables.Toestablisharelationbetweentwotablesmustbeselectedineachoftheseareas
tobeconnected,andpressthebuttonatthetopleftofthecentrallist(identifiedwitha"+");thisfieldwillbe
selectedtopopulatethelistofrelationsinthecentrallist.Itisnotpossibletocreatearelationwithouthaving
atleastoneitem.Todeletearowfromthelistiscentraltopressthebuttonontheupperright(identifiedwith
a"").
ThecombounderthethreelistsareusedbyPostgreSQL,anddeterminethetypeofrelationbetweenthe
twotables,andthedefinitionofthistypeofrelationconditionsgraphicalrepresentationofalinelinkingwithin
thediagram,inordertofacilitatetheidentifyingandunderstandingthetypeofrelation.
Page67of119
pgDesignerUserManual rev.26/11/2007
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page68of119
pgDesignerUserManual rev.26/11/2007
Sequence
FortechnicalspecificationsrelatedsequencescanbefoundintheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjectsequence.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupoftwofolders,groupinginthedifferentlogical
characteristicsoftheobject.
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page69of119
pgDesignerUserManual rev.26/11/2007
Stamp
TheobjectStampisanewobjectwithspecialcharacteristics.Asfortheobjectsarea,thesubjecthasnot
Stampfunctions,bothwithintheprojectthatthecreationofthedatabase.
Theobjectispresentedgraphicallywithasimplerectangle,whichcontainsinformationabouttheprojectthat
includes:nameoftheproject,author,versionanddatedatabaseofprojectreview.Allthisinformationis
gatheredfromthesameproject,andthenyoucannotmakeanychangesactingontheseobjects,and
thereforeisnotascheduleddialog,andanychangesinownershipoftheprojectareautomaticallyreflected
onobjectsStamp,updatingdirectlytheircontent.
Likeallotherobjects,youcancreateevenmoreobjectsofthistypeinthediagram,andregardlessofthe
displayoneachproject;placementcanbeperformedsimilarlytootherobjects,whilenotabsolutelycan
changethesize.
Page70of119
pgDesignerUserManual rev.26/11/2007
Table
Fortechnicalspecificationsonthetables,seetheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjecttable.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupofsixfolders,groupinginthedifferentlogicalcharacteristics
oftheobject.
Inthefirstfolder"Options"areallpropertiesofthetable.Thecombo"Tablespace"containsalistofall
objectstablespaceintheproject,selectingone,itisdockedtothetable.Itisthereforenotpossibletogive
anyspecifictablespace,inthiscase,thetablewillbeassociatedwiththetablespacedefaultPostgreSQL.
Page71of119
pgDesignerUserManual rev.26/11/2007
Thesecondfolder"Columns"presentsalistofallfieldsandtoscheduleallows,throughbuttonsappear,
accesstoinformationonindividualfieldsofthetable.Doubleclickonarowofactivelistbehaveslikeanedit
button,openingthedialogforeditingpropertiesofthefield.
Thethirdfolder"Indices"presentsalistofalltheindicesonthetable,andallowsthroughbuttonsappear,
accesstoinformationonindividualindicesofthetableitself.Doubleclickonalineonthelistbehaveslike
buttonamendment,openingthedialogforeditingpropertiesoftheindex.
Page72of119
pgDesignerUserManual rev.26/11/2007
Thefourthfolder"Triggers"presentsalistofallthetriggerslinkedtothetable,allowingthroughbuttons
appear,accesstoinformationonindividualobjects.Doubleclickonalineonthelistbehaveslikeanedit
button,openingthedialogboxforeditingpropertiesoftheobject.Thismodeisaddedtothestandard
featuresofeditingtrigger,whichwillbedescribedbelow.
Thefifthtab"Relations"presentsatreestructuredlist,whichdisplaysanyreportsofthetablewiththeother
itemscontainedinthedraft.Thelistisforinformationalpurposesonly,andhasnofunction.
Page73of119
pgDesignerUserManual rev.26/11/2007
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page74of119
pgDesignerUserManual rev.26/11/2007
TableFields
Fortechnicalspecificationsonthefieldsofatable,seetheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,allowsyoutoeditthepropertiesofafieldofatable.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthetable.Inadditiontothename,thewindowcontainsallthepropertiesofthefield.
Changingatablefieldisaccessibleonlybyeditingwindowtable.
Thecombo"Type"containsalistofalldatatypesallowedforthereleaseofPostgreSQLselected.TooltipIf
theoptionisenabledbyplacingthemousecombowillseeabriefdescriptionofthetypeofselectedfield.
Turningonthecheck"Primarykeyresultsintheactivationofthecheck"notnull",andcreatinganamefor
theprimarykeyintheeditingofthetable.
The"size"containsthesizeofthefield.Thecontentistreatedastext,whosevaluemustbecomposedofthe
entirepartyandthedecimalpart,separatedbyacomma;thisisnotnecessaryifthedecimalvalueiszero.
Note:Changesmadeonthecampsarenotannulledifyoucancelthechangesmadeintheeditingofthe
table.
Page75of119
pgDesignerUserManual rev.26/11/2007
TableIndex
Fortechnicalspecificationsontheindicesofatable,seetheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanindexofatable.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthetable.Inadditiontothename,thewindowcontainsallthepropertiesofthefield.
Changingatableindexisaccessibleonlybyeditingwindowtable.
Thecombo"Tablespace"containsalistofallobjectstablespaceintheproject.Byselectingone,itishooked
toitisinanycaseimpossiblenottoassignaspecifictablespace,inthiscase,theindexwillbeassignedto
thetablespacedefaultPostgreSQL.
Forthecompositionofindexfields,therearetwolists:thelistontheleftcontainsalistofallthefieldsinthe
table,whilethelistontherightlistsallfieldsincludedintheindex.Throughthetwobuttonspositioned
betweenthetwolistsyoucanaddordeleteafieldintheindex("+"adds,""delete).
Note:Changesmadeontheindicesarenotannulledifyoucancelthechangesmadeintheeditingofthe
table.
Page76of119
pgDesignerUserManual rev.26/11/2007
Tablespace
FortechnicalspecificationsrelatedtablespacescanbefoundintheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjecttablespace.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupofthreefolders,groupinginthedifferentlogical
characteristicsoftheobject.
Inthefirstfolder"Topics"areallpropertiesoftheobject.
Thesecondboard"Links"presentsatreestructuredlist,whichdisplaysanyreportsoftablespacewiththe
otheritemscontainedinthedraft.Thelistisforinformationalpurposesonly,andhasnofunction.
Page77of119
pgDesignerUserManual rev.26/11/2007
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page78of119
pgDesignerUserManual rev.26/11/2007
Text
AsfortheobjectsoftypeAreaandStamp,thesubjecthasTextpurposesonlywithinthegraphicdiagramof
theproject.Itsusecouldbetodescribeanareaofthediagram,orasacommentoftheprojectshowninthe
graph.
Theeditingwindowofthistypeofobject,asshowninthefiguresbelow,allowsyoutomodifytheproperties.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.
Aspreviouslydescribed,thesubjectTextisasimpledescriptivetextforthepropertiesconsistinthecontent
ofthistextand,optionally,asitisalignedwithinitsspacegraph.Unlikeasubjectarea,thetextcanbe
composedofseverallines,thenthewindowisafieldlineseligibletoenterthetextcomponents;space
neededfortheconstructionofthegraphicsisdeterminedbythesizeoftheselinesandhisnumber,while
alignmentdeterminesthevisual.
Page79of119
pgDesignerUserManual rev.26/11/2007
Trigger
Fortechnicalspecificationsonthetrigger,seetheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjecttriggers.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupoftwofolders,groupinginthedifferentlogical
characteristicsoftheobject.
Thefolder"Topics"containsalltheproperties,includingitsreferencestootherobjectsintheproject.The
combo"Table"containsalistofalltypesofobjectscontainedinthedrafttable,whilethecombo
"Procedures"containsalistofallobjectsprocedure.
Note:Itisnotpossibletocreateanobjectintheprojecttriggeriftherearenotablesorprocedures.
Page80of119
pgDesignerUserManual rev.26/11/2007
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page81of119
pgDesignerUserManual rev.26/11/2007
View
FortechnicalspecificationsregardingviewscanbefoundintheofficialdocumentationofPostgreSQL.
Thewindowshowninthefiguresbelow,letsyouchangethepropertiesofanobjectview.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobject,unique
withinthesameproject.Thewindowismadeupoffourfolders,groupinginthedifferentlogical
characteristicsoftheobject.
InFolder"Definition"youcanenterthequeryontheSQLview.Basically,theproceduredoesnotprovide
anycontroloverthecontentofthequery,butitisextractedthelistoffields,inordertoviewthemasdetailed
inthediagramoftheproject.AnerrorinsettingSELECT,alsodeterminesinaninterpretationofthislist,and
thusawrongrepresentationinthegraph.FornewitemsareaddedautomaticallytrackthebasisofSQLin
ordertofacilitatetheconstruction.
Page82of119
pgDesignerUserManual rev.26/11/2007
Aswithmanyotherdatabaseobjects,itispossibletodefineadescriptionofview,whichwillbeusedin
constructingthePostgreSQLdatabase.
Thethirdtab"Relations"presentsatreestructuredlist,whichdisplaysAnyreportstothetablesandviewsin
theproject,anddetectedbydefinitionsight.Thelistisforinformationalpurposesonly,andhasnofunction.
Page83of119
pgDesignerUserManual rev.26/11/2007
Thelastfolder,existinalmostallthewindowsonobjectorienteddatabase,appearSQLcommandsonthe
buildingandtheconstructionofinstructiontakesplaceinrealtime,anddependsonthesettingsinthe
propertycontainedinthecurrentwindow.
Page84of119
pgDesignerUserManual rev.26/11/2007
ViewCreationWizard
Bycreatingviews,pgDesignerprovidesawizardthatallowsyoutocreateanobjectviewtoaprocessdriven.
Fromthemainmenuorfromthepanelofinstrumentsontheleftofthiswindow,youcanaccessandstartthe
wizardthat,throughawindowcontaininganumberoffolders,toallowtheintegrationofdatanecessaryfor
creationtheview.
Aswithallobjectsinaproject,theareahasawindowwhereyoumustenterthenameoftheobjectthatwill
becreated,whichmustbeuniquewithinthesameproject.Thewindowismadeupoffivefolders,
correspondingtocommandsthatnormallymakeaSQLSELECT.
Inthefirstfolder"Select"Youcaninsertfieldsoftablesandotherviews,whichwillformpartofthequery
sight.Asyoucanseefromthefigure,thefoldercontainsfourbuttonswithwhichyoucanaddordelete
fields,ormovetoacomplianceorder.Atthecenterisalistthatlistsallfieldsbelongingtothequery,
includingreferencestothetablesorviewsfromwhichtheywerederived,theinclusionofanewfieldis
carriedoutbyselectingthetable(orview)oforiginincombo"Table"atthetoptab,andoneofthefields
containedinit,actingonthesecondcombo.Eachchangemadeinthefirstcombo,thesecondwillbe
upgradedautomaticallyloadinginitslistallfieldsrelatingtothenewselection.
Page85of119
pgDesignerUserManual rev.26/11/2007
Inthesecondtab"Whereispossibletodefinetheconditionsofthequeryfilter.Basedontheselected
referencesinthepreviouscard,youcansettheconditionsbywhichtheviewperformtheextractionofdata.
Throughthepresentcontrolstabyoucanalsoinsertcalculatedfields(egSUM),actingappropriatelyon
controls.Thelistedbelowtabpresentsalistofconditionsincludedinthequery,andasforthepreviouscard,
youcaninsertordeleterowsororderconditionsinadifferentway.
Page86of119
pgDesignerUserManual rev.26/11/2007
Thethirdtab"Groupby"letsyouenterthegroupingnecessaryif,forexample,theinclusionofacalculated
fieldrunningthesumofvalueofagivenfield(SUM).Asinprevious,evenheretherearetheusualbuttons:
insertanewgrouping,eraseanexistingorder,thesequencedifferentsortofelementsinthelist.
Thefourthtab"Having"canbeusedforplacingconditions,otherthanthosemanagedbyWHERE.Fora
detaileddescriptionofthestandardSQLsyntax,pleaserefertootherdocumentation.
Page87of119
pgDesignerUserManual rev.26/11/2007
Thelastcard"byOrder"allowsyoutodefinetheorderthatwillbeprovidedfromqueriesonthedatabefore
makingthemavailable.Liketheothercards,thispresentstheusualbuttonsmanagementlist.
Page88of119
pgDesignerUserManual rev.26/11/2007
GeneralConfiguration
BydefaultpgDesignerinhisfirststart,createsahiddendirectoryinHOME.Thedirectoryisnamed
.pgdesigner.InsidearestoredallfilesneededtopgDesigner,sobeverycarefulnottodeletethisdirectory
anditscontents.
Theconfigurationfile
Forallthedefaultsettings,configurationsandthebaseofapplication,pgDesignerleanstoafilecalled
configurationfiles.ThisfileisusuallycreatedatthefirstexecutionofpgDesignerandupdatedautomatically
everyvariationofthebasicsettings.
ThefirsttimeyourunpgDesignerindirectorydescribedinthischapter,youcreatethefilepgdesigner.conf,
whichcontainsallthebasicsettings,configurationsandusercustomizationfortheapplication.Anychange
inconfigurationpgDesigner,isupdatedandstoredinthisfile.
Thefileisinaformatsimilartotheclassics.inifilewiththesettingsgroupedinspecialblocks,andevery
variable,alongwiththeirvalue,asdefinedinasinglelineinthefollowingformat:variable=value.
Inthefollowingparagraphswillbegivenadetaileddescriptionofthecontentsofthisfileandthevarious
settingsandvalues.
Page89of119
pgDesignerUserManual rev.26/11/2007
Structureofconfigurationfiles
Theconfigurationfile,asalreadymentioned,containswithinitthedefaultpgDesigner,whichareupdated
fromtimetotimetovarythepropertieswithintheapplication.
Thestructureofthefileismadeupofaseriesofclusters,eachofwhichcontainsanumberofpropertiesand
theirvalues.
Thetablebelowdescribesindetailallgroupsandelementscontainedinthefile,includingthedescriptionof
thepossiblevaluesthatongisinglepropertycantake.
CONNECTION Groupsettingsconnectiontothedatabase.
Itcontainstheparametersoftheconnection.
IDE Groupbasicsettingsoftheprogram.
Page90of119
pgDesignerUserManual rev.26/11/2007
PRINTER Groupprintersettings.
PROJECT Groupbasicsettingsofthenewprojects.
OPTIONS Groupoptionsimport/export.
Page91of119
pgDesignerUserManual rev.26/11/2007
WINDOW Groupsettingsofthemainwindow.
RECENT Grouphistoricelements.
OBJECT Groupbasicsettingsfortheobjects.
Page92of119
pgDesignerUserManual rev.26/11/2007
TheFileProject
Theprojectfileisatextfile,structuredsoastoincludealltheinformationandobjectsrelatingtotheproject
itself,sothatwecanrebuildtheentireplotwithinpgDesigner.
Accordingtotheconfigurationprogram,youcanloadandsavefilesinspecialprojects,withtwodifferent
formats:INIandXML.Asdescribedinpreviouschapters,thecontentsoftwofilesisthesame,butwith
differentstructureswhicharestoreddata;becauseofitsstructureispossiblethatthephasesofreadingand
rescuedeadlineshaveverydifferent,evenifequaldata.Inanycase,thechoiceofusingeithertypeareat
thediscretionoftheuser,bearinginmindthatyoucanalwaysrevertthetrend,asallbothpossibilities
available.
Asalreadymentioned,theprojectfilecontainingallthebasicsettingsforasingleproject,objectsandviews,
andthepositioningofgraphicalobjectswithinthem.
Inthefollowingpagesdescribesthetechnicalspecificationsrelatingtothestructureofthesefiles,depending
ontheirtype.
Page93of119
pgDesignerUserManual rev.26/11/2007
StructureFileProject
INIFormat
TheINIformat,asintheconfigurationfileoftheprogramisaclassicformatwiththeappropriatesettings
groupedintoblocks,andeachvariable(orcharacteristicoftheobject)withitsvalue,eachdescribedina
singleline,intheformat:variable=value.
Exceptforsomeofthefeatures,dedicatedtothegraphicobjectsoftheprojectrelatetospecificproperties
PostgreSQL,whichrefertotheofficialdocumentationfortheinvestigationofthecase.
PgDesigner Groupfeaturesoftheprojectfile.
PROJECT Groupcharacteristicsoftheproject.
OBJECTS Containsthenumberofobjectspresentinthefile,separatedbytype.
Page94of119
pgDesignerUserManual rev.26/11/2007
AREA_<n> Containsfeaturesofasingletypeofsubjectarea.
Eachobjectisidentifiedbythelabel"AREA_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
W Numeric 0 Widthoftheobject.
H Numeric 0 Heightoftheobject.
TEXT_<n> Hasthecharacteristicsofasingleobjecttypetext.
Eachobjectisidentifiedbythelabel"TEXT_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
Page95of119
pgDesignerUserManual rev.26/11/2007
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
TABLESPACE Hasthecharacteristicsofasingleobjecttypetablespace.
_<n> Eachobjectisidentifiedbythelabel"TABLESPACE_",followedbya
serialnumber.Thisnumberissetautomaticallybyoperationofrescuing
theproject.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
TYPE Containsfeaturesofasingletypeofobject"type".
Eachobjectisidentifiedbythelabel"TYPE_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page96of119
pgDesignerUserManual rev.26/11/2007
SEQUENCE_ Hasthecharacteristicsofasingleobjecttypesequence.
<n> Eachobjectisidentifiedbythelabel"SEQUENCE_",followedbya
serialnumber.Thisnumberissetautomaticallybyoperationofrescuing
theproject.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page97of119
pgDesignerUserManual rev.26/11/2007
sequence.
PROCEDURE Hasthecharacteristicsofasingleobjecttypeprocedure/function.
_<n> Eachobjectisidentifiedbythelabel"PROCEDURE_",followedbya
serialnumber.Thisnumberissetautomaticallybyoperationofrescuing
theproject.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page98of119
pgDesignerUserManual rev.26/11/2007
DOMAIN_<n> Containsfeaturesofasingletypeofobjectdomain.
Eachobjectisidentifiedbythelabel"DOMAIN_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
TABLE_<n> Hasthecharacteristicsofasingleobjecttypetable.
Eachobjectisidentifiedbythelabel"TABLE_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page99of119
pgDesignerUserManual rev.26/11/2007
columnisasfollows:
1)Fieldname
2)Descriptionofthefield
3)Valueofdefault:assignsadefaultvalueforcolumn
4)Thesizeofthefield
5)Flagenablingcolumncontainingnullvalues
6)Primarykey:specifiesthatthecolumnmustcontainuniquevalues
(unduplicated)
7)Thedatatypecolumn
8)Thedatatypecolumn
9)Check:specifiesanexpressionthatreturnsavaluelogicallineswhen
newormodifiedmeetaninputorupdate.
TRIGGER_<n Containsfeaturesofasingletypeofobjecttriggers.
> Eachobjectisidentifiedbythelabel"TRIGGER_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page100of119
pgDesignerUserManual rev.26/11/2007
VIEW_<n> Hasthecharacteristicsofasingleobjecttypeview.
Eachobjectisidentifiedbythelabel"VIEW_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
RELATION_< Containsfeaturesofasingletypeofobjectrelation.
n> Eachobjectisidentifiedbythelabel"RELATION_",followedbyaserial
number.Thisnumberissetautomaticallybyoperationofrescuingthe
project.
X1 Numeric 0 CoordinatedXofthetablethanthefather.
Y1 Numeric 0 CoordinatedYofthetablethanhisfather.
X2 Numeric 0 CoordinatedXofthetablethanthedaughter.
Y2 Numeric 0 CoordinatedYofthetablethanthedaughter.
Page101of119
pgDesignerUserManual rev.26/11/2007
1)Fieldtablefather
2)Fieldtabledaughter
DISPLAYS Itcontainsallthefeaturesofthedisplay(orviews)oftheproject.
Thegroupisdefinedonce,andallgroupanddisplayobjectscontained
ineachofthem.
Page102of119
pgDesignerUserManual rev.26/11/2007
XMLFormat
TheXMLformat,asintheformatini,iscomposedbyelementsoftheproject,theviewsandcharacteristics
oftheprojectitself.Thesettingsofeachobjectaredefinedintheattributesofeachitem.Tosimplify
management,thestructureisorganizedsoastoreduceasfaraspossibletheprolificarelabelsofthemain
elements,andplacingallthefeaturesoftheprojectandobjectattributesofeachitem.Inthiswayanattempt
wasmadetoreducethesizeoffiles,optimizingthefunctionsofwritingandreading,andavoidingasmuch
aspossibletheproblemsrelatedtooverconsumptionofresourcesandsystemcrashesthatoccurredin
previousversionsofpgDesigner.
Alltheelementsareenclosedinasingleelement:pgDesigner.
Exceptforsomeofthefeatures,dedicatedtothegraphicobjectsoftheprojectrelatetospecificproperties
PostgreSQL,whichrefertotheofficialdocumentationfortheinvestigationofthecase.
PgDesigner Groupfeaturesoftheprojectfile.
PROJECT Groupcharacteristicsoftheproject.
Page103of119
pgDesignerUserManual rev.26/11/2007
AREA Hasthecharacteristicsofasingleobject,typearea.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
W Numeric 0 Widthoftheobject.
H Numeric 0 Heightoftheobject.
TEXT Hasthecharacteristicsofasingleobjecttypetext.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
TABLESPACE Hasthecharacteristicsofasingleobjecttypetablespace.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
SEQUENCE Hasthecharacteristicsofasingleobjecttypesequence.
Page104of119
pgDesignerUserManual rev.26/11/2007
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
PROCEDURE Hasthecharacteristicsofasingleobjecttypeprocedure/function.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page105of119
pgDesignerUserManual rev.26/11/2007
DOMAIN Containsfeaturesofasingletypeofobjectdomain.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
TABLE Hasthecharacteristicsofasingleobjecttypetable.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page106of119
pgDesignerUserManual rev.26/11/2007
TABLEFIELD Definitionofafieldsingletable.
INDEX Definitionofasingleindextable.
INDEXFIELD Definitionofafieldindex.
TRIGGER Containsfeaturesofasingletypeofobjecttriggers.
X Numeric 0 CoordinatedXoftheobject.
Page107of119
pgDesignerUserManual rev.26/11/2007
Y Numeric 0 CoordinatedYoftheobject.
TYPE Containsfeaturesofasingletypeofobject"type".
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
Page108of119
pgDesignerUserManual rev.26/11/2007
type.
VIEW Hasthecharacteristicsofasingleobjecttypeview.
X Numeric 0 CoordinatedXoftheobject.
Y Numeric 0 CoordinatedYoftheobject.
RELATION ontainsfeaturesofasingletypeofobjectrelation.
X1 Numeric 0 CoordinatedXofthetablethanthefather.
Y1 Numeric 0 CoordinatedYofthetablethanthefather.
X2 Numeric 0 CoordinatedXofthetablethanthedaughter.
Y2 Numeric 0 CoordinatedYofthetablethanthedaughter.
Page109of119
pgDesignerUserManual rev.26/11/2007
RELATIONFIELD Definingfieldsofthetablesinrelation.Eachlinedeterminesthefields
ofatablewithhisfatherofthetable.
DISPLAY Hasthecharacteristicsofadisplay(orview)oftheproject.
DISPLAYOBJEC Itdefinesanobjectinthedisplay.
T
Display String <blank> Nameofthedisplay.
X Numeric 0 CoordinatedXinsideofthedisplay.
Y Numeric 0 CoordinatedYinsideofthedisplay.
Page110of119
pgDesignerUserManual rev.26/11/2007
License
pgDesignerisdistributedundertheGNUGENERALPUBLICLICENSE(seeoriginaltextonthenextpage).
Page111of119
pgDesignerUserManual rev.26/11/2007
GNUGENERALPUBLICLICENSE
Version2,June1991
Copyright(C)1989,1991FreeSoftwareFoundation,Inc.
51FranklinSt,FifthFloor,Boston,MA021101301USA
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,butchanging
itisnotallowed.
Preamble
Thelicensesformostsoftwarearedesignedtotakeawayyourfreedomtoshareandchangeit.By
contrast,theGNUGeneralPublicLicenseisintendedtoguaranteeyourfreedomtoshareandchangefree
softwaretomakesurethesoftwareisfreeforallitsusers.ThisGeneralPublicLicenseappliestomostof
theFreeSoftwareFoundation'ssoftwareandtoanyotherprogramwhoseauthorscommittousingit.(Some
otherFreeSoftwareFoundationsoftwareiscoveredbytheGNULibraryGeneralPublicLicenseinstead.)
Youcanapplyittoyourprograms,too.
Whenwespeakoffreesoftware,wearereferringtofreedom,notprice.OurGeneralPublic
Licensesaredesignedtomakesurethatyouhavethefreedomtodistributecopiesoffreesoftware(and
chargeforthisserviceifyouwish),thatyoureceivesourcecodeorcangetitifyouwantit,thatyoucan
changethesoftwareorusepiecesofitinnewfreeprograms;andthatyouknowyoucandothesethings.
Toprotectyourrights,weneedtomakerestrictionsthatforbidanyonetodenyyoutheserightsorto
askyoutosurrendertherights.Theserestrictionstranslatetocertainresponsibilitiesforyouifyoudistribute
copiesofthesoftware,orifyoumodifyit.
Forexample,ifyoudistributecopiesofsuchaprogram,whethergratisorforafee,youmustgive
therecipientsalltherightsthatyouhave.Youmustmakesurethatthey,too,receiveorcangetthesource
code.Andyoumustshowthemthesetermssotheyknowtheirrights.
Weprotectyourrightswithtwosteps:(1)copyrightthesoftware,and(2)offeryouthislicensewhich
givesyoulegalpermissiontocopy,distributeand/ormodifythesoftware.
Page112of119
pgDesignerUserManual rev.26/11/2007
Also,foreachauthor'sprotectionandours,wewanttomakecertainthateveryoneunderstandsthat
thereisnowarrantyforthisfreesoftware.Ifthesoftwareismodifiedbysomeoneelseandpassedon,we
wantitsrecipientstoknowthatwhattheyhaveisnottheoriginal,sothatanyproblemsintroducedbyothers
willnotreflectontheoriginalauthors'reputations.
Finally,anyfreeprogramisthreatenedconstantlybysoftwarepatents.Wewishtoavoidthedanger
thatredistributorsofafreeprogramwillindividuallyobtainpatentlicenses,ineffectmakingtheprogram
proprietary.Topreventthis,wehavemadeitclearthatanypatentmustbelicensedforeveryone'sfreeuse
ornotlicensedatall.
Theprecisetermsandconditionsforcopying,distributionandmodificationfollow.
GNUGENERALPUBLICLICENSE
TERMSANDCONDITIONSFORCOPYING,DISTRIBUTIONANDMODIFICATION
0.ThisLicenseappliestoanyprogramorotherworkwhichcontainsanoticeplacedbythecopyright
holdersayingitmaybedistributedunderthetermsofthisGeneralPublicLicense.The"Program",below,
referstoanysuchprogramorwork,anda"workbasedontheProgram"meanseithertheProgramorany
derivativeworkundercopyrightlaw:thatistosay,aworkcontainingtheProgramoraportionofit,either
verbatimorwithmodificationsand/ortranslatedintoanotherlanguage.(Hereinafter,translationisincluded
withoutlimitationintheterm"modification".)Eachlicenseeisaddressedas"you".
Activitiesotherthancopying,distributionandmodificationarenotcoveredbythisLicense;theyareoutside
itsscope.TheactofrunningtheProgramisnotrestricted,andtheoutputfromtheProgramiscoveredonly
ifitscontentsconstituteaworkbasedontheProgram(independentofhavingbeenmadebyrunningthe
Program).WhetherthatistruedependsonwhattheProgramdoes.
1.YoumaycopyanddistributeverbatimcopiesoftheProgram'ssourcecodeasyoureceiveit,in
anymedium,providedthatyouconspicuouslyandappropriatelypublishoneachcopyanappropriate
copyrightnoticeanddisclaimerofwarranty;keepintactallthenoticesthatrefertothisLicenseandtothe
absenceofanywarranty;andgiveanyotherrecipientsoftheProgramacopyofthisLicensealongwiththe
Program.
Youmaychargeafeeforthephysicalactoftransferringacopy,andyoumayatyouroptionofferwarranty
protectioninexchangeforafee.
2.YoumaymodifyyourcopyorcopiesoftheProgramoranyportionofit,thusformingawork
Page113of119
pgDesignerUserManual rev.26/11/2007
basedontheProgram,andcopyanddistributesuchmodificationsorworkunderthetermsofSection1
above,providedthatyoualsomeetalloftheseconditions:
a)Youmustcausethemodifiedfilestocarryprominentnoticesstatingthatyouchangedthefiles
andthedateofanychange.
b)Youmustcauseanyworkthatyoudistributeorpublish,thatinwholeorinpartcontainsoris
derivedfromtheProgramoranypartthereof,tobelicensedasawholeatnochargetoallthird
partiesunderthetermsofthisLicense.
c)Ifthemodifiedprogramnormallyreadscommandsinteractivelywhenrun,youmustcauseit,when
startedrunningforsuchinteractiveuseinthemostordinaryway,toprintordisplayan
announcementincludinganappropriatecopyrightnoticeandanoticethatthereisnowarranty(or
else,sayingthatyouprovideawarranty)andthatusersmayredistributetheprogramunderthese
conditions,andtellingtheuserhowtoviewacopyofthisLicense.(Exception:iftheProgramitselfis
interactivebutdoesnotnormallyprintsuchanannouncement,yourworkbasedontheProgramis
notrequiredtoprintanannouncement.)
Theserequirementsapplytothemodifiedworkasawhole.Ifidentifiablesectionsofthatworkarenot
derivedfromtheProgram,andcanbereasonablyconsideredindependentandseparateworksin
themselves,thenthisLicense,anditsterms,donotapplytothosesectionswhenyoudistributethemas
separateworks.Butwhenyoudistributethesamesectionsaspartofawholewhichisaworkbasedonthe
Program,thedistributionofthewholemustbeonthetermsofthisLicense,whosepermissionsforother
licenseesextendtotheentirewhole,andthustoeachandeverypartregardlessofwhowroteit.
Thus,itisnottheintentofthissectiontoclaimrightsorcontestyourrightstoworkwrittenentirelybyyou;
rather,theintentistoexercisetherighttocontrolthedistributionofderivativeorcollectiveworksbasedon
theProgram.
Inaddition,mereaggregationofanotherworknotbasedontheProgramwiththeProgram(orwithawork
basedontheProgram)onavolumeofastorageordistributionmediumdoesnotbringtheotherworkunder
thescopeofthisLicense.
3.YoumaycopyanddistributetheProgram(oraworkbasedonit,underSection2)inobjectcode
orexecutableformunderthetermsofSections1and2aboveprovidedthatyoualsodooneofthefollowing:
a)Accompanyitwiththecompletecorrespondingmachinereadablesourcecode,whichmustbe
distributedunderthetermsofSections1and2aboveonamediumcustomarilyusedforsoftware
Page114of119
pgDesignerUserManual rev.26/11/2007
interchange;or,
b)Accompanyitwithawrittenoffer,validforatleastthreeyears,togiveanythirdparty,foracharge
nomorethanyourcostofphysicallyperformingsourcedistribution,acompletemachinereadable
copyofthecorrespondingsourcecode,tobedistributedunderthetermsofSections1and2above
onamediumcustomarilyusedforsoftwareinterchange;or,
c)Accompanyitwiththeinformationyoureceivedastotheoffertodistributecorrespondingsource
code.(Thisalternativeisallowedonlyfornoncommercialdistributionandonlyifyoureceivedthe
programinobjectcodeorexecutableformwithsuchanoffer,inaccordwithSubsectionbabove.)
Thesourcecodeforaworkmeansthepreferredformoftheworkformakingmodificationstoit.Foran
executablework,completesourcecodemeansallthesourcecodeforallmodulesitcontains,plusany
associatedinterfacedefinitionfiles,plusthescriptsusedtocontrolcompilationandinstallationofthe
executable.However,asaspecialexception,thesourcecodedistributedneednotincludeanythingthatis
normallydistributed(ineithersourceorbinaryform)withthemajorcomponents(compiler,kernel,andsoon)
oftheoperatingsystemonwhichtheexecutableruns,unlessthatcomponentitselfaccompaniesthe
executable.
Ifdistributionofexecutableorobjectcodeismadebyofferingaccesstocopyfromadesignatedplace,then
offeringequivalentaccesstocopythesourcecodefromthesameplacecountsasdistributionofthesource
code,eventhoughthirdpartiesarenotcompelledtocopythesourcealongwiththeobjectcode.
4.Youmaynotcopy,modify,sublicense,ordistributetheProgramexceptasexpresslyprovided
underthisLicense.Anyattemptotherwisetocopy,modify,sublicenseordistributetheProgramisvoid,and
willautomaticallyterminateyourrightsunderthisLicense.However,partieswhohavereceivedcopies,or
rights,fromyouunderthisLicensewillnothavetheirlicensesterminatedsolongassuchpartiesremainin
fullcompliance.
5.YouarenotrequiredtoacceptthisLicense,sinceyouhavenotsignedit.However,nothingelse
grantsyoupermissiontomodifyordistributetheProgramoritsderivativeworks.Theseactionsare
prohibitedbylawifyoudonotacceptthisLicense.Therefore,bymodifyingordistributingtheProgram(or
anyworkbasedontheProgram),youindicateyouracceptanceofthisLicensetodoso,andallitstermsand
conditionsforcopying,distributingormodifyingtheProgramorworksbasedonit.
6.EachtimeyouredistributetheProgram(oranyworkbasedontheProgram),therecipient
automaticallyreceivesalicensefromtheoriginallicensortocopy,distributeormodifytheProgramsubjectto
thesetermsandconditions.Youmaynotimposeanyfurtherrestrictionsontherecipients'exerciseofthe
Page115of119
pgDesignerUserManual rev.26/11/2007
rightsgrantedherein.YouarenotresponsibleforenforcingcompliancebythirdpartiestothisLicense.
7.If,asaconsequenceofacourtjudgmentorallegationofpatentinfringementorforanyother
reason(notlimitedtopatentissues),conditionsareimposedonyou(whetherbycourtorder,agreementor
otherwise)thatcontradicttheconditionsofthisLicense,theydonotexcuseyoufromtheconditionsofthis
License.IfyoucannotdistributesoastosatisfysimultaneouslyyourobligationsunderthisLicenseandany
otherpertinentobligations,thenasaconsequenceyoumaynotdistributetheProgramatall.Forexample,if
apatentlicensewouldnotpermitroyaltyfreeredistributionoftheProgrambyallthosewhoreceivecopies
directlyorindirectlythroughyou,thentheonlywayyoucouldsatisfybothitandthisLicensewouldbeto
refrainentirelyfromdistributionoftheProgram.
Ifanyportionofthissectionisheldinvalidorunenforceableunderanyparticularcircumstance,thebalance
ofthesectionisintendedtoapplyandthesectionasawholeisintendedtoapplyinothercircumstances.
Itisnotthepurposeofthissectiontoinduceyoutoinfringeanypatentsorotherpropertyrightclaimsorto
contestvalidityofanysuchclaims;thissectionhasthesolepurposeofprotectingtheintegrityofthefree
softwaredistributionsystem,whichisimplementedbypubliclicensepractices.Manypeoplehavemade
generouscontributionstothewiderangeofsoftwaredistributedthroughthatsysteminrelianceon
consistentapplicationofthatsystem;itisuptotheauthor/donortodecideifheorsheiswillingtodistribute
softwarethroughanyothersystemandalicenseecannotimposethatchoice.
Thissectionisintendedtomakethoroughlyclearwhatisbelievedtobeaconsequenceoftherestofthis
License.
8.Ifthedistributionand/oruseoftheProgramisrestrictedincertaincountrieseitherbypatentsorby
copyrightedinterfaces,theoriginalcopyrightholderwhoplacestheProgramunderthisLicensemayaddan
explicitgeographicaldistributionlimitationexcludingthosecountries,sothatdistributionispermittedonlyin
oramongcountriesnotthusexcluded.Insuchcase,thisLicenseincorporatesthelimitationasifwrittenin
thebodyofthisLicense.
9.TheFreeSoftwareFoundationmaypublishrevisedand/ornewversionsoftheGeneralPublic
Licensefromtimetotime.Suchnewversionswillbesimilarinspirittothepresentversion,butmaydifferin
detailtoaddressnewproblemsorconcerns.
Eachversionisgivenadistinguishingversionnumber.IftheProgramspecifiesaversionnumberofthis
Licensewhichappliestoitand"anylaterversion",youhavetheoptionoffollowingthetermsandconditions
eitherofthatversionorofanylaterversionpublishedbytheFreeSoftwareFoundation.IftheProgramdoes
notspecifyaversionnumberofthisLicense,youmaychooseanyversioneverpublishedbytheFree
Page116of119
pgDesignerUserManual rev.26/11/2007
SoftwareFoundation.
10.IfyouwishtoincorporatepartsoftheProgramintootherfreeprogramswhosedistributionconditionsare
different,writetotheauthortoaskforpermission.ForsoftwarewhichiscopyrightedbytheFreeSoftware
Foundation,writetotheFreeSoftwareFoundation;wesometimesmakeexceptionsforthis.Ourdecision
willbeguidedbythetwogoalsofpreservingthefreestatusofallderivativesofourfreesoftwareandof
promotingthesharingandreuseofsoftwaregenerally.
NOWARRANTY
11.BECAUSETHEPROGRAMISLICENSEDFREEOFCHARGE,THEREISNOWARRANTY
FORTHEPROGRAM,TOTHEEXTENTPERMITTEDBYAPPLICABLELAW.EXCEPTWHEN
OTHERWISESTATEDINWRITINGTHECOPYRIGHTHOLDERSAND/OROTHERPARTIESPROVIDE
THEPROGRAM"ASIS"WITHOUTWARRANTYOFANYKIND,EITHEREXPRESSEDORIMPLIED,
INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFMERCHANTABILITYAND
FITNESSFORAPARTICULARPURPOSE.THEENTIRERISKASTOTHEQUALITYAND
PERFORMANCEOFTHEPROGRAMISWITHYOU.SHOULDTHEPROGRAMPROVEDEFECTIVE,
YOUASSUMETHECOSTOFALLNECESSARYSERVICING,REPAIRORCORRECTION.
12.INNOEVENTUNLESSREQUIREDBYAPPLICABLELAWORAGREEDTOINWRITING
WILLANYCOPYRIGHTHOLDER,ORANYOTHERPARTYWHOMAYMODIFYAND/OR
REDISTRIBUTETHEPROGRAMASPERMITTEDABOVE,BELIABLETOYOUFORDAMAGES,
INCLUDINGANYGENERAL,SPECIAL,INCIDENTALORCONSEQUENTIALDAMAGESARISINGOUT
OFTHEUSEORINABILITYTOUSETHEPROGRAM(INCLUDINGBUTNOTLIMITEDTOLOSSOF
DATAORDATABEINGRENDEREDINACCURATEORLOSSESSUSTAINEDBYYOUORTHIRD
PARTIESORAFAILUREOFTHEPROGRAMTOOPERATEWITHANYOTHERPROGRAMS),EVENIF
SUCHHOLDEROROTHERPARTYHASBEENADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES.
ENDOFTERMSANDCONDITIONS
HowtoApplyTheseTermstoYourNewPrograms
Ifyoudevelopanewprogram,andyouwantittobeofthegreatestpossibleusetothepublic,the
bestwaytoachievethisistomakeitfreesoftwarewhicheveryonecanredistributeandchangeunderthese
terms.
Todoso,attachthefollowingnoticestotheprogram.Itissafesttoattachthemtothestartofeach
sourcefiletomosteffectivelyconveytheexclusionofwarranty;andeachfileshouldhaveatleastthe
Page117of119
pgDesignerUserManual rev.26/11/2007
"copyright"lineandapointertowherethefullnoticeisfound.
<onelinetogivetheprogram'snameandabriefideaofwhatitdoes.>Copyright(C)<year><name
ofauthor>
Thisprogramisfreesoftware;youcanredistributeitand/ormodifyitunderthetermsoftheGNU
GeneralPublicLicenseaspublishedbytheFreeSoftwareFoundation;eitherversion2ofthe
License,or(atyouroption)anylaterversion.
Thisprogramisdistributedinthehopethatitwillbeuseful,butWITHOUTANYWARRANTY;
withouteventheimpliedwarrantyofMERCHANTABILITYorFITNESSFORAPARTICULAR
PURPOSE.SeetheGNUGeneralPublicLicenseformoredetails.
YoushouldhavereceivedacopyoftheGNUGeneralPublicLicensealongwiththisprogram;ifnot,
writetotheFreeSoftwareFoundation,Inc.,51FranklinSt,FifthFloor,Boston,MA021101301
USA
Alsoaddinformationonhowtocontactyoubyelectronicandpapermail.
Iftheprogramisinteractive,makeitoutputashortnoticelikethiswhenitstartsinaninteractivemode:
Gnomovisionversion69,Copyright(C)yearnameofauthor
GnomovisioncomeswithABSOLUTELYNOWARRANTY;fordetailstype`showw'.
Thisisfreesoftware,andyouarewelcometoredistributeitundercertainconditions;type`showc'
fordetails.
Thehypotheticalcommands`showw'and`showc'shouldshowtheappropriatepartsoftheGeneralPublic
License.Ofcourse,thecommandsyouusemaybecalledsomethingotherthan`showw'and`showc';they
couldevenbemouseclicksormenuitemswhateversuitsyourprogram.
Youshouldalsogetyouremployer(ifyouworkasaprogrammer)oryourschool,ifany,tosigna"copyright
disclaimer"fortheprogram,ifnecessary.Hereisasample;alterthenames:
Yoyodyne,Inc.,herebydisclaimsallcopyrightinterestintheprogram`Gnomovision'(whichmakes
Page118of119
pgDesignerUserManual rev.26/11/2007
passesatcompilers)writtenbyJamesHacker.
<signatureofTyCoon>,1April1989
TyCoon,PresidentofVice
ThisGeneralPublicLicensedoesnotpermitincorporatingyourprogramintoproprietaryprograms.Ifyour
programisasubroutinelibrary,youmayconsideritmoreusefultopermitlinkingproprietaryapplicationswith
thelibrary.Ifthisiswhatyouwanttodo,usetheGNULibraryGeneralPublicLicenseinsteadofthis
License.
Page119of119