key « mysql « Java Database Q&A

1. Ensuring uniquness of a MySQL key

I have a MySQL DB where a key (a string) is read from a third pary source. However, these are not always guaranteed unique (they're movie titles). So I need to ...

2. Storage of private and public key in MySQL-DB

Probably somebody asked that already, but I couldn't find any usefull information and I've never done it before. So here is the problem. If I'll get a set of key pairs (DSA public ...

3. java: Statement.RETURN_GENERATED_KEYS Err:S1000 Exp: Before start of result set

I used to execute this query with no problems what so ever, but lately i've been having exceptions. (on a mysql server)

48442 [NioProcessor-1] ERROR c.x.xpofacebook.mysql.MysqlDb - SQLException: Before start of result ...

4. problem with foreign key in populating database

Deleting previous tuples from flights
 Error: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationExcepti
on: Duplicate entry 'AAH196' for key 'PRIMARY'
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Dupl
icate entry 'AAH196' for key 'PRIMARY'

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)


5. foreign key problem in jdbc

I have two functions:

public void Populate_flights()

public void Populate_reservations()
Flight and reservations are two tables.One of the entry i.e flight no. is in the reservation table. So it is a foreign key. Now, ...

6. Error with foreign key

I'm having problems with creating mySQL table within Java program. I constantly get Can't create table... errno: 150 Here is my code:

     String URL="jdbc:mysql://";

7. What is the application/utility of Foreign Key in MySQL?

Allow my to elaborate on the question with an example. I am writing from the perspective that (1) bytecodes should not be used to implement the logic already implemented (hopefully more efficiently) in the ...

8. JDBC: foreign key on PK created in same transaction

I have two tables in my MySQL database, which were created like this:

  id int auto_increment,
  name varchar(10),
  primary key(id)
) engine=innodb

9. SQLException - Generated keys not requested (MySQL)

I get this error when im making a new character to my game, in the CreateCharHandler it sends "saveToDb(false);" but when im ingame with another char i manually created i can ...

10. java MySQL batch stmt with Statement.RETURN_GENERATED_KEYS

I am trying to execute 2 sql statements in a batch. the first statement is an insert that uses a auto generated value for its ID. the second statement ...

11. Re: Foreign keys from MySQL database

I have encountered very strange issue with NetBeans 7.0. I am working now with mysql 5.0 and I am trying to generate entity classes for existing schema. However, there is an error. Whenever I create entity classes, there are foreign keys missing. If you check the connection with mysql (in Services) you can see that foreign keys are missing. If I ...

12. howto create foreign key in mySQL ?

13. foreign keys in mySql

Hi Guys, Im having trouble creating foreign keys in mysql. It wont let me add a foreign key from a serive table, or county table. Im trying to add one field from each,service_name and county_name respectively to a table called countyservices. But it keeps on throwing back errors to me saying that i cant do it. Any advice? [ April 26, ...

14. diffrences between KEY, Index in mysql and postgres

Hi Im not getting what is diffrence between KEY and INDEX in Mysql is there any difference between them ? What is thier correspends in PostgreSQL I mean if i want to port a db from Mysql to postgreSQL then what is replacer of INDEX and KEY Thank you. [ May 19, 2005: Message edited by: Bear Bibeault ]