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 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('@')])" This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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,...
|
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...
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |