[Solved] CSE344-Homework 5 Database Application and Transaction Management
5.0
1 customer review
Digital download
Digital download
$25.00
Message us on WhatsApp for payment or download support.
Open WhatsApp
| # Database connection settings # TODO: Enter the server URL.flightapp.server_url = SERVER_URL# TODO: Enter your database name.flightapp.database_name = DATABASE_NAME # TODO: Enter the admin username of your server. flightapp.username = USERNAME # TODO: Add your admin password.flightapp.password = PASSWORD |
| // Specify the hash parametersKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, HASH_STRENGTH,KEY_LENGTH); // Generate the hashSecretKeyFactory factory = null; byte[] hash = null; try {factory = SecretKeyFactory.getInstance(PBKDF2WithHmacSHA1); hash = factory.generateSecret(spec).getEncoded();} catch (NoSuchAlgorithmException | InvalidKeySpecException ex) {throw new IllegalStateException();} |
| // When you start the database up Connection conn = [] conn.setAutoCommit(true); // This is the default setting, actually conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);// In each operation that is to be a multi-statement SQL transaction: conn.setAutoCommit(false);// You MUST do this in order to tell JDBC that you are starting a// multi-statement transaction // execute updates and queries.conn.commit();// OR conn.rollback(); |
| [command 1 for user1][command 2 for user1] *[expected output line 1 for user1][expected output line 2 for user1] *[command 1 for user2][command 2 for user2] *[expected output line 1 for user2][expected output line 2 for user2] * |