Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8143885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:13:50+00:00 2026-06-06T13:13:50+00:00

I want to work with a file-based database using apache derby. I was wondering

  • 0

I want to work with a file-based database using apache derby.
I was wondering if anyone can carify how to connect & create this database using netbeans as an IDE.
I passed through derby manuals trying to figure this one out, but all i got was “Embedded Derby JDBC Database Connection”, which i was told is not a file-based approach, and either way, the connection didn’t seem to work.
any help would be much appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:13:51+00:00Added an answer on June 6, 2026 at 1:13 pm

    When you download NetBeans 7.1.2, the “All” package you get the glassfish app server with it. After installing w/ glassfish, in the IDE you should be able to select the Services tab > Expand Databases and you should see Java DB. R. Click on Java DB and select Start Server. Then R. Click again and select Create Database. Enter the db name, user and a password. BTW i normally use APP for both the user and password because this way it also becomes the default schema and I don’t have to go changing around anything for production environment.

    Now in the Java DB group you should see the new database you created. R. Click on that and select connect. You should see a connection item appear under the Databases group. Expand this item and you should see the APP schema in bold indicating it is the default schema. Expand that and R. Click on the Tables select Create Table and you’ll get a ui that helps you populate a table. Repeat until all your tables are created. Other ways to create tables using the ide is right click on the Tables and select Execute Command where you can run DDL to define the tables schema. This is the way i do db creation, by saving my script as an .sql file so i can delete the db and rerun it again as needed.

    Here is an example of the my dbinit.sql script i use to create my tables in derby.

    create table usertable (
        username varchar(128) NOT NULL CONSTRAINT USER_PK PRIMARY KEY ,
        password varchar(128) NOT NULL,
        email varchar(128) NOT NULL,
        firstname varchar(128) NOT NULL,
        lastname varchar(128) NOT NULL
    );
    
    create table grouptable(
        username varchar(128) NOT NULL,
        groupid  varchar(128) NOT NULL,
        CONSTRAINT GROUP_PK PRIMARY KEY(username, groupid),
        CONSTRAINT USER_FK FOREIGN KEY(username) REFERENCES usertable(username)
            ON DELETE CASCADE ON UPDATE RESTRICT
    );
    
    insert into usertable(username,password,firstname,lastname) 
        values ('admin', '21232f297a57a5a743894a0e4a801fc3','','');
    insert into grouptable(username,groupid) values ('admin', 'USER');
    insert into grouptable(username,groupid) values ('admin', 'ADMIN');
    

    You can easily delete the database you’ve created by right clicking on the database, R. click on the database you wish to remove and select delete. and reuse your script to regenerate it.

    enter image description here

    Hope this helps! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to work on the Rijndael algorithm using C#. Can anybody help me
We've got a file-based program we want to convert to use a document database,
I have following problem. I want to create a file system based session storage
Trying to create a PDF file based on an XML and a file using
I interested to work with data types and file formats. For example I want
I want to truncate some text (loaded from a database or text file), but
I want to create a live, checkers-like app, which will work like this: There
I have a camel route file which I want to populate/configure based on certain
Some background information: We have an ancient web-based document database system where I work,
I am trying to seed some data using custom database initializers, but can't get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.