Re: Method/Program for small "database" with some pictures entries

From: Netocrat (netocrat_at_dodo.com.au)
Date: 05/31/05


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.



Relevant Pages

  • Re: My First C# (warning - long post)
    ... if it contains the keyword. ... from hitting the database to determine if the name is a database name. ... KeywordDictionary interface. ... push the knowledge of the Connection to the data source class ...
    (comp.lang.cobol)
  • RE: Search function on a form
    ... You haven't said whether you have designed this database yourself or it has ... Search for "text search" in the query forum and you will get ... box that lists all the various words you might want to use (and you can use ... When you put a filter in the query for each keyword: ...
    (microsoft.public.access.forms)
  • Re: Searching in tree structures
    ... content is represented in a tree structure maintained in a database, ... tree and look at it's root node. ... the root node in the database. ... A severe performance hit, OTOH, is always present. ...
    (comp.lang.php)
  • Re: Using COUNT and ORDER BY in a SQL Statement
    ... > database and returns the record count using the COUNT keyword. ... > I have a database called users with 1 table named tblStaffInfo. ... > with username as the primary key. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Step-by-step, Keyword search
    ... >I am very new to Access and am having trouble finding instructions that I can ... >database for a user to search the entire database by keyword. ... create a new Query based on your table. ...
    (microsoft.public.access.gettingstarted)