###Including Relational algebra, SQL and Xquery
The code in this repository are my solutions for CSC343 labs at the University of Toronto. Please do not use it for your own course work, thank you.
Feel Free to email me for any mistakes in the repo or if you have any questions about SQL programming. Send me a mail
- Relational algebra
- SQL - (postgresql)
- Xquery
- JDBC - (Using Parameters for Protection)
String queryString = " Select name From (people NATURAL JOIN roles) p1 Where exists(Select *From (people NATURAL JOIN roles) p2 Where p1.name != ? and p2.name = ? and p2.movie_id = p1.movie_id) order by name;"; PreparedStatement ps = connection.prepareStatement(queryString); ps.setString(1, person); ps.setString(2, person); rs = ps.executeQuery(); while (rs.next()) { String name = rs.getString("name"); stars.add(name); }return stars;