Hallöchen! Sebastian Kraft writes:
> [...] > > Ok, I fully agree. That would really make sense. What scheme could > we use to set the IDs? Simple enumeration is too error prone and > we always have to keep track of the last ID. Maybe a combined > format: > > "PX1755-1" for a Pentax 17-55mm lens. If there are several with > the same focal length we can increase the last part by one. I was hoping for a purely numerical format so that the calling program only has to store an int. We could assure integrity in our database with a script. Values < 1000 would be reserved for local use. However, this has the problem that intra-database links are not legible. I think of two cases where they occur: <calibration cropfactor="1.534" camera="1342"> Here, the "camera" attribute is purely informational (like the XML comments with currently used). And the second case is to avoid compact camera mounts: <lens> <camera>1065</camera> So, one uses <camera> instead of <mount>. In both cases, a non-numerical ID would make the database much more legible for human eyes. I think if we guarantee that the length never exceeds, say, 63 characters, this is almost as easy as an int for the calling program? Still, a numerical ID is possible, and the drawbacks could be dealt with. Besides, making up all the string IDs for lenses is no fun either. > Or maybe hashing the attributes? I thought of hashing the attributes for local entries which do not yet have an ID; definitely not for the main database. But maybe it is better to discard all entries without an ID and force the user to update their local files? Tschö, Torsten. -- Torsten Bronger Jabber ID: [email protected] or http://bronger-jmp.appspot.com ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Lensfun-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lensfun-users
