Propeller Chip & Database
johnnybgood115
Posts: 2
All,
Is there a recommended method / format for storing a database like structure of information that the Spin programming language can interface with?
I'm developing an application which requires users to select a wide variety of options and these options are then used to control different switches and relays for varying time periods.·
The easiest way may be to develop a .NET program using MySQL or other database system, but this means I'll need to have a PC alongside the Propeller board.· I'd much rather store all the information in a SD Card, for example, and allow my Spin program to read/write from there directly to a display.
How is this best accomplished with the propeller board and are there any tutorials/documentation on this?
Thanks,
John
Is there a recommended method / format for storing a database like structure of information that the Spin programming language can interface with?
I'm developing an application which requires users to select a wide variety of options and these options are then used to control different switches and relays for varying time periods.·
The easiest way may be to develop a .NET program using MySQL or other database system, but this means I'll need to have a PC alongside the Propeller board.· I'd much rather store all the information in a SD Card, for example, and allow my Spin program to read/write from there directly to a display.
How is this best accomplished with the propeller board and are there any tutorials/documentation on this?
Thanks,
John
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Yes .. lol ..
They're all of fixed size including text and numerical quantities. There will most likely be an upper limit of 10 characters for text and 3 for numbers. I'd like to be able to search and display just the text names; but give a user the ability to add/edit all attributes of each entity.
Example entity:
ID
Name
Part1
- time
- pin
Part2
- time
- pin
There are several ways of organizing databases and depending on the type of information thats in it and how you will be using the database in day to day operations helps determine which type of structure to use. The more explicit you can be the better.
To give you a little pre-info, the database is going to be a flat file. Tthis is the easiest since data structures aren't inherently supported by the Propeller and the SD library only supports one file open at a time. For the type of database where there's not going to be much if any similiarity between records such as a customer database, it's best to just throw all the data inline in one continuous data chunk. But if you have a large interelational database, such as a pick-and-place machine where the same component is used on multiple boards it's best to maintain seperate spaces for the board and parts and the board has pointers into the parts space. This way if a part needs to be substituted due to supply issue, then it only needs to be edited in one place and that automatically updates all boards instead of having to manually search each board to see if it contains the part and updating each instance seperately.
So being explicit as possible on how you intend on using it will be helpful for creating the most optimal database structure (simple where we can get away with it, more complex where it is necessary).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker