2

在这里寻找捷径。我非常擅长 SQL 数据库引擎和 ERP。我应该澄清一下...我的意思是 MS SQL、MySQL、postresql 等数据库。

当我在一个新项目上工作时,我喜欢做的一件事就是了解什么正在被利用,什么没有被利用。在 T-SQL 中,这很容易。我只是查询信息模式并获取所有表的行数并过滤掉行数 = 0 的表。我知道这并不是真正的精确行数,但它确实让我了解了正在使用的内容。

所以我最近开始在一家新公司工作,他们的一个系统在 UniData 上运行。这是对主流数据库的一个相当彻底的转变,并且没有太多的帮助。我想知道是否有人知道在 UniBasic/UniQuery/其他任何内容中执行上面列出的相同操作的命令。

哪些表、文件被大量填充,哪些不是?

4

1 回答 1

2

You can start with a special "table" (or file in Unidata terminology) named VOC - it will have a list of all the other files that are in your current "database" (aka account), as well as a bunch of other things.

To get a list of files in (or pointed to) the current account:

:SORT VOC WITH F1 = "F]" "L]" "DIR" F1 F2

Try HELP CREATE.FILE if you're curious about the difference between F and LF and DIR.

Once you have a list of files, weed out the ones named *TEMP* or *WORK* and start digging into the ones that seem important. There are other ways to get at what's important (e.g using triggers or timestamps), but browsing isn't a bad idea to see what conventions are used.

Once you have a file that looks interesting (let's say CUSTOMERS), you can look at the dictionary of that file to see

:SORT DICT CUSTOMERS F1 F2 BY F1 BY F2 USING DICT VOC

It can help to create something like F2.LONG in DICT VOC to increase the display size up from 15 characters.

Now you have a list of "columns" (aka fields or attributes), you're looking for D-type attributes that will tell you what columns are in the file. V or I-type's are calculations

https://github.com/ianmcgowan/SCI.BP/blob/master/PIVOT is helpful with profiling when you see an attribute that looks interesting and you want to see what the data looks like.

http://docs.rocketsoftware.com/nxt/gateway.dll/RKBnew20/unidata/previous%20versions/v8.1.0/unidata_userguide_v810.pdf has some generally good information on the concepts and there are many other online manuals available there. It can take a lot of reading to get to the right thing if you don't know the terminology.

于 2015-12-29T03:02:11.843 回答