[hibernate-dev] Re: regarding more human-friendly table alias

"Nathan Xu" <[email protected]>
Newsgroups gmane.comp.java.hibernate.devel
Message-ID <[email protected]>
I simply gave an example that some existing tool or algorithm could be used. Obviously it cannot be based on single heuristics and it is definitively a highly experimental endeavour. 

The applicability of huffman encoding is as following:

1. list all the involved tables with their frequency in the SQL;
2. use huffman algorithm to assign shorter alias to table with more frequency so the overall SQL is the shortest

Again, just an example. Obviously SQL length cannot be the only perspective, if it counts.

There are many more perspectives to take into consideration, e.g.:
* using common abbreviation convention (e.g., hibernate -> hbt);
* similar table names have similar abbreviations;
* ... ...

Just a high level thoughts. We can make incremental progress by simulating human pattern. E.g., we can compare the SQL produced by Hibernate with the one provided by human and inspect the difference. There should be tons of patterns and heuristics seems inevitable.

This should not be a normal issue solved by one single ticket. It involves research and even the 'AI' buzzword.
_______________________________________________
hibernate-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.