previous
|
start
|
next
An Invoice Table
For other objects, it is not so easy to come up with an equivalent database table structure
Consider an invoice; each invoice object contains a reference to a customer object:
public class Invoice { . . . private int invoiceNumber; private Customer theCustomer; . . . }
You might consider simply entering all the customer data into the invoice tables
It is wasteful
It is dangerous; on a change, you can forget to update all occurrences
In a Java program, neither of these problems occur
Multiple
Invoice
objects can contain references to a single
Customer
previous
|
start
|
next