My bookkeeping currently a workbook made up of several spreadsheets in OOo Calc ver 2.3 running under Windows XP, and it is working well.

I am currently setting up a database in OOo-Base (ver 2.3) with a view to migrating my data to it, to hopefully use from the end of the financial year, onwards, but my database skills are a bit rusty and I would appreciate some advice.

In my tblCUSTOMERS I have the following fields:
CustID  (auto-integer, Primary Key)
FirstName
MiddleInitial
LastName
Address1
Address2
...  etc.

In my tblJOBS I have the following fields:
JobID   (auto-integer, Primary Key)
CustID  (Foreign Key to CustID in tblCustomers)
DateOfService
Requirements   (computer repairs or upgrade required)
Tasks              (work carried out - itemised)
Time               (Billable hours spent on the job)
... etc.

So far, so good. I have two tables containing different data from each other, apart from he Primary/Foreign Key relationship which allows me to pick up customer data to add to a job report.

But! ... the next table I started to build was tblInvoices (invoices to customers). I am creating a tblInvoices because I have an Invoice Sheet in my spreadsheet version of my bookkeeping. The fields in the database version of tblInvoices would be:
InvoiceID   (auto-integer, Primary Key)
InvoiceDate   (date invoice prepared)
Date1            (Foreign Key from tblJobs)
Date2            (Foreign Key from tblJobs)
CustID          (Foreign Key from tblCustomers)
...  etc

In fact, all of tblInvoices, apart from InvoiceId and InvoiceDate would be Foreign Keys referring to other tables.

My question is - Do I need to put all these foreign keys in my tblInvoice, or should I just record the new information like Invoice Number & Date, and just one Foreign Key to each of the tables I wish to get information from. Should an Invoice be a report rather than a table in its own right?

These are my current spreadsheets:
Invoices from Suppliers
Invoices to Customers
Job Notes
Bank data (Exported from Internet Banking)
Purchase Orders
Quotes
Service Reports


How many of these would you make into tables?
How many Foreign Keys should one have in a table?

Many thanks,  James




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to