giovedì 19 giugno 2014

DB Table structure to Freemind Map

From an Oracle DB getting the names of all the tables and columns

SELECT TABLE_NAME, column_name
FROM user_tab_cols
order by TABLE_NAME
Export results into a simple csv file
table_name,column_1
table_name,column_2
table_name,column_3
run this awk command
awk -F, '{if (a[$1]++ == 0) print $1; print " ", $2}' table.csv > table.txt
for getting something like this:
table_name
 column_1

 column_2
 column_3
then Ctrl+a, Ctrl+c of all the table.txt content and paste them into an empty Freemind map project.