D
DowningDevelopments
Hello all,
I am building a database for a residential compnay who rent out accomadation
to students, what they want is to store the financial information of each
student.
The problem that ive had to overcome is that the client needs to store what
bills and payments the student is paying for and how they are paying for it
on one form.
To do this i have seperate tabels for, telephone, interenet, parking and
other payments. (as each having different properties) which all link to a
payment table throught he paymentNo foreign key, which in turn links to the
student table (the students table holds the deposit) through the StudentRef
Foreign key in the Payment table.
It also has separate tables for the various payment types (as each has
different properties) 'Cash' , 'credit card', 'Cheque' & 'standing Order'.
These also link to the payment table through the paymentNo.
telephone bills
Internet connectionBill
ParkingBill Payoption
StudentRooms
OtherPaymentsBill ---> Payments ----> Students <---- Rents
StandingOrder
Cash
Credit Card
Cheque
Or at least it should, my problem is that im only able to have the payments
table attach to any one of these payment types or bills at anyone time eg.
payoption
StudentRooms
parkingbill
---------> Payments ----> Students <--- Rents
The SQL for this query is only complex as it has to show many fields from
the 6 tables, but i can list it if it helps.
In all tables linking to the payment table from the left, Ive matched up the
PK-FK
types
The payment table is very simple and has the following columns:
ReceiptNo (PK) (autonumber)
Date (date)
Student (string) --------------> StudentRef (PK in students table)
TotalCharges (currency)
TotalCollected (currency)
why is it that i cant link more than one table to the payments table and how
can i fix this?
with much thanks
Amit
I am building a database for a residential compnay who rent out accomadation
to students, what they want is to store the financial information of each
student.
The problem that ive had to overcome is that the client needs to store what
bills and payments the student is paying for and how they are paying for it
on one form.
To do this i have seperate tabels for, telephone, interenet, parking and
other payments. (as each having different properties) which all link to a
payment table throught he paymentNo foreign key, which in turn links to the
student table (the students table holds the deposit) through the StudentRef
Foreign key in the Payment table.
It also has separate tables for the various payment types (as each has
different properties) 'Cash' , 'credit card', 'Cheque' & 'standing Order'.
These also link to the payment table through the paymentNo.
telephone bills
Internet connectionBill
ParkingBill Payoption
StudentRooms
OtherPaymentsBill ---> Payments ----> Students <---- Rents
StandingOrder
Cash
Credit Card
Cheque
Or at least it should, my problem is that im only able to have the payments
table attach to any one of these payment types or bills at anyone time eg.
payoption
StudentRooms
parkingbill
---------> Payments ----> Students <--- Rents
The SQL for this query is only complex as it has to show many fields from
the 6 tables, but i can list it if it helps.
In all tables linking to the payment table from the left, Ive matched up the
PK-FK
types
The payment table is very simple and has the following columns:
ReceiptNo (PK) (autonumber)
Date (date)
Student (string) --------------> StudentRef (PK in students table)
TotalCharges (currency)
TotalCollected (currency)
why is it that i cant link more than one table to the payments table and how
can i fix this?
with much thanks
Amit