Avatar of Absente
Absente
 asked on

Java Database

Hi. I am planing to write a book library system.
I need a database. I am not use database with java so far today.
Which database is best stable with java ?
what is your opinion which database  ?
database could bee free

than any documment with using databbase with java ?
Java

Avatar of undefined
Last Comment
Mick Barry

8/22/2022 - Mon
Mick Barry

java comes with Derby included in the jdk
http://developers.sun.com/javadb/
which database is best really depends on your application and needs
ASKER CERTIFIED SOLUTION
mrcoffee365

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Absente

ASKER
is there any database like Ms access. I want to this. database could be user computer and.
for example i can edit Ms acees database. I am looking your link. its so complex. I want to this. there is an software. i can creaate column or rows. then. i insert someting database with java.
Mick Barry

you can use access (and most db's) with java, you just need the appropriate driver
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Mick Barry

Absente

ASKER
acan you suggesst any database like ms access. I wana edit database(adding roww, deleting row) with an editor like ms acess
Absente

ASKER
my problem is how to create database on my computer.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Mick Barry

typically you would use sql to create your database
if you're not comfortable with that then you can use Access. Not a great database choice though.
Absente

ASKER
Can I create sql databse with netbeans and can i creta table with netbeans
Mick Barry

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Absente

ASKER
Icreta a dersy database with netbeans.

I wana creta table. but tehere is too many options.  APP, SYS, SYSCAT, SYSFUN, NULLID......

hoe can I creta table. In your tourtianl. I cant fount this ? Whic can I select to creta table ?
I mean. I can cretate table withh APP what this the difeerence with sys ?
Mick Barry

Its explained under "Create a Table"

"Now that we have a database, let us create a simple 2-column table "TABLE 1". Press "Ctrl + 5" to bring up the "Services" side-bar."
Absente

ASKER
I upload photo. there is a lot of sellection.
aasdasd.PNG
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Mick Barry

thats system stuff, you don't need to worry about that.
Absente

ASKER
where I can creta table ?

in APP , in SYS ? which was ? what is the difference ?
Mick Barry

in App>Tables
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Absente

ASKER
ok I create Table in APP.

but I try to connect DB I have an eror Message.

does nort contain tables.

in picture you can see
Ekran-Al-nt-s-.PNG
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Absente

ASKER
I get error insertimg data.


[TopLink Info]: 2010.02.22 04:17:33.981--ServerSession(29384701)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
[TopLink Info]: 2010.02.22 04:17:34.356--ServerSession(29384701)--file:/C:/Users/Yasin/Documents/NetBeansProjects/DesktopApplication4/src/-yasindbPU login successful
Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.InvocationTargetException
        at org.jdesktop.application.ApplicationAction.actionFailed(ApplicationAction.java:859)
        at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:665)
        at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
        at java.awt.Component.processMouseEvent(Component.java:6263)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
        at java.awt.Component.processEvent(Component.java:6028)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4630)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
        at java.awt.Container.dispatchEventImpl(Container.java:2085)
        at java.awt.Window.dispatchEventImpl(Window.java:2475)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:662)
        ... 27 more
Caused by: javax.persistence.EntityExistsException:
Exception Description: Cannot persist detached object [desktopapplication4.Usertable[iid=1]].
Class> desktopapplication4.Usertable Primary Key> [1]
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:208)
        at desktopapplication4.DesktopApplication4View.newRecord(DesktopApplication4View.java:133)
        ... 32 more
Caused by: Exception [TOPLINK-7231] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: Cannot persist detached object [desktopapplication4.Usertable[iid=1]].
Class> desktopapplication4.Usertable Primary Key> [1]
        at oracle.toplink.essentials.exceptions.ValidationException.cannotPersistExistingObject(ValidationException.java:2171)
        at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:3251)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:339)
        at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3220)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:205)
        ... 33 more
javax.persistence.RollbackException: Transaction rolled back because transaction was set to RollbackOnly.
        at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:110)
        at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:60)
        at desktopapplication4.DesktopApplication4View$SaveTask.doInBackground(DesktopApplication4View.java:166)
        at desktopapplication4.DesktopApplication4View$SaveTask.doInBackground(DesktopApplication4View.java:160)
        at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)


what is the problem ?
CEHJ

You need to add tables to the db. What is your structure?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Absente

ASKER
I create Table. I upload Screen shots
Ekran-Al-nt-s-1.PNG
Ekran-Al-nt-s-3.PNG
Absente

ASKER
I  think problem ID
Outo increment at
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Absente

ASKER
How can I solve tihs ?
I have work this sample database aplication in netbeans.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.