2011年1月12日星期三

Core banking buzzwords--Part 2

IRA: Individual Retirement Account.

Distribution: Distribution refers to withdrawing funds from an IRA account

Club Deposit: club deposits offer customers an opportunity for saving for specific purposes by way of setting aside amounts at periodic intervals to build a substantial lump sum at maturity.

Continous Compounding: continous compounding refers to making the compounding period infinitely small, it is the process of calculating interest and adding it to existing principal and interest at infinitely short time intervals.

Internal Revenue Service: a United states federal government agency that collects taxes and enforces the internal revenue laws.

Partial pay off (PPF) , PPF penalty methods: the three methods used to calculate the penalty levied on a customer for making a PPF for the loan taken by him/her.  There are three methods in FCR:
   1. on Amount: Penalty is charged as x% of amount
   2. on Amount Term: Penalty is charged as x% p.a for the remaining period.
   3. Waive

Current Asset: the asset that can be used or converted into cash within the current financial year.  Tables: BI_BILL_DETAILS

Current Liability: a financial obligation or liability, which is due or payable within the current financial year.

Credit Rating: A rating that measures the credit worthiness of a person, business, organization or country; the rating is determined based on the opinions of Banks and financial institutions. Tables include: BI_RISK_CARD_DETAILS, BI_ACCT_RISKCARD_XREF...

Suspense GL: A general ledger (GL) account where only those entries are posted, which could not be posted in their allocated GL accounts due to some reasons. Types of suspense GL based on the various reasons for an entry to get posted into a suspense GL.
    1. Online Transaction Suspense GL
    2. EOD/Automatic Suspense GL
    3. Clearing Suspense GL
Also there are two other types:
    1. Real Suspense GL
    2. Contingent Suspense GL

Penalty Routine: The logical set of instructions used for deriving the penalty amount.  Sounds like a concept in TD. Penalty applicable due to partial withdrawal can be done in two ways for all TD products at the bank level.
   1. Absolute Method: The absolute penalty can be defined as a fixed rate or floating rate.
   2. Incremental Method: Penalty can be defined as reduction in applicable TD interest rate.  'Penalty Interest Rate' = 'Interest Rate' - 'Net Incremental Penalty Interest Rate'

Reject of Outgoing Payment: Rejection of outgoing payment is issued by te counter party's bank to which the outgoing payment was sent.  Tables include: PM_TXN_LOG, PM_PAYMENT_TYPES...

Charging in Loans: Charging of Interest is the recognition of a due or a receivable of interest from the customer. This may occur at a frequency different from accrual. All interest accrued till the time of charging is debited to the account.  Accrual and charging of interest are closely interlinked functions. For most loans, charging of interest for a period takes place subsequent to accrual. 
In FLEXCUBE, to raise Principal and interest component is called charging. Once charging is done that amount becomes due which the customer will pay back to the Bank as an installment.
Charging happens in BOD but holiday processing charging is done in EOD.
Table LN_TMP_RLN_INTEREST stores interest base,interest rate, and number of days for which interest is calculated.

Counterparty: the other party (that may be a customer, company, institution, or organization) out of the two parties involved in any financial contract or payment transaction.

EOD, end of day. it refers to the processes that are run on a daily basis to perform a certain action on all database items that require this action, such as interest or fee accrual, interface file generation, and so on. Tables include: BA_EOD_RESTART, BA_EOD_CTRL_PARAM.
Split day processing: the bank can close banking business in one branch but continue to process transactions in another branch on another business day.  This is particularly useful when branches are spread over a large geographical area an done or more of the branches have not closed the branch batch by the End of Day.

Payments: transfer of funds from a payer to a designated account or Beneficiary.  A funds transfer transaction involves a Debtor or Payer (an entity whose account is debited) and a creditor (an entity whose account is correspondingly credited) or Beneficiary. The transfer of funds between customer account can be classified into two broad categories:
    1. Payments: eg. a customer requesting a transfer of funds to a customer in another bank;
    2. Collections: eg. a utility company requesting collection of bill payments from accounts of its subscribers in another bank.

Payment Transaction: A unique combination of a payment type and the service that it provides to the initiator of the transaction.  A payment transaction uniquely describes a payment message.

payment Network: a logical end-point of any payment transaction. Network adapter is a physical channel on which payment transactions can be sent or received. Network calendar is used to maintain working days for the network. Tables include: PM_NETWORK_MAST, PM_NETWORK_ADPTR_MAST

Mandate(委托,托管,指令): An agreement between a creditor and a debtor, which allows funds transfer between them. 
   1. Incoming Direct Debit Transaction: A debtor is the customer of the bank and mandate is maintained to authorize debits on his/her account;
   2. outgoing direct debit: Creditor is the customer of the bank and he/she would like to send a mandate related information to the debtor's bank for his/her request for debit on the debtor's account.
   3. incoming payment: creditor is the customer of the bank and mandate is maintained to authorize credits on his/her account.
  Tables include: PM_MANDATE_DETLS, PM_MANDATE_LOG, PM_MANDATE_STATUS

Outgoing Payment: refers to transfer of funds from a customer's account to a counterparty's account in another bank.  The funds flow out of an account in the bank and the transaction is initiated in the bank's FCR system. Tables include: PM_TXN_LOG, PM_PAYMENT_TYPES

Network Float Days: The number of working days that the selected network takes to make funds available to the counter party's bank, since the dispatch of the message on the network.

Counterparty float days: The number of working days that the bank takes to make funds available to the counter party.  Related table: PM_FLOAT_CONFIG...

Outgoing request for debit:  refers to a collection of funds from a counterparty's account in another branch to a customer's account, wherein the credit occurs after the counter party's bank sends a confirmation.

Recall of outgoing direct debits: refers to an initiation for canceling the outgoing direct debit, which the bank has sent on behalf of the customer. This outgoing direct debit will not be cancelled until the other bank responds.

Reject of outgoing request for debit: rejection of an outgoing request for debit is sent by the counter party's bank to which the outgoing request for debit was sent by us.

Approval of outgoing RFD: approval of an outgoing RFD is sent by the counter party's bank to which the outgoing RFD was sent by us.

Network value date: The date on which the debtor's bank transfers funds to the payment network i.e. from the intermediary GL to the network GL. Usually calculates as below: Network Value Date = Activation Date (Back date) + Network float.

Dispatch Date: The date on which a payment transaction is actually sent out on the network; it is calculated and tracked by the payments system.  Dispatch date is the sum of Activation Date/Debit date and dispatch offset days.

Activation Date: The date on which the customer requests the Bank to execute the payment transaction.

Outgoing Direct Debit: refers to a collection of funds from a counter party account in another bank to a customer account, wherein the credit occurs after a specified period.

Collection: Refers to a transaction initiated by a creditor to transfer funds from the debtor's account to the creditor's account where the debtor's bank and creditor's bank are different.  Collection is associated with two significant events:
   1. A request for pulling funds is initiated from the creditor and this request reaches the debtor's bank
   2. later, the funds are credited to the creditor's account

Zone and Circles: zone and circles are used to segregate a payment area geographically.  They will be maintained if the network behaves differently for different geographical entities. Examples of zones and circles could be clearing sectors, zip codes, EURO area and Non-Euro area.

Incoming Direct Debit:  refers to a collection of funds from a customer account to a counter party account in another bank, wherein the credit to counter party occurs after a specific period of time.

Incoming Payment: Funds or payments transferred from a counter party's account to our customer's account, where the counter party's account is in another bank.  The creditor is the bank's customer, the debtor is the counter party bank's customer. The funds flow into an account in our bank and the transaction is initiated in the counter party's bank system.

Bank-Branch Directory: A bank directory that contains information of all possible beneficiary banks and their branches that are likely to participate in domestic transactions. The bank directory will be maintained as a list of banks and their branches.

Internal Clearing Check:  refers to whether a nostro(往来帐,本国银行在国外银行持有的外币账户) account is maintained or not for a particular bank-branch for a payment transaction.  If the bank-branch is flagged as being an internal clearing type of bank-branch, then there is no need to send a network message because the payment transaction will be settled against the Nostro account maintained for the bank-branch. otherwise, the system determines the network to which the message for this transaction should be routed.  Tables : PM_NETWORK_MAST...

Customer Value Date: the date on which a customer's account is debited.  In case of Backdated outgoing payment, this date is the activation date.  Customer Value date = Activation Date + Deviation for Customer

Message Value Date: The date that is specified in the incoming message itself as the credit value date.  It's not mandatory to have a message value date. If the value date is specified in the message, then Message value date is used for dates calculation instead of Message arrival date. Message Value date is expected to be there in the message.

Message Arrival Date: refers to the posting date on which the incoming payment transaction/message is received by the payments system.  Message Arrival Date is expected to be there in the message. By default it will be  the posting date.

Customer credit value date: The date on which the credits is affected on the account of the customer. 
    'Customer Credit Value Date' = 'Message Arrival Date'/'Message Value Date' + 'Customer Float'

Implemented GL: implemented GL is of 2 types: Miscellaneous credit,Miscellaneous Debit. 
    Miscellaneous Credit:  The general ledger account for the transaction branch will be credited first followed by any number of subsequent debit transactions. The master transaction is always the credit transaction.
    Miscellaneous Debit:  The master transaction is always the debit transaction.

Account Revaluation: Account revaluation is a process by which the LCY equivalents of balances in the FCy accounts are marked to market.

Cross Currency Transaction: A transaction in which the currency of the debit leg is different from the currency of the credit leg.

GL Recon Number: for an implemented GL, all the transactions done against that GL have a common number called Recon Number.

Reporting Line: Head office, central Bank office, branch office... Their reporting hierarchy. Tables include: GLTM_REPLINES

Payment Type: a unique way to identifying a payment message based on the following criteria:
     1. Whether it is a payment or a collection
     2. Whether it is incoming or outgoing
     3. Whether it is a reject message
     4. Whether it is a recall message(recall is reject after the value date)...
There are lots of pre-defined payment types in FCR.  Tables include: PM_PAYMENT_TYPES

Reject of Incoming Direct Debit: rejection of incoming direct debit is issued by us to the counter party's bank, which has issued the incoming direct debit.

Recall of incoming direct debit: refers to an initiation for cancelling the incoming direct debit, which the counter party's bank has issued the customer. The incoming direct debit will not be cancelled until we respond to the counter party's bank.

Direct and indirect participant: direct participant: a bank or its branch that has a direct participation in the network defined in the payment system; indirect participant: a bank or its branch that has an indirect participation in the network defined in the payment system.

GL Type, Code class:  Category of GL can be queried from the 'TYPE' column of the GLTM_GLMASTER table or the 'COD_CLASS' of the GL_TABLE. A head GL can be assigned any of the following categories:
   Asset : 1 ;
   Liability : 2 ;
   Expense : 3;
   Income : 4;
   Contingent Asset 5;
   Contingent Liability 6;
   Memo : 7;
   Position :8;
   Position Equivalent -9;

Beneficiary Account: The account that receives funds in a funds transfer/payments transaction. Beneficiary account is a commonly used term in Banking parlance and specifically in OFCR to denote the Account, which is getting funds from another account or institution or external sources such as third parties through EFTs.  Funds are always credited to a beneficiary account.  The beneficiary account can be of the following types:
     1. Customer Account
     2. General Ledger
     3. Internal Account of Bank

Late Clearing: Process of Marking clearing cutoff for the business day.  Late clearing is the process by which the branch indicates the cutoff point for the cheques accepted to go in that day's clearing.

Back-to-Back loan: A loan account that has a Term Deposit as collateral or a loan given against a TD is referred to as Back-to-Back loan.  Tables related: LN_PROD_RATES, LN_ACCT_RATES...

Floor Rate for Loan: It is the minimum rate that will be maintained for a product or a account if defined in product/account level.

Eligibility Plan: Eligibility plans are used to sort customers into 2 sets, those who meet the conditions defined in the plan and those who do not.  Eligibility plans apply to customers and not to account. Rules are applicable to customers and accounts.  Tables related include: RP_ELIG_PLAN_MAST, RP_ELIG_PLAN_DETAILS. .

Adjustable Rate Mortgage: A loan in which the interest rate is periodically adjusted, moving higher or lower in the same ratio as a pre-selected index such as treasury bill rates. ARM loans may include caps on interest rate increases in a given time period, and over the life.







2011年1月10日星期一

PL/SQL logging

Once I was in the EBS financial team, created several PL/SQL packages. At that time, we use the FND_LOG.STRING() and FND_FILE.PUT_LINE() functions to logging the temporary results of the procedure/function to debug programs. At that time, I thought those two procedures are Oracle DB's facilities, but it turns out only EBS financial database has such procedures.

In common PL/SQL programs, we have to use the DBMS_OUTPUT.PUT_LINE() function to record the parameters and temporary results of the program.

Further details will be explored in the future.

Log4j also has a package for PL/SQL code.

For every major function/procedure in a package, we have to logging on its entry and exit of the method as well as exceptions and errors.

The following code is an example:

IF (PLOG.isDebugEnabled) THEN
 PLOG.debug(GV_MODULE_PREFIX || '.' || var_l_function_name || ' begins with the following parameters: ' || ...);
END IF;

IF(PLOG.isDebugEnabled) THEN
  PLOG.debug(GV_MODULE_PREFIX || '.' || var_l_function_name || ' ends with return code: '|| var_l_ret_code);
END IF;

Just another prove to say that Log4j is great.

DMBS_OUTPUT.put_line function can print VARCHAR2, DATE, and number but not BOOLEAN directly. So we have to use the following way to print the BOOELAN value PLOG.isDebugEnabled.

BEGIN
  IF(plog.isDebugEnabled) THEN
dbms_output.put_line('hello, DEBUG IS ENABLED');
ELSE
 dbms_output.PUT_LINE('hELLO, debug is not enabled.');
  END IF;
END;



The logging messages are stored in TLOG table.

Also, it's very important to log error message:
IF(plog.isErrorEnabled) THEN
  PLOG.error('Here is also an error message.');
END IF;

The error message is also in the table TLOG. Seems that they LLEVEL are all equals to 30.


2011年1月5日星期三

Core banking buzzwords

Core banking: 核心银行
 CORE: Centralized Online Real-time Exchange
 Redemption: 赎回
 Redemption on Maturity: 到期赎回
 Recurring Deposit Redemption (RD): 零存整取
 Cash Deposit:现金存款
 Balance Inquiry: 余额查询
 Amount based Account Image Display:基于金额的账户影像显示
 CRB Details Maintance: 监管报告(CBR)信息维护
 Customer: 客户
 Account: 账户
 Signature Type: 印签类型
 Local Currencey: 银行本币
 System date: 系统时间 (分行入账日期)
 Transaction processing: 交易处理
 Account Transaction: 账户交易
 Loan Account Transaction: 贷款账户交易
 Rate Change: 贷款利率变更
 Bank Code : 银行代码. elements of a bank code is not clear for me. what about other bank’s code?
 Maintance Status Code: 维护状态标记. Authorized, Null, Deffered and etc is an element of the Status Type
 Authorize: 授权. Paraller Authorize. Local Authorize,Remote Authorize, Centralized Authorize, Deffered Authorize(延迟授权)

  Cut-off: 日切
  EOD: End of Day
  BOD: Beginning of Day

  Hold: 冻结.
  Hold Number: a number generated by flexcube to identify a particular Hold marked on an account; multiple holds can be marked on an account. Hold number is generated every time a hold is marked on an account. Hold Number is stored in table CH_HOLD_FUNDS, as the column COD_HOLD_NO. Hold numbers will be unique for a single account but will not be unique for multiple accounts.

  Lien: 留置权;抵押品所产生的利息. (don't know it in an exact way).
  Inoperative account: An account in which no operations or transactions have taken place over a period of time. An account that has been inoperative for a period of time is declared as s dormant account after the inoperative period is over. but there are no accounts with status inoperative in OFCR.
 The table ba_acct_status stores all the available account status in the FCR, although some of the status like 'inoperative' are not available anymore.
  There are blocked accounts, dormant accounts, restricted accounts and lots of others.
  Dormancy period: 账户休眠期, Typically 6 months. 

  Instruction Number: a number generated by FC to identify a particular Standing Instruction maintained for a CASA account. unique for a single account but not unique across multiple accounts.  Table CH_SI_TABLE stores the information as column CTR_SI_INST_NO for a CASA account.
 Standing Instruction: 长期指令. There is a standing Order in wiki, sounds the same thing. an instruction a bank account holder gives to his bank to pay a set amount at regular intervals to another accounts.

  Loan Disbursement: Loan host disbursement/ Loan branch disbursement.  The process of paying out the sanctioned loan amount to the customer.  First Host disbursement, then branch disbursement in the same day, otherwise, the host disbursement has to be reversed.  If reversal of host disbursement can not be done manually, the system does it automatically at the end of the day. 
  Tables involved are: LN_ACCT_DTLS, LN_ACCT_BALANCES, XF_LN_BRN_XREF

 Loan Schedule Simulation: refers to the simulation of a loan account schedule generation if the disbursement date, loan term, amount and rates are provided as inputs to the system. Loan Funds Flow Calculator..

Notice Deposit: Call Deposit. A type of time deposit, which doesn't have a maturity date and can be redeemed or withdrawn whenever the customer asks for it with a prior notice to the bank. The fewer days prior the day he/she actually redeem the deposit, these days are referenced as the Lead Days for Notice.

Demand Deposit: the customer can redeem the deposit anytime, on demand and without notice.

Call deposit is an example of is an example of Notice Deposit, while Flexible TD is an example of Demand Deposit.  Related tables include: TD_ACCT_MASTER.

Out_of_Order Accounts: An account for which either the outstanding balance is in excess of the sanctioned TOD/Overline or , no credits have been made for the last three months.  If an account is out-of-order for a period of more than 90 days in case of overdraft/credit cash, the account is treated as an NPA account.  An account for which the credits made are not sufficient to cover the interest debited during the last three months is also considered an out-of-order account.

Passbook format: the structure of the savings passbook page in the form of the number of rows and the number of transactions it will accommodate. Passbook format is stored in .xsl file. Format is selected at the product level. For CASA products only. The passbook format is stored in the table: BA_REC_DOC_PSBK.

Payment Appropriation(拨款,挪用) Simulation: refers to the simulation of the status of arrears(欠款,逾期贷款) in a loan account,when a customer has made some payment towards the arrears. 

Reminder Plan: A plan defined in the system comprising a series of advices/notices according to which reminders are sent to defaulting customers to payup the installment amount due towards a loan outstanding or arrears. the plans are stored in BA_REMINDER_PLAN.

Streaming in EOD batch: the process of running multiple instances of a processing function simultaneously.

Collateral ID: a unique number entered into the FLEXCUBE system by the user to identify a specific collateral. If the collateral is a TD, the collateral ID is the TD account number.  Table related LN_COLL_INSURANCE.

Collateral: 并行的/旁系的/抵押品/担保品.  A value pledged(抵押品) by a loan borrower to the bank for repayment of the loan in case it cannot be repaid through the normal repayment procedure.  Flexcube accepts the following collateral categories: property, automobile, term deposit, financial securities, insurance, bill, non-standard collaterals.

Face Value: the value of the loan. The total amount sanctioned for the loan.

Advance: Any payment made by the customer toward a loan repayment before the due date.

Customer: The person/party who holds an account with the bank and avails of its service. The person/party who has a customer Id in FLEXCUBE.  CI_CUSTMAST maybe the table.

Service Charge: Service Charge is related to the following table: BA_SC_CODE, SC_PKG_MAST, SC_PKG_ACCT, SC_ACCT_PKG, SC_DUE_FOR_CYCLE, SC_TXNS_DLTS, SC_TXNS_SUMMARY.

Accrual: the process of accruing or accumulating interest for a bank account before crediting or debiting it to the account. In the context of interests, and refers to the interests that have been accrued in the general ledger for an account but not actually been credited or debited to the account. Accrual is the recognition of income. In loans, the recognition of interest is done at frequent intervals. This is specified at the product level as column 'FRQ_INT_ACCR' in the table 'LN_PROD_MAST'. Tables related to the accrual includes LN_ACCT_INT_BALANCE_DTLS, LN_INT_RULES, LN_PROD_INT_ATTR

Posting date: the date on which a transaction is posted/recorded in the Flexcube system.
There are Transaction Date, Value Date, Activation Date, Dispatch Date in Flexcube system, lots of different dates.

Batch number: a unique number generated by the flexcube system and assigned to a set of transactions (called a batch) in flexcube for the purpose of identification.  The tables include 'BA_BATCH_MAST', 'LN_BATCH_CTRL','LN_EOD_RESTART'. System Generated Transactions and User Generated Transaction have different schema in the batch number. System generated Transactions have batch numbers generated in the host database, while user generated transactions have batch numbers generated in the branch database

Customer Id: a serially generated integer number. Maximum limitation of this number is 9999999999. The code of generating the ID is written in C.

Branch: a subdivision of a bank established at a location other than the location where the bank itself is situated, in order to cater to the clients in that location.

Interest base: the sum on which interest is calculated.  Interest base increases when compounding of interest takes place. The related tables include 'LN_INT_BASE_HIST'.

Account Number: A unique number generated by the FLEXCUBE system or entered by the user and assigned to a customer's account for the purpose of identification. The account number is used to identify the account of a customer in all transactions made by the customer.  Account number is a numeric value. 10 digits to 16 digits. BA_PROD_ACCT_INFO table stores configure info of the bank's account number.  Account Number can be generated by the FC system or entered by the user ( for example, for a legacy system migration).  Account generation mask can be configure separately for TD, LN and CASA accounts.  The SQL is as below:
'SELECT TXT_MASK_COMMON,TXT_MASK_CHQ_ACCT_NO,TXT_MASK_TD_ACCT_NO,TXT_MASK_LN_ACCT_NO FROM BA_PROD_ACCT_INFO'

Lucky Account Numbers: reserved only for CASA accounts. These numbers are maintained in a list and are allocated as per availability.  CH_RESERVED_ACCT_MAST stores those Lucky account numbers. 

  BA_PROD_ACCT_INFO, OL_ACCT_SRLNO, CH_PROD_MAST, BA_PROD_PRODTYPE_XREF tables stored Account information.

Catch-up accrual (利息,收益):interest accrual that has been done in between an accrual cycle due to some charging event on the account. Catch-up Accrual is done when a charging occurs.  不是很明白这个catch-up accrual的意思和商业价值.

Account: An account is the basis of the relationship between a bank and its customer and the account statement gives details of all the credit/debit transactions that have taken place in the account. Accounts that are opened for a customer are stored in the table 'CS_HO_CUSTACCTXREF'
In Flexcube, accounts are always created under a specific product and are assigned an account branch.  Accounts' information are stored in different tables depending on the module. 
 1. CASA accounts: CH_ACCT_MAST
 2. TD accounts: TD_ACCT_MAST
 3. LN accounts: LN_ACCT_DTLS

General Ledger: general ledger is an internal account maintained by the bank where it records the financial transactions done by the bank. FC allows multi-currency and multi-branch posting to a GL. Ledger account means Branch+Currency+GL Code combination. Tables related: GLTM_GLMASTER, GL_TABLE, GL_MASTER

Fast Path: task code. Flexcube's definition.

Account status: the current position or status of a customer's account.  Available statuses for LOAN and TD accounts are different from those for CASA accounts. Tables: LN_ACCT_DTLS, LN_ACCT_STAT_HIST, BA_ACCT_STATUS

Interest: a sum charged for borrowed money or a sum paid for use of money. Usually expressed as percentage of the amount borrowed or paid over a period of time (which is usually one year). Accrual of interest results in a credit entry in an interest income GL account. Related table:  LN_INT_RULES, LN_INT_TXNLOG, LN_INT_COMP_TXN, BA_PROD_PRODTYPE_XREF

Accrual basis: the rule that determines how interest accrues over a period for an account.

Arrears: a due raised to the customer.  The customer borrows money from the Bank. Now, if the customer has not paid back the due money within the due time, the Bank will ask him/her to pay this due periodically by raising arrears.  Types of arrears: interest arrears, penalty arrears, principal arrears and so on.

Arrear Type: The kind of arrear. All the available arrear types are stored in the table: LN_ARREARS_TABLE, LN_UNACC_ARREARS_TABLE, LN_ARREAR_TXN_HIST, LN_ACCT_DTLS, LN_ACCT_STAT_HIST

Currency: The unit of measurement of money that the bank running FLEXCUBE choose to perform a monetary transaction in.  Currencies can be maintained only at the head office. Attributes needed for a valid currency:
  1. currency name
  2. currency code
  3. currency type
  4. currency rate
  5. currency denomination (面额)
In flexcube, a currency can be assigned to a product. Once a currency has been assigned to a product, all the accounts opened under that product will have this currency as it account currency by default.  Tables include: BA_CCY_RATE, BA_CCY_CODE, CYTM_CCY_DEFN, BA_FW_COD_CCY_XREF, CYTM_RATE_TYPE, CYTM_CCY_PAIR_DEFN, CYTM_CCY_DENO_MASTER

Interest Rate: The percentage of Interest charged/paid for a fixed period of time, usually one year.  Three types of interest rates: fixed, floating and fixed amount. In floating rate, there is a ceiling in rate.  Tables include LN_ACCT_RATES, LN_RATCHG_REJECTS, LN_RATCHG_ACTIONS, LN_RATCHG_ADVICE_ACTIONS, LN_RATCHG_SCHEDULED.

Drawdown: the withdrawal of funds from a CASA account to pay loan account arrears, as per the instructions specified by the customer who holds the account. A single CASA account can at the same time be a remitter(汇款人) account for multiple loan accounts.  The setup instructions are stored in the following table: LN_ACCT_PAYINSTRN (COD_REMITTER_NO).

Transaction: Conduction of a financial business initiated by a customer or the bank and recorded in the customer's account and the bank's general ledger.

Remitter account: An account through which remittance or transfer of funds take place.

Moratorium: 暂停/中止;延期偿付.A stage or period in the loan repayment schedule in which no repayment is done or interest paid; however, interest is accrued during the period. At the end of the period the accrued interest is capitalized and the regular period schedule is drawn up by the flexcube.

Transaction Date: The number that gives the date and the time of the day when a transaction take place in FC. Part of the Transaction Key and indicates time up to the 'second' level only.  The date is as per the original channel, which means that mostly it never indicates the time of the data center. Transaction originated from ATM machine, it reflects the time of the city where the ATM is located. The field 'dat_txn' stores the transaction date. Tables include LN_ACCT_LEDG, LN_ARREAR_TXN_HIST.

Transaction Key: a unique combination of numbers that serve to identify various constituents of a transaction that has taken place in FLEXCUBE.  Transaction Key helps in identifying the various transactions that were posted for one user transaction. Typically consists of the Branch Number, the User/Teller Number, the Batch Number, the Transaction Reference Number, the STAN Number, the Sub Sequence Number, the transaction Date and User reference Number.  Tables include: LN_ACCT_LEDG, XF_OL_ST_TXNLOG_CURRENT, LN_ARREAR_TXN_HIST, BA_CC_BRN_MAST, SM_USER_PROFILE.

Sub sequence number: A unique number generated by FC to identifies the various legs of a transaction distinctly.  The field name is 'ref_subseq_no'. Most transactions have two legs (one for debit, one for credit), sometimes more than two.Flexcube generates one unique number to identify both these legs, and this number is the Sub-Sequence Number. Tables include: LN_ACCT_LEDG, LN_DAILY_TXN_LOG_HIST, LN_ARREAR_TXN_HIST.....

STAN Number: An acronym obtained from System Trace Audit Number. This is a unique number generated serially by Flexcube, everytime a transaction is performed in a day. Starts from 1 every business day for every user. The value is stored in a table as the field -'ref_sys_tr_aud_no'.  For system-generated transactions, the STAN number is generated per program, while for user-generated transaction, the STAN number is generated per user.

User reference number: The number of the voucher entered into the flexcube system. it's alphanumeric and can be up to '40 digit' long. 

User number: a unique number generated by FC to identify a particular user.  User number is also referred to as the Teller Number. This number is used to identify the user or the bank teller who initiated a particular transaction or was involved in the particular transaction. Field name stores this database is 'COD_USERNO'.  The maximum limit for a user number in FLEXCUBE is 32767. The rules generates a User number/Teller Id.

Product: The commodity sold by a Bank to its customer.  A retail bank, typically sells three major types of products to its customers----Loan products, Term Deposit (TD) products, and Current & Savings Account (CASA). Under these three types, the bank defines one or more products. Account in flexcube is opened under a product.  Tables include: LN_PROD_INT_ATTR, LN_PROD_MAST, LN_PROD_PROMO_INT_RATES, LN_PROD_RATES, LN_PROD_RATES_180608, LN_PROD_RATES_BKP, LN_PROD_REPRICING_REVISION, LN_PROD_SCHTYPE_XREF

Transaction Reference Number: A unique number generated by Flexcube that identifies all the sub-transactions or internal transactions that together form a single complex transaction.

Transaction mnemonic: a unique number assigned by the Flexcube System to a particular type or category of transaction that it handlers, for the purpose of internal identification.  Field name is 'COD_TXN_MNEMONIC'. 

Account branch: The branch of the bank where an account is opened and to which it belongs. Account branch is also called as the Home branch. Every branch is identified a unique code called the branch code.  Account branch is of high significance for the bank.  The account bank's balance sheet, service charge, profit and loss are all recorded. Account and its branch is stored in the table: CS_HO_CUSTACCTXREF.  SELECT COD_ACCT_NO, COD_CC_BRN FROM CS_HO_CUSTACCTXREF
Since customers can be relocated, account branch can be changed and it's called to branch transfer.  BA_CC_BRN_MAST_NLS...

Customer IC (Identification Criteria): a unique number entered in Flexcube by the user during the process of adding a new customer, social security number, passport number, birth certificate number or corporate register number or others are OK.

IBAN: International Bank Account Number, a unique number generated by FLEXCUBE to make the flexcube account identifiable across the world.
BBAN: Basic Bank Account Number, it is a unique number that identifies a local Bank account in a country.  BBAN is a constituent of IBAN.

Transaction Branch: The branch of the bank in which a transaction is performed. The Transaction branch number is also referred to as the Originating Branch code/number. The field name in the database is 'COD_CC_BRN_TXN'

Account currency: the currency in which all the bank account entries are posted. 
MCA: multi-currency account. one account can hold multiple currencies. Multiple accounts are opened for the customer, one per currency. For customer's convenience, he/she is given a single account number and performs transactions against a single account. Flexcube automatically transfer funds to the correct accounts, thereby avoid the currency exchange risk.  Find currencies for an account:
  For CASA: SELECT COD_ACCT_NO, COD_CCY FROM CH_ACCT_MAST ORDER BY COD_ACCT_NO
 For TD : SELECT COD_ACCT_NO, COD_CCY FROM TD_ACCT_MAST
 For LN : SELECT COD_ACCT_NO, COD_CCY FROM LN_ACCT_DTLS

Product Code: The unique number entered into the system to identify a specific product.  The maximum allowable value of the product code is '999'. The number ranges available to CASA/TD/LOAN are defined in the table BA_PROD_ACCT_INFO.  The field name to store the Product Code is 'COD_PROD'.

Branch Number: The unique number entered into system to identify a specific branch of a bank.  Minimum number is 1 and the maximum number is 9999. In some banks, specific number, typically 333 was kept reserved to identify a non-CBS(non core banking system) branch.  Branch number is also referred to as Branch Code. This number helped identify the exact branch from where the transaction originated. This number also was referred to as the Originating Branch Number. The field name of this number is 'COD_CC_BRN'.

Captitalization: Conversion of arrear into capital by adding up the arrear amount to the principal amount such that it is removed from the IOA base and made a part of the principal. 

Collateral (抵押) Code: a unique number entered into the Flexcube system by the user to identify a particular type of collateral to be attached to a loan.  The collateral and the loan account to which the collateral is attached should have the same currency.  The table related is : LN_COLL_INSURANCE

Collateral Value: The monetary value of the collateral to be attached to the loan account.

Sweep-out: A functionality in OFCR by which excess balance or fund in a customer's CASA account is transferred to another account that maybe a CASA, TD or even a non-FC account.  The account from which funds are being swept out is referred to as the Provider Account and the Account into which funds are being swept in is referred to as the Beneficiary Account.
  Three types of sweep-outs by types of accounts involved in the funds transfer:
    1. Sweep-out from CASA to CASA
    2. Sweep-out from CASA to TD
    3. Sweep-out from CASA to non-FLEXCUBE account.
  Two types of Sweep-out categories:
    1. Normal Sweep-out: funds are swept out from the Provider Account to the Beneficiary Account
    2. Reverse Sweep-out: funds are swept out from the Beneficiary Account back to the Provider Account.
  The Sweep-out of funds takes place typically at the end of the business day during the EOD batch process.
  Tables included: CH_SWEEP_OUT, CH_SWEEP_PRIORITY_MASTER

Term Deposit: An amount deposited by a customer with the bank for a fixed term or period, that cannot be withdrawn until the term or period is over, and for which the bank pays interest to the customer.  Tables include: TD_DEP_MAST, TD_DEPOSIT_DETAILS, TD_ACCT_MAST.

Simple Interest: interest computed only on the principal balance, without compounding.  Tables include: TD_DEP_MAST, TD_ACCT_MAST...

Taxable Customer Id: The customer ID of the customer for whom tax is applicable, on opening a Term deposit account for him/her.  Tables: TD_AUDIT_TRAIL, TS_TDS_LOG, TS_INCOMETAX_LOG, TD_ACCT_MAST....

Tax Code: a unique number that represents the tax deducted at source (TDS)..

Blocked Account: A TD account for which the interest is accrued on the deposits but is not paid to the customer or compounded to the principal.

Tax Exemption Limit: an income limit specified by the land's government, up to which tax is not applicable or is exempted.

Restricted Account: The accounts of a particular customer wherein only authorized officers can inquire and post transactions into. Unauthorized Tellers will not be able to transact on the account.

Employee Account: The account belonging to the staff of the bank. FLG_EMP_ACCT in the table TD_ACCT_MAST

Renewal Number: the number of term deposits created out of the source term deposit either due to renewals or the payouts.

Principal Balance: The original or base amount invested in a Term Deposit, which is exclusive of earnings.  The TD account principal balance is the sum total of the principal balance of all the term deposits held under the TD accounts.

Maturity Date: The data on which the term deposit matures or becomes due and payable.  This Date is arrived at by adding the deposit term to the interest start Date of the TD.  Sometimes a little trick to calculate the Maturity Date.

Payout Frequency: The time interval at which the interest earned on a Term Deposit is paid out.

Compounding Frequency: a specified time interval at the end of which the interest earned on the term deposit will be compounded to the principal.

Term: The period of the Term Deposit.

Interest Index Code: A unique code manually generated by the system to identify an interest rate defined by the bank for a particular product.  The rate of the product is not stored in the table, instead the index code is stored. Maximum 999 index codes can be defined.

Product Variance: The interest variance defined under product-rate maintenance for the slab in which TD principal balance and term fits in.

Annual Equivalent Rate (AER): The annualized rate or return, which the Bank pays to the customer. The calculation of the AER depends on the number of compounding cycles and also the rate of the deposit. AER is calculated at the time of account opening.  AER is calculated at the time of account opening.  AER is re-calculated whenever there is a change in the interest rate for the deposits.

Discounted Amount: The discounted term deposit amount. For discounted deposits, the customer allows the deposits to receive a pre-defined maturity amount.  For example, a customer wants to earn a maturity amount of 10,000. The bank will consider the interest adjustments and calculate the initial payment amount, the customer needs to make. In this case, the maturity amount and the interest are fixed.

Net Rate (Net Effective Rate): The actual rate at which interest is paid for the deposit.
    Net Rate = Interest Rate (at deposit level) + Interest Variance + Product Variance. The net rate should be within the minimum and the maximum interest rate specified at the product level.

Lien Amount: The amount in a term deposit on which lien has been marked. The deposit will remain blocked upto the extent of the lien marked.  A lien marked on a Term deposit automatically puts a partial lien on the account to which the deposit belongs.  Tables related: TD_LIEN_MAST.
    Principal Lien:
    Partial Lien:
    Internal Lien:
    External Lien:

Schema Variances: The interest variances applicable on a Term Deposit schema.

Net Effective Date: The date from which the net rate is effective. The net effective date is defined at the product level.

Interest Withheld (保留,扣留): The total interest amount withheld or not paid out to the customer til date.

Tax Withheld 1 (Total): The total tax 1 deducted from interest against the TD recovered from the customer. This tax is accrued but not remitted to the government. The tax 1 is deducted on the basis of Tax Deduction at source flag defined at the product level and the Tax code attached to the account at the time of account opening.

Balance Uncollected Interest: The interest, which have not been collected by the customer even though payout modes have been specified for them. Interest amounts, which have payout instructions specified as cash, DD or BC, should be personally collected by the customer. However, in case of there interest amounts have not been collected, they are displayed as Balance Uncollected Interests.

Deposit Variance: The interest variance defined for a particular TD opened under a TD account.  If payout proceeds are reinvested, the interest variance for the new deposit initiated is displayed.

Balance Uncollected Principal: The matured deposit amount, which has not been collected by the customer even though a redemption or payout instruction has been specified for it.  Amounts, which have payout instructions specified as cash, DD or BC, are to be personally collected by the customer. If not collected, these proceeds are displayed in the Balance Uncollected Principal fields.

Unclaimed Interest: The interest, which is due, but not collected by the customer after the grace period is over.  Unclaimed interest gets transferred to the unclaimed GL after the specified grace period.

Outstanding Principal: The principal balances of the matured term deposits, which have not been redeemed.

Balance Principal Due: The principal balance from the previous premature redemption deposit amount for which no redemption/payout instructions have been specified as a result of which the amount has not been paid out.

Unclaimed Principal: The principal amount, which is due, but not collected by the customer after the grace period is over.  The unclaimed principal get transferred to the unclaimed GL after the specified grace period. This amount can be redeemed.

Next Payout Date: The date on which the subsequent interest is due to be paid.

Compounding: The interest, which is accrued not only on the original principal but also on the accumulated interest of prior periods over a specified duration.
   For TD: Compounding is done over a time interval. If this interval or compounding frequency is specified as quarterly then the accumulated interest will be added to the principal every three months.
  For Loans: interest is debited to the interest base. The system maintains an interest calculation base as separate from the principal. On compounding, the interest base is calculated by the interest arrears.

Next Compounding Date: The date on which the accrued interest is added to the principal.

Deposit Date: The date on which the Term deposit has been initiated.  The investment calculations for the deposit will be effective from the specified date, if the interest date is also the same.

Interest Start Date: The date from which the interest calculations will start for a Term deposit.  For payin by cheque, DD or BC,the interest start date is, by default the value date of the instrument. The user can specify any date, on or after the value date of the deposit, and on or before the maturity date of the deposit.

Maturity Instruction: maturity instruction denotes the instructions set for the payout of the proceeds of a matured deposit.  A deposit matures after it remains in the bank for the defined period of time. There are three maturity options in FCR: No instructions, Redeem, Reinvest.
   No instruction: The amount gets transferred to the matured deposits GL and the amount would earn post-maturity interest for the grace days. Beyond grace days, no PMI interest will be applicable.
   Redeem: The amount gets transferred to the payable GL and this amount would not earn post-maturity interest.
   Reinvest: The amount gets added to the existing account with the auto renewal term.

Pro-rata Interest Paid deducted:  The interest that has already been paid or compounded against the deposit amount, which is being redeemed.

Account Write-off :  refers to the de-recognition of the value of an account; specially in the context of loan accounts that have gone into the suspended state.  Write-off refers to recognition of the reduced value of an asset or , a reduction in recognized value. Writing-off a bad debt that is declared noncollectable ( such as a loan on a defunct business or a credit card due that is now in default), signifies removing it from their balance sheets. An account can be wrote-off partially or fully. The sum of all the arrears, principal and accrued interest being written off is referred to as Total Writeoff.  Tables include: IN_ACCT_WRITEOFF, AC_WRITEOFF_PARAM

Sweep-in: A functionality in which funds are pulled in to a customer's CASA account from a specified account that may be a CASA, or a TD account.  Concepts of Sweep-in account and Sweep-in provider account. Tables include: CH_SWEEPIN

Class: Group of users created in the System for purpose of restricted and categorized access and authorization.  Any valid user of the system must be linked to a class. A user can be linked to a multiple classes too.  Tables include: SM_CLASS_PROFILE, SM_USR_CLASS_X_REF...

Security Manager: Security Managers are those category of users who have management level access rights.

Profile start date and Profile end date: the date from which the user profile becomes active and the date after which the profile will seize to be active.  Related tables include: SM_USER_PROFILE

Kernel: the original version of FC that is sold to a customer and from which future versions are derived following further customizations.

Vocation Start date and end date: refers to the user's vocation period or the period he/she is on leave. The user access for this ID will be disabled during this period. After the end of the vocation period the User's access is enabled.

Transaction Limit: The maximum amount of transaction that can be done by a user who is linked to a particular template; if the transaction amount exceeds this limit, higher-level supervisory authorization will be required to complete the transaction.

Safe Box ID: The unique identification number assigned to a safe deposit Box.

Allotment Number: The account number assigned to the customer for the type of safe box allotted to him/her.  CH_SB_ACCT_ID_XREF, CH_SB_CUST_WAITLIST.

Penalty Arrears: The total calculated penalty arrears charged to the account. Penalty interest is also called interest on arrears (IOA) and is levied on installment repayments which are made after the grace period which is defined at the product level.

Allocation Fee: the fee charged for the allotment of a safe deposit box (SDB) to a customer. Allocation fee is also referred to as Allocation Charge.

Plan Code: a number entered into the FC system to identify a loan document plan.  The plan code is numeric and can be up to three digits long.  because a document plan is a collection of individual loan documents represented by a plan serial number, the plan code refers to a collection of plan serial numbers.  Plan code is also referred to as Document Plan Code. Tables related: LN_DOC_PLAN, LN_LAPS_ACCT_DOC, LN_ACCT_DOC, LN_DOC_PLAN_XREF.

Plan serial number: a number entered into the FC system to identify an individual loan document included under a specific document plan. For a particular loan document plan, the plan serial number is unique and helps identify the loan documents included in the document plan.  Related tables: LN_DOC_PLAN, LN_LAPS_ACCT_DOC, LN_ACCT_DOC.

Usage Events: the various events, which a safe deposit box undergoes during its life cycle.  Various usage events can be listed here:
   1. Access
   2. Drill
   3. Key Lost
   4. Restrict
   5. Revoke
  related table: CH_SB_USER_ACTIVITY_LOG.

Safe Deposit Box: A locker type of facility extended by the bank to its customers, enabling the customers to store their valuables, documents and other important items in the bank's care.  Related tables: CH_SB_ACCT_ID_XREF, CH_SB_CUST_WAITLIST, CH_SB_USER_ACTIVITY_LOG, CH_SB_PROD_XREF.

Safe Box Deposit Amount: The amount, which the customer will pay the bank for availing the safe deposit box facility.

Original Deposit Number: The source, or the parent term deposit number from which a new term deposit has been created.  The original deposit number is created due to interest payout, or due to renewal. It will have a new deposit running number, but will retain the original deposit number of the source deposit. This number helps to find out the history of a particular TD.

Deposit Number: a number generated by FC, which represents the number of term deposits opened under an account.

Rate Interest: the rate usually expressed as percentage per annum charged on money borrowed or lent.  Tables related: TD_PROD_MAST, BA_INT_INDX_MAST, BA_INT_INDX_RATE...

Schema Rate: The interest rate applicable on a  TD schema, in case there is any on the respective TD product under which the account is opened.

Customer Waitlist: the list of prospective customers who have requested for using a safe deposit box.

Drill: The act of forcibly opening a safe deposit box by drilling it, in the event of the customer not paying up the rent/dues for using it.  Once the SDB is driller, the inventory of contents of the box are recorded and the associated with the customer and the box.  Related tables include: CH_SB_USER_ACTIVITY_LOG...

Number of Advance Rents: The number of rents that the customer will be paying in advance for using a safe deposit box.  By default, the system displays the value as 0. However, the User can enter values up to 9.

Custodian: The teller who will operate the safe deposit box on behalf of the bank and who will also be the bank witness in case the safe deposit box is drilled open.

Dimensions: The length, breadth and height of a safe deposit box; also includes the unit of measurement used.  Tables included: CH_SB_PROD_XREF

Stock code: a unique code manually generated by FC and assigned to an inventory item to help identify it.  The stock code is a unique combination of the inventory type, currency code and issuer code. Stock code helps the bank in tracking its inventory items such as SDB, cheque books, demand drafts and so on.  Tables include: LV_STOCK_MAST.

Drill Days: The number of days given to a customer to pay up the dues towards his/her safe deposit box rental, after which the bank has the right to drill the box open.

Late Payment Notice Days: the number of days after which the system will be generating notices for payment due from the safe deposit box owner.

Key Lost: refers to the event of the customer losing the key to the safe deposit box he/she has been rented out by the bank. Key lost is a usage event wherein the customer will report the loss of the key to the SDB. There will also be service charge attached, which would be an event based SC and online in nature.

Agreement Expiry Advice Lead Day: the number of days prior to the expiry of the agreement for use of a safe deposit box when a notice/advice is to be sent to the customer intimating him/her of the approaching expiry date.

Fixed Penalty: The penalty amount that the customer is charged for non-payment of rental dues for a safe deposit box.

Percentage Penalty: The penalty amount that the customer is charged for non-payment of rental dues for a safe deposit box, expressed as a percentage. 

Bill of Exchange: an unconditional order in writing, addressed by the Drawer to the Drawee, asking the Drawee to pay a sum of money on demand or at a specified future date to the payee or the bearer.

Repayment mode: the way in which the customer pays back the loan amount availed, as specified in the standing instruction given by him/her. Two options: 1. Transfer from customer's CASA account;
             2. Transfer from customer's salary account during salary upload
 Tables: LN_ACCT_PAYINSTRN, column: FLG_REPAY_MODE

Drawee(支票的付款人,受票人): the party to whom the bill of exchange is addressed. The party to whom the Bill of Exchange is addressed.  Once the drawee accepts the bill, by writing on it and signing on it, he/she becomes the acceptor and is primarily liable to pay out when the bill matures. Tables include: BI_BILL_DETAILS, BI_BILL_STAT_XREF, BI_INSTR_XREF.

Drawer (开票人): the person who signs a cheque or a bill of exchange as the issuer ordering his/her Bank to pay out.  A drawer issues the bill, or makes the order for the bill to be accepted and paid. In the event of default by the acceptor, the drawer is obliged to pay out the face value of the bill on its due date to the holder.

Acceptor(承兑人): The party to whom the bill of Exchange is addressed and who accepts a bill of exchange drawn on him/her.

Endorser(背书人,背签人,转让人): The party signing on the reverse side of the bill, which servers as confirmation of purchase and title to the bill.  The list of endorsers' signatures on the back of the bill establishes the chain of ownership of the bill.

Payee(领款人,取款人): The person to whom the face value of a Bill of Exchange is to be paid.  The payee appears as the first endorser on the reverse of the Bill and this endorsement starts the chain of ownership of the Bill.

Working Capitals: The money that the business deals in, for its day-to-day work/operations.  Working capital is an excess of the person or company's current assets over current liabilities. This amount is calculated in the local currency of the bank.  The working capital is used to calculate the overdraft limit for a payee, who is pledging the bills against the given Drawee.

Savings Account: An unfixed deposit account into which money can be deposited, and from which it can be withdrawn anytime.  A savings account carries a rate of interest for the amount deposited in it, and allows withdrawal of money by cheque or a withdrawal slip.

Flexcube offers the following modules:
   1. Loan (LN)
   2. Term Deposit (TD)
   3. Current & Savings Account (CASA)
   4. Customer Information File (CIF)
   5. Clearing & Settlements (CLING)
   6. General Ledger (GL)
   7. Payments
   8. Origination System (ORS)
   9. Asset Classification (AC)
   10. Collections
   11. Security Management System (SMS)
   12. Service Charge (SC)
   13. Relationship Pricing (RP)
   14. Branch Operations (Brop)
   15. Back Office
   16. File Upload
   17. Bills
   18. Card Management System (CMS)
   19. Saft Deposit Box (SDB)
   20. System Operations
Some of these modules are referred to as Core Modules because they either process accounts, or are essential for the system and the bank to work at a basic level such as Loan, TD and CASA.

 



Oracle and PL/SQL Tips

if there is a TNS-12541 /12560 ERROR when you connect to a database.
it's maybe the listener is not started, please just start the listener using the following command:

lsnrctl start

Sometimes, there are several listeners in the same server, please be careful.

Someone asked me for help on a SQL. The requirements are simplified as below:
It has something to do with select distince multiple columns from a table. 
it's very simple:

select distinct column1, column2 from table1
Once I composed the SQL as below:
 
select cod_hold_no, dat_txn from (
     select cod_hold_no,dat_txn, min(rownumber) from (
       select rownum rownumber,cod_hold_no, dat_txn from ch_hold_funds
     ) group by cod_hold_no,dat_txn
    )

it's really sad that I try to solve such an easy problem by such difficult instructions.

Left outer join, right outer join and full outer join.  Purpose of an outer join is to include non-matching rows, and the outer join returns these missing columns as NULL values.
  Select last_name, department_name
   From employees e, departments d
   Where e.department_id = d.department_id(+)
or:
  Select last_name, department_name
   From employees e
     left outer join
      departments d
     on e.department_id = d.department_id
which means when there is no value matching in the departments table, the selected columns from the departments table (which is the department_name) is NULL.  That's simple master-detail relationship between the two tables, for left outer join, the left table is the master and for right outer join, the right table is the master table. So if there is no detail rows matching the master table, the columns which are supposed to be selected from the detail table are NULL. 

DECODE() function and NVL() function.

IF (pi_department_id IS NULL) THEN
SELECT * FROM EMPLOYEES
ELSE
  SELECT * FROM EMPLOYEES WHERE DEP_ID = pi_department_id;
END IF;


The above logic is very common in our everyday SQL programming, Let's merge it into a single SQL:

SELECT * FROM EMPLOYEES WHERE DEP_ID = NVL(pi_department_id, DEP_ID).
The SQL above could be bugging. Consider the following scenario: when the input parameter of pi_department_id IS NULL,  and also the DEP_ID column could be NULL, those rows with DEP_ID IS NULL will not be selected. The correct way would be :

SELECT * FROM employees WHERE NVL(DEP_ID,'#') = NVL(pi_department_id, NVL(DEP_ID,'#'))

When construct complex SQL, try to use the NVL and DECODE function to make your SQL neat. 

NULL value in DECODE
1. everyone knows that NULL = NULL is false, but in DECODE function, it's different.
  DECODE (NULL,NULL,1,0)
  will return 1.
try it!


In order to find the database's version, just issue the following SQL command:

SELECT * FROM v$version WHERE banner LIKE 'Oracle%';

A sql to find out the real source of the PL/SQL code.
In the schema, the user can find its own pl/sql package's source by issue the following sql command:

SELECT DBMS_METADATA.GET_DDL('PACKAGE_BODY','PK_EXT_TXN_DETAIL_ADHOC' ) FROM dual;

In another read only user's session, only the package declare can be get by another sql:

SELECT * FROM all_source WHERE type = 'PACKAGE' AND OWNER='C43CNHITR1' AND UPPER(name)='PK_EXT_TXN_DETAIL_ADHOC';


The result of the above sql is all the lines of the package declare, not the source code, have to append all the lines into the source.
In order to view the columns of a table, just use a SQL is enough, there is no need to use the GUI of PL/SQL developer. Just issue the following SQL:
 
desc table_you_want_to_see.