0

Hi ,
I have designed a database that is to create a application simlar to microsoft money

The database erd is aattched with this post. The database has following table
Invoice
Amount
Account
Profit_center
Customer

A invoice can sometimes split in to 3 parts

therefore i have create table invoice

with following column
Invoice_id (PK)
Customer_ID(FK)
Date

I have created a Amount table
with
Invoice_id
Profit_center_ID
ACCOUNT_ID
Amount

I have created amount table as the amount of the invoice is dependent on Profit_center and Account.

From the application i will first update the amount table and then the invoice table.
I wanted to cross check if this is correct.

Attachments AP.JPG 133.56 KB
2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by sushantlikhar
0

The only thing I would say is that since you have a Foreign Key in Amount called Invoice_id, you will need to update the Invoice table before the Amount table. If you try to insert into Amount table for an invoice that you haven't entered into the Invoice table, you will run into problems.

0

thanks for taking time to look at this . I understand now that i have to update the invoice table first and then the amount.

Thanks again.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.