This archive is retained to ensure existing URLs remain functional. It will not contain any emails sent to this mailing list after July 1, 2024. For all messages, including those sent before and after this date, please visit the new location of the archive at https://mailman.ripe.net/archives/list/db-wg@ripe.net/
Tools based on whois -t output.
- Previous message (by thread): Tools based on whois -t output.
- Next message (by thread): Tools based on whois -t output.
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Markus Bock
mb at kronos.NIC.DTAG.DE
Fri Apr 11 18:18:18 CEST 1997
Hi database friends! Sorry for late response. CONTENTS: --------- 1. Re: Tools based on whois -t output. 2. Adapted libray template.pl (if useful) 1. Re: Tools based on whois -t output ------------------------------------- It's a great idea to give more information about the database objects by an whois -t output. When we used the ripe database software at our site to define and store own business data objects we modified it in a way that complete information about the definition of the database objects is given by a whois -t output. I.e the output looked like short longname uniqe key rec optionality cardinality ------------------------------------------------------------------ a1 attribute1 UNIQ mandatory single a2 attribute2 KEY mandatory single a3 attribute3 optional multiple a4 attribute4 optional single a5 attribute5 KEY REC mandatory multiple where UNIQ describes the attributes who form the unique key (identifier) of that object KEY describes that this attribute is a search field (whois query) REC describes that it is used for an reference lookup. It was very useful for us to have this complete information about the definition of the database objects (we had a really great amount of objects and attributes) to understand the given datamodel. I'll put the adapted libray template.pl to the end of this mail (may it's useful for someone who is using the ripe database software too). Kind regards, Markus Bock 2. Adapted libray template.pl (if useful) ------------------------------------------------------------------------ -- SCHNIPPP----------------------------------- # $RCSfile: template.pl,v $ # $Revision: 2.0 $ # $Author: ripe-dbm $ # $Date: 1996/08/08 10:47:30 $ # template.pl - spits out a template for an object, based on the config # file. Assumes that the config has already been read. # Takes object type as input. Outputs to currently selected output. # BEGIN_DTAG # # Modified by DTAG Internet Services for internal use # # We want to have an extended output of a template for an object, based # on the config file: # - additional information for unique keys # - additional information for keys # - additional information for recursiv queried objects # - different output style. # # To do this we have to adapt this library. # # Markus Bock, DTAG, Internet Services # # mb at nic.dtag.de 961017 # #END_DTAG sub Template { local($output, $type) = @_; # BEGIN DTAG local(%uniq) = (); local(%key) = (); local(%rec) = (); local(%mand) = (); local(%mult) = (); local(%guar) = (); local(%obsoleted) = (); # END DTAG foreach (split(/\s+/, $OBJMAND{$type})) { $mand{$_} = 1; } foreach (split(/\s+/, $OBJMULT{$type})) { $mult{$_} = 1; } ## ANOTHERBEGIN foreach (split(/\s+/, $UNIQ{$type})) { $uniq{$_} = 1; } ## ANOTHEREND ## ANOTHERBEGIN foreach (split(/\s+/, $KEYS{$type})) { $key{$_} = 1; } ## ANOTHEREND ## ANOTHERBEGIN foreach (split(/\s+/, $RECUR{$type})) { $rec{$_} = 1; } ## ANOTHEREND foreach (split(/\s+/, $OBS{$type})) { $obsoleted{$_} = 1; } local(@obsoleted)=(); print $output "\n"; # implement the tabular look printf $output "%-5s %-20s %-5s %-5s %-5s %-13s %-13s\n" , "short", "longname", "uniqe", "key", "rec", "optionality", "cardinality"; printf $output "%-5s %-20s %-5s %-5s %-5s %-13s %-13s\n" , "-----", "--------------------", "-----", "-----", "-----", "-------------", "-------------"; foreach (split(/\s+/, $OBJATSQ{$type})) { if ($obsoleted{$_}) { # push(@obsoleted, sprintf("%-12s %-12s\n", $ATTL{$_}.":", "[obsoleted]")); # We allow longer attribut (long-) names push(@obsoleted, sprintf("%-25s %-25s\n", $ATTL{$_}.":", "[obsoleted]")); } else { # printf $output "%-12s %-12s %-12s\n", # printf $output "%-25s %-25s %-25s\n", # $ATTL{$_}.":", # $mand{$_} ? "[mandatory]" : "[optional]", # $mult{$_} ? "[multiple]" : "[single]"; printf $output "%-5s %-20s %-5s %-5s %-5s %-13s %-13s\n" , $ATTR{$_}."", $ATTL{$_}."", $uniq{$_} ? "UNIQ" : "", $key{$_} ? "KEY" : "", $rec{$_} ? "REC" : "", $mand{$_} ? "mandatory" : "optional", $mult{$_} ? "multiple" : "single"; # # $guar{$_} ? "[guarded]" : "" ; } } foreach (@obsoleted) { print $output $_; } } 1; SCHNAPP------------------------------------------
- Previous message (by thread): Tools based on whois -t output.
- Next message (by thread): Tools based on whois -t output.
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[ db-wg Archives ]