| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | file database |
PE> So Paul, how about another database trick? Abracadabra! Ok, you need three tables: File Table ---------- File ID File name File size File desciprition etc Area Table ---------- Area ID Area Name anything else you can think of like security, retention etc. File-Area Table --------------- File ID Area ID All ID fields are just internally generated and used number. As an example: File Table ---------- File ID File Name File Description ------- ----------- ------------------- 1 PD_BBS.ZIP Public domain BBS 2 SW_BBS.ZIP Shareware BBS Area Table ---------- Area ID Area Description ------- ---------------- 1 Public Domain 2 Shareware 3 BBS stuff 4 Junk DB sent me File-Area table --------------- File ID Area ID ------- ------- 1 1 1 3 1 4 2 2 2 3 This means that PD_BBS.ZIP (file ID 1) is in areas Public domain (area ID 1), BBS stuff (area ID 3) and Junk DB sent me (area ID 4), whereas SW_BBS.ZIP (file ID 2) is in Shareware (area ID 2) and BBS stuff (area ID 3). To find what areas a file is in you need to read the file table and get the file ID. Then read the File-Area table and get all the matching Area IDs and finally read the area table for the description. To find which files are in a particular area you start from the area table and work the other way. PE> And while you're at it, how about recommending a database that I can PE> use? I want to be able to write C with embedded SQL, and distribute PE> the final executable. I want OS/2 and DOS support, and grudgingly PE> I'm even prepared to buy one, as it is basically everyone's duty to PE> support the SQL standard. I'm not really up on all the SQL products that are available. You'd have to look through some of the programming magazines to find something. PE> Is there some other database-related thing like Btrieve or something that PE> I can use instead, even if it means doing some manual translation of CSQL PE> into C/Btrieve? Preferably something Public Domain, or at least easy to PE> implement so that I can do it myself. Crikey, haven't we progressed PE> anywhere in databases in the last 40 years? BFN. There are plently of things like that around. It really depends on what you need and how much you are willing to spend. Again, I don't know enough to be able to recommend one particular product. The only one I own is the MIX Database Toolchest, which is dirt cheap, pretty good for a single user (not SQL though) and the C source code is available so you could probably port it to OS/2. Paul --- GoldED/2 2.42.G1114* Origin: It's life Jim, but not as we know it (3:711/934.1) SEEN-BY: 635/514 640/305 711/809 934 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.