12-15-2022, 06:05 AM
(12-14-2022, 08:04 PM)Pete Wrote:Quote:Thanks y'all
You must be from Southern China!
Random Access files are nice if you are going to be overwriting lots of entries, otherwise sequential files are the way I usually roll. (Another funny expression). Anyway, If you go with sequential, use OPEN FOR BINARY instead of FOR INPUT. Why? Because it's about 10-times faster. With the extra speed, you really don't even have to build hash tables or use SEEK methods to get to dated entries, etc. In other words for less than millions of records, you don't need to design a more complicated file structure.
In school, I got straight A's, except in math, where they were rounded.
Pete
My mother's side is from South Carolina, that's about as southern as I get. Beijing is in the bitter cold north (we don't get snow typically, so it is a win/win). Is OPENing for BINARY the same type of usage as INPUT and OUTPUT. I have only ever worked UDT with input and output. Ideally, I'd like to record the changes as then there is no need to save. The wiki isn't friendly on how to use binary as a file type. Perhaps another magical piece of demonstration code can help me get my head around it... I am using the release over top choice for selection for the mouse. The code you shared was amazing and helpful! Thanks
(12-14-2022, 11:39 PM)TempodiBasic Wrote: @NasaCow
my two cents:
https://www.youtube.com/watch?v=AkCsREkq...2&index=16
database manage by hand or using DLL as for example SQL3?
Sequential text/binary file? Or UDT random file?
Using one file or more files? Using an hash table or pointers to forward/backward block of data (see nodes with one or two pointers).
Well how much time do you want to spend in project and debugging a database?
QB64 gives you all the opportunities to build up any kind of database!
Good luck but moreover good projecting respecting the amount of work that this you database must support, thinking about restoring a corrupt file too.
Waiting your developments...
That's the thing, I have a lot of choice, but I am not really informed to make a choice. I have lived and died by UDT input and output files (not even random, just load the whole thing at once and write it all again if there is a change.) Right now, VPNs and China are not playing nice. When Express gets their service working again, I will check out the video for sure. I am guessing altogether I need somewhere between 20 and 40 students, up to 600 assignments (that's three a day per every school day, I don't think any teacher would exceed that in a school year...), comments availability for each, and flags (I think a single byte could do this, up to 8 different flags). UDT seems clunky to me... What are your thoughts? I do appreciate the feedback