I'm working on a to-do list app in Java as a learning exercise in databases. I'd like to write the app agnostic to a theoretical user's setup and not assume they have anything like MySQL installed. How can a Java application create and manage a local database, in this case to hold things like tasks, deadlines, etc? Is something like SQLite the only way to go for local?
29633
I intend to develop a small (Java) application for managing my finances. I believe I need to use an embedded database, but I have no experience regarding this issue. I tried to look at , but I can't decide which one would be more suitable for me. , ,  and  seem to be good candidates, but I still don't see how they compare to each other. I appreciate your help comparing them and helping me decide which one to use.  I intend to use Hibernate for my application (unless you would recommend using DBMS-provided API), but I also want to have the ability to edit the database easily using a SQL browsing tool (modifying schema and changing data).  Thank you.
64308
I am looking for a free tool to load Excel data sheet into an Oracle database. I tried the Oracle SQL developer, but it keeps throwing a NullPointerException. Any ideas?
60834
I use  for backuping up  my projects. but my Database's are not included. I'd like to backup all database's scheduling by day or hours.  Is there any tool to backup MySQL automatically?
15128
I'm currently developing an application using a MySQL database.  The database-structure is still in flux and changes while development progresses (I change my local copy, leaving the one on the test-server alone).  Is there a way to compare the two instances of the database to see if there were any changes?  While currently simply discarding the previous test server database is fine, as testing starts entering test data it could get a bit tricky. The same though more so will happen again later in production...  Is there an easy way to incrementally make changes to the production database, preferably by automatically creating a script to modify it?     Tools mentioned in the answers:    (Commercial)     (Commercial)   (Commercial)
7441
Was there any reason why the designers of Java felt that local variables should not be given a default value? Seriously, if instance variables can be given a default value, then why can't we do the same for local variables?  And it also leads to problems as explained in :     Well this rule is most frustrating when trying to close a resource in a finally block. If I instantiate the resource inside a try, but try to close it within the finally, I get this error. If I move the instantiation outside the try, I get another error stating that a it must be within a try.      Very frustrating.
29248
Background  I would like to provide the subset of my database required to reproduce a select query. My goal is to make my computational workflow reproducible (as in ).  Question  Is there a way that I can incorporate this select statement into a script that dumps the queried data into a new database, such that the database could be installed on a new mysql server, and the statement would work with the new database. The new database should not contain records in addition to those that have been used in the query.  Update: For clarification, I am not interested in a csv dump of query results. What I need to be able to do is to dump the database subset so that it can be installed on another machine, and then the query itself can be reproducible (and modifiable with respect to the same dataset).   Example  For example, my analysis might query a subset of data that requires records from multiple (in this example 3) tables:  select table1.id, table1.level, table2.name, table2.level         from table1 join table2 on table1.id = table2.table1_id         join table3 on table3.id = table2.table3_id        where table3.name in ('fee', 'fi', 'fo', 'fum');
49810
I'm using SQL Server Management Studio 2016. When I try to create a local database by right clicking on Databases and selecting "New Database" I get the following error:    I've tried restarting SSMS and the machine.  I can create the database through SQL, however I get the same error when trying to launch any GUI dialogs for the database. So creating it thru SQL doesn't work around my issue as I need to configure it also (and I don't want to write scripts for everything).
110579
I've been working with databases for the last few years and I'd like to think that I've gotten fairly competent with using them. However I was reading recently about Joel's  and I realised that even though I can write a query to get pretty much anything I want out of a database, I have no idea how the database actually interprets the query. Does anyone know of any good articles or books that explain how databases work internally?  Some specific things I'm interested in are:   What does a database actually do to find out what matches a select statement? How does a database interpret a join differently to a query with several "where key1 = key2" statements? How does the database store all its memory? How are indexes stored?
84178
When I setup my database I create a sql user that my application runs as.  The sql user gets read only access to all the databases on the server. The problem is the user won’t have read only access to any new created databases in the future. There is another app that creates these new databases for users and I don’t have a way to add my user script into the templates database created.  Is there a way to automatically update the sql user for read only for the future ones?  SQL server 2014.
121226
HashTables/HashMaps are one of the most (if not the most) useful of data-structures in existence.  As such, one of the first things I investigated when starting to learn programming in Cocoa was how to create, populate, and read data from a hashtable.  To my surprise: all the documentation I've been reading on Cocoa/Objective-C programming doesn't seem to explain this much at all.  As a Java developer that uses "java.util" as if it were a bodily function: I am utterly baffled by this.  So, if someone could provide me with a primer for creating, populating, and reading the contents of a hashtable: I would greatly appreciate it.
65043
Apparently, I can connect to MySQL (at least from my localhost) without having to provide any username or password. I can even put anything as username, as long as the password is empty. I have access to the information_schema and test databases. I can create tables. If I run SELECT USER() it returns the proper value randomstring@localhost, where the random string is whatever I used for username when I connected.  The mysql.user table contains root@localhost, root@127.0.0.1, @localhost and pma@localhost. I manually set encrypted passwords to all the records (UPDATE user SET password=...) and only root has any privileges, the other two records have "N" for all privileges. That record with the empty username looks suspicious, but I don't think it has anything to do with this and I think it was there from the beginning.  To make matters worse, if I add a user with a password, I can only connect using empty string as password (just like if I put anything as username). If I try to connect using the username I created and password I supplied when creating it (CREATE USER .. IDENTIFIED BY ..) it doesn't work.  Does anyone know what is wrong and how I can fix this?  Note: I am using MySQL 5.5.16 for Windows, provided by the XAMPP package.
65707
I'm constantly hearing about person y had performance issue x which they solved through caching. Or, how doing x,y,z in your programs code can hurt your caching ability. Even in one of the latest podcasts, Jeff Atwood talks about how they cache certain values for speedy retrieval. There seems to be some ambiguity in the terms &quot;cache&quot; and &quot;caching&quot; and it has led me to be confused about it's meaning in different cases.  Whether you are referring to application or database caching, cpu, etc and what that means. What is caching and what are the different types?  From context I can get a sense of it, to store an oft retrieved value into main memory and have quicklook up access to it.  However, what is it really? This word seems to be used in a lot of different contexts with slightly different meaning (cpu, database, application, etc) and I'm really looking to clear it up.  Is there a distinction between how caching works in your applications vs your database caching?  When someone says that they found a piece of code that would hurt caching and after they fixed it, it improved the speed of their app, what are they talking about? Is the program's caching something that is done automatically?  How do you allow values to be cached in your programs?  I've often read users on this site say that they cached a value in their application, I sit here and wonder what they mean. Also, what does it really mean when someone talks about database caching?  Is this simply a feature they turn on in their database?  Do you have to explicitly cache values or does the database  pick which ones to cache for you?  How do I begin caching items myself to improve performance?  Can you give me some examples of how I can begin caching values in my applications?  Or again, is this something that is already done, under the hood and I simply have to write my code in a particular way to allow &quot;caching&quot;? What about database caching, how do I begin that?  I've heard about things like memcache.  Is this type of utility required to cache in databases?  I'm looking to get a good distinction between caching in applications vs databases, how they are used and how it is implemented in both cases.
55087
i am building a app which takes input from user and then search to a remote database(MySql).And then display the retrieved data on VisualForce page.One important note that my app will be distributable.  here is my controller class  public with sharing class Search  {    public String strTag {get;set;}   public String strlocation {get;set;}    public PageReference find() {              return null;   } }   Thanks in advance.  Updated  public with sharing class Search  {   public String strTag {get;set;} public String strlocation {get;set;}   public PageReference find() {             HttpRequest req = new HttpRequest();   HttpResponse res = new HttpResponse();   Http http = new Http();    req.setEndpoint('https://localhost/salesforce/');   req.setMethod('POST');     req.setCompressed(false);   req.setBody('key1=value1&amp;key2=value2');   req.setHeader('Content-Type', 'application/x-www-form-urlencoded');      try {     res = http.send(req);   } catch(System.CalloutException e) {     system.debug('Callout error: '+ e);   }   system.debug(res.getBody());      return null;  } }   I am getting below error now      error message System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = localhost/salesforce
19696
I want to copy a live production database into my local development database.  Is there a way to do this without locking the production database?  I'm currently using:  mysqldump -u root --password=xxx -h xxx my_db1 | mysql -u root --password=xxx -h localhost my_db1   But it's locking each table as it runs.
81313
I'm starting a new application and looking at using an ORM -- in particular, SQLAlchemy.  Say I've got a column 'foo' in my database and I want to increment it.  In straight sqlite, this is easy:  db = sqlite3.connect('mydata.sqlitedb') cur = db.cursor() cur.execute('update table stuff set foo = foo + 1')   I figured out the SQLAlchemy SQL-builder equivalent:  engine = sqlalchemy.create_engine('sqlite:///mydata.sqlitedb') md = sqlalchemy.MetaData(engine) table = sqlalchemy.Table('stuff', md, autoload=True) upd = table.update(values={table.c.foo:table.c.foo+1}) engine.execute(upd)   This is slightly slower, but there's not much in it.  Here's my best guess for a SQLAlchemy ORM approach:  # snip definition of Stuff class made using declarative_base # snip creation of session object for c in session.query(Stuff):     c.foo = c.foo + 1 session.flush() session.commit()   This does the right thing, but it takes just under fifty times as long as the other two approaches.  I presume that's because it has to bring all the data into memory before it can work with it.  Is there any way to generate the efficient SQL using SQLAlchemy's ORM?  Or using any other python ORM?  Or should I just go back to writing the SQL by hand?
33150
I have a unique (well, I think it is unique) situation where databases (yes, entire databases) can be created more or less dynamically.  Ignoring the obvious issue with that, I need to be able to allow an AD account to read any of the data in any of the databases.  Acknowledging the security issue surrounding all of this, is there a way to grant this just once at the server level, rather than having to grant constantly when a new database pops up?  I would prefer to just keep it at a datareader level.  Specifically:  1. databases are created dynamically without advance knowledge of the DBA 2. Reporting jobs iterate through these databases and fail if they encounter a new one.  I am using SQL Server 2008R2 and SQL Server 2014.
45337
I'm making a Java application with an application-logic-thread and a database-access-thread. Both of them persist for the entire lifetime of the application and both need to be running at the same time (one talks to the server, one talks to the user; when the app is fully started, I need both of them to work).  However, on startup, I need to make sure that initially the app thread waits until the db thread is ready (currently determined by polling a custom method dbthread.isReady()). I wouldn't mind if app thread blocks until the db thread was ready.  Thread.join() doesn't look like a solution - the db thread only exits at app shutdown.  while (!dbthread.isReady()) {} kind of works, but the empty loop consumes a lot of processor cycles.  Any other ideas? Thanks.