 |
|
 |
|
Next: how to use IIF()
|
| Author |
Message |
External

Since: Jul 16, 2008 Posts: 1
|
(Msg. 1) Posted: Wed Jul 16, 2008 4:00 am
Post subject: Calculated value dilemma Archived from groups: comp>databases (more info?)
|
|
|
Hi all
I am designing a database for my charity (we are a local special needs
charity) to replace our existing one, and my main goals are to make
the database accurate, easy to use, and able to expand (the current
database is not!).
The database will hold contact and membership details for about 300
families, staff/volunteers and other contacts, along with event
booking (we hold about 5 a week) and payment details.
So, for each family we need to see how much they owe, plus a full list
of all their transactions. I am considering having a transaction
table, which details every payment anyone has ever made.
IDEA 1
To follow normalisation rules I should avoid having calculated values
in the table, and I should therefore simply calculate the balance
whenever I need it by querying the table. I guess as the database
grows I would have to periodically 'consolidate' the balance to
maintain efficiency.
However, I see each updated balance as a snapshot in time - when I
look back to figure out 'who paid what when', I want to be 100%
confident that the database will return the same balance it would have
returned at the time. If a rogue entry were to somehow find its way
into the table, it would mess all the balances up...
IDEA 2
As keeping historically accurate info is important, 'hard-coding' the
balance in the table seems to me like it might be the most appropriate
solution, even though it breaks the normalisation rules.
Any suggestions would be greatly appreciated!
Mark
PS I've never designed a database before, so please let me know if
I'm completely barking up the wrong tree! >> Stay informed about: Calculated value dilemma |
|
| Back to top |
|
 |  |
External

Since: Apr 20, 2007 Posts: 83
|
(Msg. 2) Posted: Wed Jul 16, 2008 10:15 am
Post subject: Re: Calculated value dilemma [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Jul 16, 6:00 am, Rainboy wrote:
> Hi all
>
> I am designing a database for my charity (we are a local special needs
> charity) to replace our existing one, and my main goals are to make
> the database accurate, easy to use, and able to expand (the current
> database is not!).
>
> The database will hold contact and membership details for about 300
> families, staff/volunteers and other contacts, along with event
> booking (we hold about 5 a week) and payment details.
>
> So, for each family we need to see how much they owe, plus a full list
> of all their transactions. I am considering having a transaction
> table, which details every payment anyone has ever made.
>
> IDEA 1
> To follow normalisation rules I should avoid having calculated values
> in the table, and I should therefore simply calculate the balance
> whenever I need it by querying the table. I guess as the database
> grows I would have to periodically 'consolidate' the balance to
> maintain efficiency.
>
> However, I see each updated balance as a snapshot in time - when I
> look back to figure out 'who paid what when', I want to be 100%
> confident that the database will return the same balance it would have
> returned at the time. If a rogue entry were to somehow find its way
> into the table, it would mess all the balances up...
and screw up an audit, and so many other things. Have you discussed
some of the requirements with an accountant?
>
> IDEA 2
> As keeping historically accurate info is important, 'hard-coding' the
> balance in the table seems to me like it might be the most appropriate
> solution, even though it breaks the normalisation rules.
Why put it in the transaction table? Why abandon normalization?
Consider creating a balance summary. Different entity. Make it a view.
If the performance of the view ever gets to be an issue, then make it
a materialized view. With the right indices there shouldn't be much of
a performance drag. I don't think you have the data volume.
>
> Any suggestions would be greatly appreciated!
>
> Mark
>
> PS I've never designed a database before, so please let me know if
> I'm completely barking up the wrong tree!
You are getting overly concerned about performance before you even get
the core functionality working. With decent normalization, you should
be able to optimize later, if need be.
HTH,
ed >> Stay informed about: Calculated value dilemma |
|
| Back to top |
|
 |  |
| Related Topics: | Unify Database information? - Hi. I am trying to find any and all information out there regarding the Unify database. Specifically the older version which runs on SCO OpenServer. I am trying to export data from this database with an applcation's query tool, but the tool is causing..
mysqldump - Hello, I'm trying to do a dump of my database with one line for each INSERT: INSERT INTO Table VALUES(...); INSERT INTO Table VALUES(...); ... I couldn't do it with mysqldump. I tired the different options, but I always get 1 big INSERT line: INSERT..
OWB client and HR sample schema - Buddies, I'm new to Oracle Database Warehousing and OLAP, I've just installed OWB 9.2 for experiment. When I tried to connect to the sample schema HR, I encouter a error with message "API5022 Cannot connect to specified repository. verify connecti...
Is Primary Key index in MySQL? - In MySQL database, if I create a primary key, is that true that this primary key is also a index? If I create a primary key on one column, I don't need to create an index for this column. Is that true? Thanks a lot!
[UPD] SQLeonardo MMV.II - SQLeonardo is a database query tool written in Java. Include FreeQueryBuilder to create SQL queries without directly writing SQL. All queries can be saved in a workspace and than reloaded. Works with any JDBC compliant.. |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|