Ferret File System/v0.1/SQL/fideal
< Ferret File System | v0.1 | SQL
Jump to navigation
Jump to search
fideals
"Fideal" is short for "ideal file". A fideal is the abstract idealization of the particular set of bytes contained within a file which is a perfect representation of the original – i.e. it either is the original, or it is a perfect copy. ("Original file" might be as good a name, but in some cases the "original" may become corrupted and one of the copies may be more accurate; the "fideal" is how the file is supposed to be.) Fideal records are generally only created when multiple copies of the same file are found, though they may also be created manually in order to track more information about a file. <mysql>CREATE TABLE `fideals` (
`ID` INT NOT NULL AUTO_INCREMENT, `Title` VARCHAR(255) COMMENT "unique name for the file, wherever it may be found", `Descr` VARCHAR(255) COMMENT "description, or pointer to wiki page", `AutoTitle` VARCHAR(255) COMMENT "automatically-generated title", `AutoDescr` VARCHAR(255) COMMENT "automatically-generated description", `FileSize` INT COMMENT "correct file size in bytes", `FileCkSum` INT COMMENT "correct file checksum", PRIMARY KEY(`ID`)
) ENGINE = MYISAM;</mysql>
- Basically, if you want to describe a file, you don't; you describe the fideal. Files are localized instances (possibly imperfect copies) of fideals.
- Title will probably end up being some form of the filename, possibly with disambiguating text prepended.
- At some point I'll probably have some kind of syntax whereby the Descr field can refer to a wiki page for more info. Maybe just straight HTML?
- AutoDescr can be generated by the application which first goes looking for the fideal and which therefore may have more understanding of the fideal's purpose in life
- It's not clear whether we need something more elaborate than just a 4-byte checksum, because there are so many different ways of generating this.