Networks, Databases & Security
⏱ ~3-min readAceMark GuideWhat this topic is really about
Symmetric encryption requires secure key distribution between parties.. Symmetric encryption uses one shared secret key, so both parties must securely exchange that key beforehand, which is hard over an insecure channel; asymmetric encryption avoids this with a freely shareable public key.
The WHERE clause in an SQL query primarily performs the relational operation of selection.. The WHERE clause filters rows based on a condition, which is the relational algebra operation of selection that chooses tuples meeting a predicate.
See the mechanism
Selection is the process of choosing tuples that meet a predicate, which is exactly what the WHERE clause does. A diagram for this topic isn't available yet — the worked example below walks the same reasoning step by step.
An exam-style question, fully explained
An SQL query is written as: SELECT name FROM Students WHERE grade > 80. Which relational operation does the WHERE clause primarily perform?
- Identify what the question tests: An SQL query is written as: SELECT name FROM Students WHERE grade > 80..
- The WHERE clause filters rows based on a condition, which is the relational algebra operation of selection that chooses tuples meeting a predicate.
- Projection is tempting and is performed by the SELECT name part, which chooses columns rather than filtering rows.
- Why it matters: Selection is the process of choosing tuples that meet a predicate, which is exactly what the WHERE clause does. It filters rows based on a condition, narrowing down the results to only those that match the specified criteria.
Traps the examiner sets
- Be careful not to confuse selection with projection, which involves choosing columns rather than filtering rows.
- Many people confuse the roles of TCP and IP, incorrectly attributing IP's routing function to TCP or assuming TCP is responsible for domain name resolution or encryption, which are handled by other protocols like DNS and HTTPS respectively.
- Some might confuse this with performance issues, but symmetric encryption is generally faster than asymmetric encryption.
- Routing packets between networks is wrong because that is the job of IP at the internet layer, not TCP.
- The claim that symmetric encryption is too slow is wrong because it is generally faster than asymmetric encryption.
Test your recall
Answer each from memory — you'll see instantly whether you're right and why.
Run a focused 10-question mini-mock on Networks, Databases & Security and see it stick.
Practice more of this topic →