Re: Method/Program for small "database" with some pictures entries
From: Netocrat (netocrat_at_dodo.com.au)
Date: 05/31/05
- Next message: Netocrat: "Re: Method/Program for small "database" with some pictures entries"
- Previous message: Tony Lawrence: "Re: This used to be such a nice neighborhood..."
- In reply to: Anton Suchaneck: "Re: Method/Program for small "database" with some pictures entries"
- Next in thread: Alan Connor: "Re: Method/Program for small "database" with some pictures entries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 31 May 2005 17:37:30 GMT
Anton Suchaneck wrote:
>>> graph1.txt:
>>> prop_A 1 2883 "abc"
>>> prop_B 0
>>>
>>> graph2.txt:
>>> prop_B 1
>>> prop_C 8128
>> I notice that graph2 doesn't have prop_A and graph1 doesn't have prop_C,
>> so how different will the properties applicable to each graph be?
> I will have about 10 properties each having a set of values. It a bit like
> a 2 level tree structure. Properties not mentioned are undefined or
> missing.
>> Will you want to be able to easily
>> add different properties as time progresses?
> Quite likely. Categories could grow. In fact from the simple database I
> remember doing with a friend of mine, I wouldn't know how to implement a
> variable set of attributes, without marking all remain attributes as
> undefined.
Depending on how you intend specifying search criteria you may want to think
carefully about exactly what each property should contain. eg. prop_A has
a few different types of data in it which might make it harder to search
than splitting it into 3 separate properties. Since you say it is a
two-level tree structure it might pay to investigate relational database
concepts a bit - eg normalisation - and see if perhaps a relational
database system (eg MySQL) would help. You seem to be certain that your
requirements are simple so this is very probably not necessary but it can't
hurt to have a look. See if you can gain anything from normalisation
techniques before trying a quick hack approach.
Variable attributes in a relational database are a bit tricky and depending
on how many there are can be wasteful of space. For extended attributes on
a file it's simple - if the attribute isn't there it isn't wasting space.
For a flatfile database such as Tony describes it's very similar with the
second approach and for the first again you waste a little space; the
advantage of this approach is speed.
>>>> c) what size is my database going to be?
>>> Rather small (in fact those picture are graphs from scientific papers)
>> I was thinking not so much in terms of image size but more of the number
>> of images and the amount of data associated with each image.
> It won't be many. It's a bit tedious to extract those diagrams from pdfs
> with the corresponding information in the text :)
>> $ setfattr -n user.prop_A -v '1 2883 "abc"' graph1.gif
>> $ getfattr -n user.prop_A graph1.gif
> I quite like that. That maybe motivates me to write some sort of improved
> "directory structure" for files. Quite often files I have could go into
> different folders, because they belong to multiple categories. I believe
> the common tree structure is outdated and should be replaced by a keyword
> system. There would be a list of most common keywords which I can choose
> from. Or better the most *effective* keywords which splits the available
> set of indexed files into two (contains keyword/doesn't contain keyword).
> So after clicking on some keyword suggestions I will find my file. It's
> like a dynamic directory structure which lets me find the files quickest.
> Similarly keywords would be proposed when a new file is to be categorized,
> so that the keyword names remain consistent.
Yes that concept is quite useful. A few OS developers have thrown it around
a bit but OS X's Spotlight functionality seems to come closest to realising
it. For this to work on a typical size filesystem you need indexed data or
it will be way too slow, so extended attributes alone would be insufficient
- you would also need to store them in an indexed datafile. They could
certainly be the base from which the index collects its data.
> So after that I can write my amazing algebra program, my ultimate
> programming language and my terrific game, which uses my outstanding
> artificial intelligence implementation :)
Don't forget to add comp.os.linux.misc to the credits.
- Next message: Netocrat: "Re: Method/Program for small "database" with some pictures entries"
- Previous message: Tony Lawrence: "Re: This used to be such a nice neighborhood..."
- In reply to: Anton Suchaneck: "Re: Method/Program for small "database" with some pictures entries"
- Next in thread: Alan Connor: "Re: Method/Program for small "database" with some pictures entries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|