473,513 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a way to take a priori knowledge out of field definitions?

Hi,

It is possible to build a system where the fields are "self defining" : -

One way is to keep a dictionary of tags and descriptors, and to keep "the data"
in a dictionary using the same tags as keys, with values - an oversimplified
example:

DefinitionDict = {1:'Quantity',2:'Price',3:'Value'}

DataItemDict = {1:10,2:3.50,3:35.00}

This is conceptually not much different to putting headers on columns in a
database table or a spreadsheet, with the data item being a row, or to HT or
XML.

Now obviously the definitions need not be single valued strings, but could be
multivalues, for use at different times, such as for gui displaying, for
printing, etc, and could also hold type information, as most databases do.

Up to this point, there is no a priori human knowledge mixed in with the data
that has not been written down.

However, when we want to make say a validation rule, such as Quantity times
Price must equal Value, then we are using a priori knowledge about the data to
formulate this.

At this point, if a routine is written to check that DataItemDict[1] multiplied
by DataItemDict[2] is indeed equal to DataItemDict[3], then we are casting the
meanings into stone, and the flexibility of the structure is to a large extent
lost.

Now if I want to make a system where these sort of rules, as well as more
complicated ones, are also definable - Is there a way to do it simply and
cleanly - a way to expand the DefinitionDict so that it contains all of what we
know about the structure and relationships of and between the items of data?

It seems to me that if this could be done, then it could be used to dynamically
generate the routines needed for validation, update, etc...

But my brain strains when I try to think about how to do it...

- Hendrik

Sep 11 '06 #1
1 890
Hendrik van Rooyen wrote:
Hi,

It is possible to build a system where the fields are "self defining" : -

One way is to keep a dictionary of tags and descriptors, and to keep "the data"
in a dictionary using the same tags as keys, with values - an oversimplified
example:

DefinitionDict = {1:'Quantity',2:'Price',3:'Value'}

DataItemDict = {1:10,2:3.50,3:35.00}

This is conceptually not much different to putting headers on columns in a
database table or a spreadsheet, with the data item being a row, or to HT or
XML.

Now obviously the definitions need not be single valued strings, but could be
multivalues, for use at different times, such as for gui displaying, for
printing, etc, and could also hold type information, as most databases do.

Up to this point, there is no a priori human knowledge mixed in with the data
that has not been written down.

However, when we want to make say a validation rule, such as Quantity times
Price must equal Value, then we are using a priori knowledge about the data to
formulate this.

At this point, if a routine is written to check that DataItemDict[1] multiplied
by DataItemDict[2] is indeed equal to DataItemDict[3], then we are casting the
meanings into stone, and the flexibility of the structure is to a large extent
lost.

Now if I want to make a system where these sort of rules, as well as more
complicated ones, are also definable - Is there a way to do it simply and
cleanly - a way to expand the DefinitionDict so that it contains all of what we
know about the structure and relationships of and between the items of data?
Looks a lot like a RDBMS...
It seems to me that if this could be done, then it could be used to dynamically
generate the routines needed for validation, update, etc...

But my brain strains when I try to think about how to do it...
You may want to have a look at the descriptor protocol and packages like
traits and FormEncode.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Sep 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1916
by: Maarten van Reeuwijk | last post by:
Hello, I am using the Numeric package, and I need to strip edge cells off an array (dimension unknown) in an a-priori unknown direction. I implented this as follows: def el_remove_bcells(var,...
1
2174
by: Yasso Picasso | last post by:
Greetings, I have to admit that I'm still a beginner in the database field, but I'm actively studying, and this is why I will be utterly grateful for the proper, accurate, and wise guidance to...
36
3786
by: zouyongbin | last post by:
Stanley B Lippman in his "C++ Primer" that a definition like this should not appear in a header file: int ix; The inclusion of any of these definitions in two or more files of the same...
2
1679
by: Phil Latio | last post by:
My quandary is this..... I have a label application (Bartender) that I have hooked up to Access, to use the output of a cross tab. I've succeeded in getting the data within Access, but my...
17
4003
by: The Frog | last post by:
Hello everyone, I am working on an application that can build database objects in MS Access from text files. I suppose you could call it a backup and restore type routine. Accessing the...
3
1482
by: David Greenberg | last post by:
Hi This is a question of "what does it cost me". Lets say I have an integer value which would fit into a smallint field but the field is actually defined as int or even larger as bigint. What...
3
1596
by: perfectclick.ng | last post by:
I'm a beginner of MS Access, I need adequate knowledge on how to programme. I have a challenge in my office to write a pragramme that will calculate a compensation for all our distributors. This is...
6
2960
by: naschol | last post by:
I am somewhat of a novice and am trying to do a somewhat complicated thing (to me, anyway). What I would like to do is populate the field Entry Fee in the subform (Category Entries table) from a...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.