Implementing SQL on files

From: Anuradha Ratnaweera (anuradha_at_linux.lk)
Date: 02/14/04

  • Next message: Helge Hafting: "Re: fh_verify: no root_squashed access hundreds of times a second again"
    To: LKML <linux-kernel@vger.kernel.org>
    Date:	Sat, 14 Feb 2004 21:36:42 +0600
    
    

    Hi all,

    I am starting to write some code to add a feature which I think would be
    very useful, and like to get comments and suggessions from LKML. Please
    ignore this mail if it sounds like nonsense ;-)

    Also, if this is already happenning somewhere, please enlighten me.

    Short version: This feature will add a "table" file type and SQL
    executioin premitives to the kernel, and also relevent userspace
    programs.

    Still reading? Ok, here are the glory details:

    Longer version
    --------------

    Both the two popular open source database systems, Postgres and Mysql
    are going through the filesystem layer to manage databases, as opposed
    to some commercial counterparts that talk to the block IO layer
    directly. Also, most databases implement user management seperate from
    the UNIX user database. And the database is seperate from the rest of
    the filesystem.

    The feature I am planning to implenet will overcome these limitations by
    implementing a "table" filetype, and the primitive SQL operations in the
    kernel.

    Parsing SQL, optimizing etc. will happen at the user space.

    But here comes the interesting part. I am planning to do this without
    breaking VFS and traditional UNIX syscalls. To clarify, consider this
    table:

    Name Version
    ---- -------
    David Weinehall 2.0
    Alan Cox 2.2
    Marcelo Tosatti 2.4

    Using the userspace tools, one can create a "table" file (say
    maintainers), and insert the data to that file. Each file (or may be
    filesystem) has two characters (or strings) associated with them: field
    seperator and record seperator. Say, colon and newline. If I cat the
    file:

    % cat maintainers
    David Weinehall:2.0
    Alan Cox:2.2
    Marcelo Tosatti:2.4
    %

    Now, if I want to add something to the table, either I can use the
    relevenet userspace tools, but the following also will work.

    % echo 'Linus Torvalds:2.6' > maintainers
    %

    Even if one uses vi to edit the file instead of a simple echo, it won't
    get that complicated.

    The nice thing about this is that now we don't need a seperate
    authentication mechanism. Also, the database no longer needs to be a
    seperate entity (it need not exist at first place!).

    As far as I can see, the best way to implement this is as a ReiserFS 4
    module.

    Like to hear some comments and suggessions.

    Thanks for reading all the way here ;-)

            Anuradha

    -- 
    http://www.linux.lk/~anuradha/
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Helge Hafting: "Re: fh_verify: no root_squashed access hundreds of times a second again"

    Relevant Pages

    • Trying to set up a SQL Server Agent Account and I hit a wall....
      ... Our database is on SQL Server 2005, however it is set to compatibility mode ... You may need to set the compatibility level ... of the current database to a higher value to enable this feature. ... for the stored procedure sp_dbcmptlevel. ...
      (microsoft.public.sqlserver.security)
    • Re: OOP - a question about database access
      ... What I've decided to do is try to take a little database I have ... >and proper techniques of OOA, ... As you implement a feature, try to let the code tell you ... and delegation to help you eliminate this duplication. ...
      (comp.object)
    • Re: Oracle Streams / Change Data Capture Question
      ... we have a corporate database - our main system - which is effectively ... datasets off to the destination system. ... The question I have is whether or not a feature like 'Oracle Streams' ...
      (comp.databases.oracle.server)
    • Re: Oracle Streams / Change Data Capture Question
      ... we have a corporate database - our main system - which is effectively ... datasets off to the destination system. ... The question I have is whether or not a feature like 'Oracle Streams' ...
      (comp.databases.oracle.server)
    • Re: Compare a table to itself
      ... Charles Hooper wrote: ... Puget Sound Oracle Users Group ... The search feature in the 10g R2 online documentation took me here: ... "Oracle Database Advanced Replication Management API Reference 10g ...
      (comp.databases.oracle.server)