Self-referenced table in Oracle 9i database for huge amounts of data
Hello!
I'm designing a database (Oracle 9i) for payments registration system, obviously it will hold a VERY big amount of data, which is going to be changing constantly. There are so called “list payments”, which have several beneficiaries bound to it, additionally for transferring money to some beneficiaries a commission fee might be applied, which is to be bound to the payment, or rather to certain beneficiary, as well. “List payment” has about 6 properties, which are common for all beneficiaries. Commission fees and “list payments” beneficiaries properties are very similar to those of payments. Firstly I've been planning to create the following structure: single self-referenced table PAYMENTS for all payments types, including “list payments”, payment beneficiaries and commissions fees. Field PAYMENTS.ID would be a unique primary key to identify objects stored into PAYMENTS table. Records representing payments beneficiaries would have field PAYMENTS._ID filled with PAYMENTS.ID value of master “list payment” it is bound to. If commission fee would to be applied to the money transfer to certain beneficiary, then it would be stored in the same table PAYMENTS, with PAYMENTS._ID equal to PAYMENTS.ID of beneficiary. My question is how is such structure going to affect performance, is not it better to store beneficiaries in the separate table from point of view of performance (coz from point of view of convenience it is better to store all the data in the same table... at least for me :) )? Which approach would be preferable and why? Any advice will be appreciated.