accts_in
Table Creation and Population

15 October 2000


The accts_in program (in /fs/tcc/src/oracle/copy_in) is used to populate some of the tables used by the new account database. The tables it populates are filed daily with information from the existing Perl DBM files of the current accounting system and from information in the password file on prism.

The tables that get populated by this script are:

  1. account
  2. billing
  3. billingnumber
  4. idnumber
  5. person

NOTE: These tables keep dates in the format "DD-Mon-YYYY".

Account Table
Column data spec source - other -
username VARCHAR2(8) acct_dbm
idnumber VARCHAR2(16) bill_dbm
type VARCHAR(16) acct_dbm
Current mappings:
default -- unknown
X -- internal
S -- staff
F -- faculty
spouse -- spouse
G -- graduate
U -- undergrad
Sp -- special
C -- club
R -- research
A -- alumnus
T -- temporary
N -- NRAO
I -- comm college
E -- emeritus
M -- MST
O -- outside
NA -- unknown
unknown -- unknown
status VARCHAR(16) /etc/passwd
modemuser VARCHAR2(1) acct_dbm {Y,N}
expires DATE input [ NULL ]
created DATE system [ SYSDATE ]
actor VARCHAR(16) input

Billing Table
Column data spec source - other -
sequence INT Oracle
memo VARCHAR2(256) input
username VARCHAR(8) acct_dbm
billingnumber VARCHAR(16) bill_dbm
idnumber VARCHAR(16) bill_dbm script assigns unique
if not bill num
pennies INT bill_dbm
type VARCHAR2(16) bill_dbm
service VARCHAR2(16) bill_dbm
rate INT Table - rate
charged DATE input [ NULL ]
created DATE system [ SYSDATE ]
actor VARCHAR(16) input

Billingnumber Table
Column data spec source - other -
billingnumber VARCHAR(16) bill_dbm
valid VARCHAR2(1) input
created DATE system [ SYSDATE ]
actor VARCHAR(16) input

IDnumber Table
Column data spec source - other -
idnumber VARCHAR(16) bill_dbm script assigns unique
if not bill num
valid VARCHAR2(1) input
created DATE system [ SYSDATE ]
actor VARCHAR(16) input

Person Table
Column data spec source - other -
idnumber VARCHAR(16) bill_dbm script assigns unique
if not bill num
billingnumber VARCHAR(16) bill_dbm
lastname VARCHAR2(64) prism:/etc/passwd
firstname VARCHAR2(24) prism:/etc/passwd
middlename VARCHAR2(24) prism:/etc/passwd
private VARCHAR2(1) input {Y, N, U}
valid VARCHAR2(1) input {Y, N}
created DATE system [ SYSDATE ]
actor VARCHAR(16) input