- User[] : id, username
- User
3 users User - id
- username
[{"currency": "USD", "high": null, "latest_trade": 1546938874, "weighted_price": null, "bid": 15092.400000000000, "volume": 0, "ask": 6414.270000000000, "low": null, "duration": 92701, "close": 4170.850000000000, "avg": null, "symbol": "localbtcUSD", "currency_volume": 0}, {"volume": 0, "latest_trade": 1548085170, "weighted_price": null, "bid": 3130.100000000000, "high": null, "currency": "EUR", "low": null, "ask": 3130.990000000000, "close": 3130.990000000000, "avg": null, "symbol": "zyadoEUR", "duration": 92522, "currency_volume": 0}, {"volume": 0, "latest_trade": 1373462347, "weighted_price": null, "bid": null, "high": null, "currency": "HKD", "low": null, "ask": null, "close": 572.000000000000, "avg": null, "symbol": "btchkexHKD", "duration": 92522, "currency_volume": 0}, {"volume": 0, "latest_trade": 1380074510, "weighted_price": null, "bid": null, "high": null, "currency": "USD", "low": null, "ask": null, "close": 125.000000000000, "avg": null, "symbol": "bitboxUSD", "duration": 92522, "currency_volume" |
title=Delicious Food&length=2091&format=mp4&code=ok1n24o1241023as,title=Addictive Songs&length=3333&format=mp3&code=asdjasfjafn123,title=Beautiful Locations&length=5555&format=flv&code=asfajfnajoun1234151dasn12,title=Shocking Sights&length=2341&format=mp4&code=admf123fnjiafd123,title=Relaxing Music&length=8888&format=wav&code=maf129asfod0135ew,title=Unbelievable Cultures&length=9999&format=mp4&code=asnfojdnf12396kjf |
test123 | |
test123 | |
test123 | |
test123 | |
test123 | |
test123 | |
test123 | |
test123 | |
test123 | |
test123 |
/* /index.html 200 |
INSERT INTO community VALUES ('Sports Hobbyist'),('Table Top Gaming'),('Cooks Delight') | |
INSERT INTO tag VALUES ('Allow Smoking'),('Allow Pets'),('Allow Cooking') | |
INSERT INTO properties_tags VALUES (1,1),(1,2),(2,1),(2,3),(1,3),(3,2),(2,4),(1,4) | |
INSERT INTO communities_users VALUES (1,1),(1,2),(2,1),(2,3),(1,3),(3,2) | |
INSERT INTO booking | |
VALUES | |
('2019/07/07','2019/07/07',2000, 'Nice place', 5,6,1), | |
('2019/07/07','2019/07/07',3000, 'Interesting', 5,1,1), | |
('2018/01/07','2018/02/07',4000, 'So So', 5,2,2), |
To elaborate on the context: Booking without signing up is a feature to reduce the barrier to entry for users to use the application. Depending on how stringent the business requirements are, your business may be more interested in getting customers first, hence not requiring users to sign up.
Later on though, users may want to be able to track previous bookings that they've made through their account. Hence, you need to be able to allow users to link their previous bookings to their account. This may be done as a separate function from the creation of users, but in the current scenario, we'll assume that the user wants to link the bookings on user creation.
The user would have received previous booking ids for their annonymous bookings, which they can attach to their sign up form. We would
### Updateing Item after Update SQL statement | |
``` | |
public void updateBooking(int id, Booking booking) { | |
String sql = "UPDATE booking SET totalPrice=? WHERE id = ?"; | |
int totalPrice = booking.getTotalPrice(); | |
this.jdbcTemplate.update(sql, totalPrice, id); | |
String selectCheckInDate = "SELECT checkInDate FROM booking WHERE id = ?"; | |
String checkInDate = this.jdbcTemplate.queryForObject(selectCheckInDate, new Object[] { id }, String.class); | |
String selectCheckOutDate = "SELECT checkOutDate FROM booking WHERE id = ?"; |
Kinds of item | |
- all items | |
- max quality is 50, other than legendary | |
1. Legendary | |
- before expiry -> doesn't change quality | |
- after expiry -> doesn't change quality | |
2 conjured | |
- before expiry -> quality decreases x2 |
votes
-------
23
JOIN
statement without hard-coding the id 524
explicitly, querying both the votes and congress_members table.