Author: tom

  • Product Types

    I recently encountered a nice model on product types that I would like to share. A product type can be understood as an concept of a product, much like the descriptions you might see in a catalogue. Examples like a Peugeot 206 Gentry which is a concept of a car. It is not equivalent to…

  • XML and XSLT

    Several possibilities exist to read XML files. One such possibility is to have it read via XSLT. This procedure is composed of three elements: The XML file that is to be read; A XSLT file that provides us with instructions on how to handle the XML file. An engine that translates the XML file via…

  • Some Javascript to read XML

    I know that lots and lots of possibilities exist whereby an XML file can be read. One set of possibilities is to use a Javascript. One then stores a script on the webserver that is processed by the web-browser. Upon processing, the XML file in read and can be stored in another format. A quick…

  • Send an attachment via email

    It is possible to use telnet to send an email. This is even quite straightforward. The idea is to start a telnet session with: telnet mail.wxs.nl 25 (or something alike that contains an email server to which one has connection. One could then enter to indicate the sender and receiver of an email: helo mail.wxs.nl…

  • Skewness in teradata

    Currently, I work on a Teradata machine. I understand that Teradata is based on the idea that processes work in parallel with each other. The idea is that data are divided over so-called amps that each process their share of the data. If each so-called amp may process their share of data, the amount of…

  • Get data from Oracle

    There exist many ways to get data from Oracle. After all, this is the core functionality of Oracle: getting data in and out. A nice possibility is to retrieve data by means of a small script. Such script is straightforward: set echo off set pagesize 0 set feedback off set linesize 50 set termout off…

  • The foreign key in Oracle XE

    Oracle has introduced a small version of its DBMS that is labelled “XE”. This small version can be downloaded and used for free upon the condition that its usage is for personal study only. I really like this application: it has a relative small footprint; it runs on a small machine and it allows you…

  • How many non-nulls per column?

    In Oracle, it is quite well possible to display quickly how many non-nulls we have per column in a table. The script reads like: set termout off echo on feed off trimspool on head off pages 0 spool C:\countall.tmp SELECT ‘select count(‘||t.column_name||’) from ‘ || t.table_name ||’;’ FROM user_tab_columns t WHERE t.table_name = ‘DATE_D2’ ;…

  • How many records in a table?

    Recently, I encountered a very nice script that allows us to get an overview of the number of records per table in an Oracle scheme. First the script: set termout off echo off feed off trimspool on head off pages 0 spool C:\countall.tmp select ‘SELECT count(*), ”’||table_name||”’ from ‘||table_name||’;’ from user_tables / spool off set…

  • ASCII or EBCDIC: how to recognise it?

    Today, I heard someone complaining that he received a file that contained “unexpected characters”. Later it was discovered that this file was provided in EBCDIC and the receiver tried to open it on a UNIX box with an ordinary editor. Such a UNIX box assumes the ASCII lay-out and as the file was delivered in…