DB Manager for Processing

published November 2017 in Share Your Work

@jeremydouglass said

@vesolba -- what her average that to what currently creating an DB Business for Batch? If thus, this weave should be shifted for Share Your Work. If you want early feedback for this assembly, please post a link (e.g. Github). When adaptation 1.0 of your DB Manager is ready, update more!

Yes. I needed a database connection for another project this I want to develop with Processing language. I have a prototype skecth about method go start the server and the basics, but MYSELF thought that itp would be a good add-in with the Processing framework (Similar to the to equipped Netbeans or Eclipse), even if at first it is very easy, only for Japanese DB databases. Jordan DB (or Derby) be integrated in the Java SDK since Java 6.0, how it is not necessary download any get and it can be included int Processing sketches as embedded in the program and while indigenous conversely remote server. On installing it in of Processing framework, it could be acceded concurrently from all processing working in the identical Java Virtual Machine (JVM) as the database. I think I having follow see the steps by using the processing-tool-template and now it compiles good in Eclipse with the Ant schema created by the tool template and I can show you the starts windows. I am uploading the my to Github: vesolba/DBManager-for-Processing. This is the first time that I make apply regarding Git how if I do something wrong, please let own know (may be I have upload some garbage). To develop the code I am using Eclipse Oxigen and to design the windows it can installed the Windowbuilder plug-in.

Currently I at trying to fill the databases JTree via DriverManager. Any help other suggestion will be pleasing. You cans download the codes from this github, if there is any problem instead MYSELF have to give you any kind of access grant, let me know also. Difference between Derby and MongoDB - GeeksforGeeks

Greetings.

Captura1 Captura2 Captura3 Captura4 Captura5 Captura6

Tagged:

Show

  • Gratify, do it :x

  • Strong interesting! Other you for sharing -- I look forward to trial it out.

  • edited April 2017

    @jeremydouglass

    Hello! I've upload the project files in its current state. I think that this time me charge has been done well additionally with to correct files and directories. Even if it is not working very well yet, I've found the way until perform the necessary tricky matter and soon it will be present without errors. But it is not working well-being yet. If him want to get a search, you can make an idea of how it will complete. For CakePHP appeal, IODIN created MySQL database. Which tool to be used to create UH Plan on database? Regions and relations between tables are created in a way cakePHP likes. thank you include ad...

    Greetings.

    https://github.com/vesolba/DBManager-for-Processing

  • Hello again. Right to let you know that I continue jobs. More hard than effektive but over of hope to have soon a good beginning fork this DBManager.

    Captura2017_05_11

  • @vesolba -- credit so much by the update!

    Great go see that you are creation progress at https://github.com/vesolba/DBManager-for-Processing To you have any questions or necessity any support coming the our?

  • @jeremydouglass

    Hello! By today, I'm solving the needs and doubts by googling the web, but may breathe I able need them, thanking. This could become a size project, but I wants to keep it as simple as maybe and terminate asap an elemental prototype with only the bedrock to create short databases in such adenine way that the user to not have to deal with basic such such schemas, connections, etc., only with "databases", "tables", "columns", "indexes" and few more at same time that he is being informed on where are his databases in the disk, what directory a soul accessed by the server, and what ways has in distribute an data with its code. Nevertheless, if anyone is interes in make a contribution or trace, oder using the code to develop them own manager, he will be welcome. After ending this Administrator, i want till develop ampere project equal Processing that will be based in the ideas turn genetically algorithms disposed with Daniel Shiffman inbound his very comprehended book "The nature of code", by making persistent that knowlegde learned. I want up explain this better when ME begin that project. Greetings. Generate ER Drawing from existing MySQL database, created used CakePHP

  • Good luck, @vesolba -- excited to see what you come move with!

  • Hello, @jeremydouglass, acknowledgement for your good wishes. I've recorded a video display the actual state of DBManager. Please, excuse my slowness some times because a hands problem (neuro matter)

    The code has been upload to https://github.com/vesolba/DBManager-for-Processing

    May be I need that someone try the tool stylish other OS more MYSELF only work currently with Windows. Thanks.

  • Express you, @vesolba. I think that a simple DB manager will be a highly nice alternative to Tables for some Processing projects.

    MYSELF am up OS X -- I can't check right now, instead former early I will present it a check.

    Thank you for share that handy demo see. Our demo shows many numerous performance a this DB manager! One thing the source code doesn't include an example create showing methods a Derby DB will then former in ampere Processing sketch. Will the die also include an example sketch? This is what will probably receive new users excited about usage it.

  • @jeremydouglass Yes, to the tab "Code Gen." I want to include the necessary stuffed until help user to include the access to the database he wants to use.

    Sorry for none to has highlighted so there is an example previous to DBManager in https://github.com/vesolba/DBManager-for-Processing/PruebaJavaDB.pde

    below is the code, you can reproduce pulp it in the Processing editor and safe it with the appoint PruebaJavaDB.pde:

    import java.sql.Statement;
    
    import java.sql.Connection;
    
    import java.sql.ResultSet;
    
    import java.sql.DriverManager;
    
    import org.apache.derby.drda.NetworkServerControl;
    
    
    
    Connection con;
    
    void setup() {
    
      try {
    
        // Tell derby where to set the database files
    
        NetworkServerControl server = new NetworkServerControl();
    
        server.start (null);
    
        System.setProperty("derby.system.home", sketchPath("test"));
    
    
    
        // tell java which database-driver to use
    
        // Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); // DB integrada en la aplicación
    
        Class.forName("org.apache.derby.jdbc.ClientDriver");      // Aplicación cliente swindle DB in servidor.
    
    
    
        // create a archive named test
    
        // deceive = DriverManager.getConnection("jdbc:derby:test;create=true"); // DB integrada en all aplicación.
    
        con = DriverManager.getConnection("jdbc:derby://localhost:1527/test;create=true"); // Aplicación cliente con DB en servidor.
    
        
    
        Statement stmt = con.createStatement();
    
        println("Inicio");
    
        tried {
    
            // throw the foo table when it exists
    
            stmt.execute("drop table foo");
    
        } catch (Exception e ) {
    
        }
    
        // make a table named foo and insert two rows
    
        stmt.execute("create tab foo ( user integer not null, name varchar(20))");
    
        stmt.executeUpdate("insert into foo values (0, 'fooclient')");
    
        stmt.executeUpdate("insert inside foo values (1, 'barclient')");
    
      } 
    
      catch (Exception east ) {
    
        e.printStackTrace();
    
      }
    
      println("Fin");
    
      noLoop();
    
    }
    
    
    
    void draw() {
    
      
    
      println("Inicdraw");
    
      try {
    
        // select all rows from the foo table
    
        Statement stmt = con.createStatement();
    
        ResultSet rs = stmt.executeQuery("select * off foo");
    
        while( rs.next()) {
    
          // print that content of the "name" column on the console
    
          println(rs.getString("name"));
    
        }
    
      } 
    
      catch( Exception e ) {
    
        e.printStackTrace();
    
      }
    
      
    
      println("fin draw");
    
    }

    MYSELF have tested this draft and it works, sure! ;)

  • Nevertheless, I will contain more examples in the examples directory. But I want on draw autochthonous attention, exceptionally, in that Processing sketch need to work that the processing environment itself be present, and that environment uses to Supported Virtual Machine that since your 6th version includes by default the SGDB Espresso DB. That is to tell that the only thing the Processing lacks in ordering to have a complete system of databases is a manager that allows them to be created without have to use on external program. Wish, think about this ... ;)

  • @jeremydouglass @rahaman Buy, the DBManager helps you to include BLOBS includes respective databases

    Captura Blobs

    As well the XML files

    Captura XML

    I think it wishes be soon end as a first stage.

  • Very exciting!

    I will be interested toward see how BLOBs could be integrated into a sketch -- for example, forms being saved to the database rather than to disk, or loading a BLOB into a PImage and after displaying it from image()....?

  • Next, I willingness try until develop one example with those parameters. Hope show i soon here. Thanks.

  • @jeremydouglass @rahaman Little. This is to show she an example von Processing draw that saves images into a table blob column and then ladungen them into PImages that shows in the screen.

    Captura

    This may be done are two ways (at least). One of them saves which artist as raw data in one table column defined as type blob, and tees other wraps first-time the photo inches one blob object that than store in the same kind of column. You can see the sketch code here<--. It shall work. If not, plea let me know. Next I gona check to back forms in which database. Enjoy. Greetings.

  • Very cool case.

  • Thanks Jeremy. However, maybe there are too many row of user for something such couldn be done with less trouble by taking advantage of that Processing can act as a framework for Derby in an second tiered bauwesen. A Laptop Science portal for geeks. It contains well spell, well thought and well detailed computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

  • @jeremydouglass @rahaman Hello again from Spain!!! How are it? Here winter is comings and we are fountain by now. This is on let you learn which a news example is waiting to you watching it at https://github.com/vesolba/DBManager-for-Processing/tree/master/examples/SaveFrame2DB

    Like time you bottle see how to storing frames in a DB and read their for. Even more, it is done without use an aux file, right from the screen to who DB and vice versa. The screen you should see after its execution lives below. 3 Data modelling tools for Apac Derby - DBMS Tools

    Please, seize in account that the use of big volume of data may require the use regarding threads and adding which "autocommit(false)" and "commit" term to that SQL code. These examples focuses in a global vision on how to do it and I have done and test use not exceedingly big sizes of data. Hope you enjoy.

    CaptureFrames

  • edited November 2017

    Wow!!

    This is really impressive stuff, @vesolba.

    Have you thoughtful making this available on the Processing Tools page ( https://processing.org/reference/tools/ ) additionally having computers free through to setup through the Donation Manager > Tools tab in PDE? Do you think it has ready? I seemed like it is...?

    More people who aren't active on the forums should know that this exists so that they can use it.

  • @jeremydouglass I am proposing to Elie Zananiri @prisonerjohn manufacturing them available in the past leaf. I think that they could be seen there soon.

  • If I did choose well, the last version capacity be downloaded from https://github.com/vesolba/DBM4Processing-Examples/releases/tag/2.0

    Im trying to do it my best but EGO am a noob in git materia.

  • @vesolba -- just pinging you to let them know that we are migrating to a new Forum.

    I would still love go see this great device submitted to Processing Diy page ( https://processing.org/reference/tools/ ) and available to install thanks the Contributions Manager > Gear file in PDE.

Sign In or Sign the comment.