Week 4 — Java Collections, JDBC, MongoDB, NoSQL & AWS

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/48

encourage image

There's no tags or description

Looks like no tags are added yet.

49 Terms

1
New cards
[Collections] What is the Java Collections Framework?
Interfaces and classes for storing and manipulating groups of objects, including List, Set, Queue and Map.
2
New cards
[Collections] What is the difference between List and Set?
List preserves element positions and allows duplicates; Set enforces uniqueness.
3
New cards
[Collections] What is ArrayList versus LinkedList?
ArrayList uses a resizable array with fast indexed access; LinkedList uses nodes and has slower indexed traversal.
4
New cards
[Collections] What is HashMap versus Hashtable?
HashMap is generally unsynchronized and permits one null key; Hashtable is legacy synchronized and rejects null keys and values.
5
New cards
[Collections] What is HashSet?
A Set implementation backed by hashing that offers expected constant-time add and contains operations.
6
New cards
[Collections] What is the difference between array and ArrayList?
Arrays have fixed length accessed by length; ArrayLists resize dynamically and use size().
7
New cards
[Collections] How do you remove duplicates while preserving insertion order?
Construct a LinkedHashSet from the collection, then convert it back to a List if needed.
8
New cards
[Database Theory] What is a primary key?
A column or set of columns uniquely identifying each row and disallowing null key values.
9
New cards
[Database Theory] What is a foreign key?
A column or columns referencing a candidate key in another or the same table to enforce referential integrity.
10
New cards
[Database Theory] What is database normalization?
Structuring relations to reduce redundancy and update anomalies.
11
New cards
[Database Theory] What are 1NF, 2NF and 3NF?
1NF requires atomic column values; 2NF removes partial dependency on composite keys; 3NF removes transitive dependencies of non-key attributes.
12
New cards
[Database Theory] What is an index?
A data structure accelerating lookups and sorts at the cost of storage and write maintenance.
13
New cards
[Database Theory] What is an ER diagram?
A conceptual diagram of entities, attributes and relationships in a data model.
14
New cards
[JDBC] What is JDBC?
Java Database Connectivity is a standard API for connecting to relational databases and executing SQL.
15
New cards
[JDBC] What is a PreparedStatement?
A precompiled parameterized SQL statement that helps prevent SQL injection and supports parameter binding.
16
New cards
[JDBC] What is ResultSet?
An object representing rows returned by a JDBC query.
17
New cards
[JDBC] What is a connection pool?
A reusable collection of database connections that avoids opening a new connection for each request.
18
New cards
[JDBC] What is the difference between executeQuery and executeUpdate?
executeQuery returns a ResultSet for queries; executeUpdate returns an update count for DML or certain DDL.
19
New cards
[JDBC] How do you manage JDBC resources?
Use try-with-resources to close connections, statements and result sets reliably.
20
New cards
[NoSQL Introduction] What is NoSQL?
A broad category of non-relational data models, including document, key-value, column-family and graph databases.
21
New cards
[NoSQL Introduction] When choose NoSQL over relational SQL?
When flexible schemas, specialized access patterns or horizontal scaling fit requirements better than relational joins and constraints.
22
New cards
[NoSQL Introduction] What is a document database?
A database storing structured documents, commonly JSON-like objects, with nested fields.
23
New cards
[NoSQL Introduction] What is horizontal scaling?
Increasing capacity by adding machines rather than only increasing resources on one machine.
24
New cards
[NoSQL Introduction] What is eventual consistency?
Replicas may temporarily disagree after writes but converge under normal operation.
25
New cards
[MongoDB Concepts] What is MongoDB?
A document-oriented database storing BSON documents in collections.
26
New cards
[MongoDB Concepts] What is the difference between a collection and a document?
A collection groups documents; a document is a structured record of fields and values.
27
New cards
[MongoDB Concepts] What is BSON?
A binary representation of JSON-like documents supporting additional data types.
28
New cards
[MongoDB Concepts] What is the _id field?
A unique identifier for each MongoDB document, often generated as an ObjectId.
29
New cards
[MongoDB Concepts] What is an aggregation pipeline?
A sequence of stages that filters, groups, transforms and summarizes documents.
30
New cards
[MongoDB Concepts] What is a MongoDB index?
A data structure that speeds matching and sorting but adds storage and write overhead.
31
New cards
[MongoDB Shell] How do you insert a MongoDB document?
Use db.collection.insertOne({name: "Ana"}) or insertMany for multiple documents.
32
New cards
[MongoDB Shell] How do you find documents in MongoDB?
Use db.collection.find({field: value}) with optional projection and sort.
33
New cards
[MongoDB Shell] How do you update one document?
Use db.collection.updateOne(filter, {$set: {field: value}}).
34
New cards
[MongoDB Shell] How do you delete one document?
Use db.collection.deleteOne(filter).
35
New cards
[MongoDB Shell] How do you count matching documents?
Use db.collection.countDocuments(filter).
36
New cards
[MongoDB Shell] How do you create an index?
Use db.collection.createIndex({field: 1}) for an ascending index.
37
New cards
[Java Reflection] What is Java reflection?
A runtime API for inspecting classes, methods, fields and annotations, and optionally invoking or modifying them.
38
New cards
[Java Reflection] How do you get a Class object?
Use Object.getClass(), Type.class or Class.forName with a fully qualified class name.
39
New cards
[Java Reflection] Why do frameworks use reflection?
To discover annotated components, inspect metadata and instantiate or invoke types dynamically.
40
New cards
[Java Reflection] What are reflection drawbacks?
It can weaken encapsulation, add overhead and shift errors from compile time to runtime.
41
New cards
[Java Time] What is java.time?
Java's modern date-time API for immutable date, time, duration and time-zone types.
42
New cards
[Java Time] What is LocalDate versus LocalDateTime?
LocalDate stores a calendar date; LocalDateTime stores a date and time without time-zone information.
43
New cards
[Java Time] What is Instant?
A point on the UTC timeline useful for timestamps.
44
New cards
[Java Time] What is ZonedDateTime?
A date-time associated with a time-zone region and its rules.
45
New cards
[Java Time] Why prefer java.time over Date and Calendar?
It has clearer immutable types and more predictable time-zone handling.
46
New cards
[AWS Introduction (Week 4)] What is cloud computing?
On-demand access to computing resources with elastic capacity and usage-based billing.
47
New cards
[AWS Introduction (Week 4)] What is IaaS versus PaaS versus SaaS?
IaaS provides infrastructure, PaaS provides managed application platforms, and SaaS delivers complete software.
48
New cards
[AWS Introduction (Week 4)] What is the difference between scaling up and scaling out?
Scaling up adds resources to one machine; scaling out adds more machines.
49
New cards
[AWS Introduction (Week 4)] What is an AWS Region versus Availability Zone?
A Region is a geographic area; an AZ is an isolated infrastructure location within that Region.