Oracle interview questions & answers

20 real Oracle interview questions with full model answers — System design, Technical, Product & growth, Behavioral. Drawn from the same verified bank ChannelPulse drills from (469 Oracle questions in total).

BehavioralEasyOracleProduct Manager

1. Describe your experience in the energy sector.

Model answer

Situation — I’d answer with a specific project rather than describe the energy sector in general. For example: “At [company/team], I worked on [product or initiative] for [customer segment, such as utilities, energy retailers, or commercial customers]. The challenge was [specific market or operational problem], and it mattered because it affected [customer outcomes, cost, reliability, or revenue].” I’d briefly establish the scale—such as customers, sites, markets, or operational volume—without sharing confidential information.

Task — “I owned [your responsibility], with the goal of [measurable outcome]. The main tension was [for example, customer affordability versus reliability, speed versus regulatory assurance, or a long-term investment versus near-term operational needs].” I’d be precise about what I personally owned versus what the broader team delivered.

Action —

  • “I first mapped the users and stakeholders: [customers, operations, engineering, regulatory, or commercial teams]. I validated the problem using [interviews, usage data, field observations, or operational metrics] rather than assuming the initial request represented the root cause.”
  • “I translated the findings into a measurable goal: [baseline] to [target] by [timeframe], with guardrails for [safety, compliance, reliability, or customer impact].”
  • “I worked across [functions] to evaluate options. I chose [approach] over [alternative] because [user value, feasibility, risk, or economics], and made the trade-off explicit to stakeholders.”
  • “I sequenced delivery around [pilot, region, customer cohort, or operational constraint]. When [specific obstacle] emerged, I [action you took] and kept decision-makers aligned through [cadence or evidence].”
  • “I measured the result through [leading and lagging indicators] and used [feedback or data] to decide what to change next.”

Result — “The work moved [primary metric] from [baseline] to [outcome], while [guardrail or secondary metric] stayed [result]. It also enabled [organizational or customer impact]. I learned [specific lesson about energy customers, operations, regulation, or cross-functional execution], which changed how I approach [relevant future decision].”

If I had no direct energy-sector experience, I’d say so plainly and connect a relevant example from an adjacent regulated or infrastructure-heavy domain—then explain how I’d learn the sector’s customer, operational, and regulatory context.

BehavioralEasyOracleGroup Product Manager

2. What products are you currently managing?

Model answer

Situation

I currently lead a portfolio of [number] products at [company], serving [primary customer segments] across [markets or regions]. The portfolio includes [Product A], which addresses [customer need], and [Product B], which supports [related need]. Together, they reach approximately [number] customers and contribute [revenue, adoption, or strategic outcome].

Task

My responsibility is to set direction across the portfolio—not just optimize individual roadmaps—while balancing customer value, business goals, and shared engineering capacity. The main tension is [specific trade-off, such as investing in growth versus improving reliability or consolidating overlapping products].

Action

  • I set a shared portfolio strategy around [customer outcome], then gave each product a clear role: [Product A] focuses on [role], while [Product B] focuses on [role].
  • I established a small set of comparable measures: [North Star metric], supported by [activation or retention metric], [business metric], and guardrails for [quality, reliability, or customer harm].
  • I reviewed customer research and product performance together. For example, when [specific signal] showed that [customer segment] was struggling with [problem], I chose to [investment or deprioritization] rather than simply add another feature.
  • I aligned engineering, design, data, sales, and support leaders on priorities, dependencies, and decision rights. When teams competed for [scarce resource], I made the trade-off explicit using expected customer impact, strategic fit, and delivery risk.
  • I kept the portfolio adaptable through [monthly or quarterly] reviews, with clear thresholds for scaling, revising, or stopping bets.

Result

That approach led to [quantified result], including [customer or business outcome] and [portfolio-level improvement, such as faster delivery or fewer duplicated efforts]. It also gave teams a clearer connection between their roadmaps and the overall strategy. I learned that strong portfolio leadership means being specific about what each product is for—and what we will not invest in.

What interviewers listen for

  • Your actual products, users, scope, and level of ownership.
  • Portfolio-wide strategy, measurable outcomes, and explicit trade-offs.
  • How you influence teams and make investment decisions.
BehavioralEasyOracle

3. Tell me about a time when you had to quickly learn a new technology or tool to complete a project.

Model answer

Situation

In my previous role as a software developer at a mid-sized tech company, we were tasked with developing a new feature for our flagship product that required the use of a technology I was unfamiliar with: Kubernetes. The project had a tight deadline because the feature was critical for an upcoming product launch, and I was responsible for implementing the deployment strategy using Kubernetes. This was crucial as it would ensure our application could scale effectively under the anticipated load.

Task

My specific goal was to quickly learn Kubernetes well enough to design and implement a robust deployment strategy. The key constraint was the limited time available to both learn the technology and apply it effectively, as the launch date was fixed and non-negotiable.

Action

  • I began by identifying the core concepts of Kubernetes that were most relevant to our project, such as container orchestration, scaling, and load balancing.
  • To accelerate my learning, I enrolled in an intensive online course that covered Kubernetes fundamentals and best practices. I dedicated evenings and weekends to complete this course promptly.
  • Simultaneously, I set up a local Kubernetes environment to experiment with different configurations and deployment strategies, which helped solidify my understanding through hands-on practice.
  • I also reached out to a colleague who had prior experience with Kubernetes to discuss potential pitfalls and gather insights on best practices. This collaboration was invaluable in avoiding common mistakes.
  • Once I felt confident in my understanding, I developed a deployment plan and conducted a series of tests to ensure it met our performance and reliability requirements. I iterated on the configuration based on test results to optimize performance.

Result

As a result of my focused learning and collaboration, we successfully implemented the Kubernetes deployment strategy on time for the product launch. The application scaled seamlessly during the launch, handling the increased user load without any downtime. This experience reinforced the importance of proactive learning and leveraging team expertise. I learned that with the right approach and resources, it's possible to quickly adapt to new technologies and deliver impactful results.

BehavioralMediumOracleEngineering Manager

4. If you were asked to require your team to work onsite, how would you convince them?

Model answer

Situation

I would first understand why onsite work is being proposed and whether it is a firm business requirement or an initial preference. In a previous team context, a shift in working arrangements could affect engineers with different commutes, caregiving responsibilities, accessibility needs, and established ways of collaborating. Treating it as a persuasion problem before understanding those impacts would risk damaging trust.

Task

If the requirement were genuinely mine to implement, I would explain the business need honestly, listen to concerns, and find the least disruptive way to achieve the intended outcome. I would not promise flexibility I could not deliver or imply that disagreement reflects poor commitment.

Action

  • I’d clarify the objective with leadership: what specific problem should onsite work solve—faster cross-functional decisions, access to equipment, onboarding, or something else? I’d ask what evidence supports the proposed schedule and what constraints are non-negotiable.
  • I’d speak with the team before announcing a plan. I’d invite individual input as well as a group discussion, since people may not want to share personal circumstances publicly. I’d listen for practical barriers and distinguish them from assumptions about productivity.
  • I’d explain the rationale and boundaries plainly, including what is required, when it takes effect, and what flexibility remains. If the policy were still being decided, I’d bring the team’s evidence and concerns back to decision-makers rather than presenting it as settled.
  • Where there was room, I’d propose a pilot tied to the actual goal—for example, shared onsite days for design reviews and pairing, with focused work remaining flexible. I’d agree on a review date and measures such as decision cycle time, delivery predictability, onboarding feedback, and team sentiment.
  • I’d make accommodations through the appropriate process and ensure that onsite time is useful: schedule collaborative work intentionally, avoid unnecessary meetings, and make remote participation equitable for colleagues who cannot attend.

Result

I’d judge success by whether the business goal improved without avoidable loss of trust, retention, or effectiveness. If the policy were mandatory and inflexible, I would communicate that clearly and support people through the transition; I would not manufacture a false choice. My experience is that people are more willing to engage with a difficult change when the rationale is credible, their concerns influence implementation, and leaders follow through on commitments.

CodingEasyOracleSoftware Engineer

5. Palindrome Linked List (LeetCode)

Model answer

The task

Determine whether a singly linked list reads the same from front to back and back to front. Return a boolean without relying on access to nodes by index.

Key idea

Find the midpoint with slow and fast pointers, then reverse the second half. Compare the two halves node by node; reverse the second half again afterward to restore the original list.

Approach

  1. Advance slow by one node and fast by two until fast reaches the end.
  2. For an odd-length list, move the start of the second half past the middle node.
  3. Reverse the second half in place.
  4. Compare corresponding values from the head and reversed second half.
  5. Restore the second half before returning the result.
class Solution:
    def isPalindrome(self, head):
        def reverse(node):
            previous = None
            while node:
                following = node.next
                node.next = previous
                previous = node
                node = following
            return previous

        slow = fast = head

        # Find the midpoint. For odd length, fast ends on the final node.
        while fast and fast.next:
            slow = slow.next
            fast = fast.next.next

        # Skip the middle node when the list has odd length.
        second_half_start = slow.next if fast else slow
        reversed_half = reverse(second_half_start)

        # Compare the first half with the reversed second half.
        left = head
        right = reversed_half
        is_palindrome = True

        while right:
            if left.val != right.val:
                is_palindrome = False
                break
            left = left.next
            right = right.next

        # Restore the list to its original structure.
        reverse(reversed_half)
        return is_palindrome

Complexity:

  • Time: O(n), to find the midpoint, reverse, compare, and restore.
  • Space: O(1), using only a few pointers.

Common follow-ups

  • What if the list must not be modified, even temporarily? Use a stack to store values, which takes O(n) extra space.
  • How can recursion solve it? Recursively compare nodes from the ends, using O(n) call-stack space.
  • What about empty or single-node lists? Both are palindromes; the code handles them directly.
CodingEasyOracleSoftware Engineer

6. Island Perimeter (LeetCode)

Model answer

The task

Given a grid of land and water cells, calculate the total length of the land’s outer boundary. Each cell is square, and only sides next to water or outside the grid count.

Key idea

Start with four sides for every land cell. Subtract one for each side shared with another land cell; equivalently, count a side only when its neighbor is water or out of bounds.

Approach

  1. Record the grid’s row and column counts.
  2. Visit every cell.
  3. For each land cell, check its four neighboring positions.
  4. Add one to the perimeter for each neighbor that is outside the grid or water.
  5. Return the accumulated perimeter.
from typing import List

class Solution:
    def islandPerimeter(self, grid: List[List[int]]) -> int:
        rows = len(grid)
        cols = len(grid[0])
        perimeter = 0

        # Each exposed side of a land cell contributes one unit.
        directions = ((1, 0), (-1, 0), (0, 1), (0, -1))

        for row in range(rows):
            for col in range(cols):
                if grid[row][col] == 0:
                    continue

                for dr, dc in directions:
                    neighbor_row = row + dr
                    neighbor_col = col + dc

                    # An out-of-grid or water neighbor leaves this side exposed.
                    if (
                        neighbor_row < 0
                        or neighbor_row >= rows
                        or neighbor_col < 0
                        or neighbor_col >= cols
                        or grid[neighbor_row][neighbor_col] == 0
                    ):
                        perimeter += 1

        return perimeter

Complexity:

  • Time: O(RC), where R and C are the grid dimensions; each cell checks four neighbors.
  • Space: O(1), excluding the input grid; only a fixed number of variables are used.

Common follow-ups

  • Can you use DFS or BFS? Yes; traverse the island and count exposed sides for each visited land cell, though a full grid scan is simpler.
  • What if the grid has multiple islands? The same scan returns the sum of their perimeters.
  • How would you handle a very large grid that does not fit in memory? Process it in chunks while retaining boundary rows or columns needed to check neighbors.
CodingEasyOracleSoftware Engineer

7. Design HashMap (LeetCode)

Model answer

The task

Build a hash map that supports inserting or updating a key-value pair, retrieving a value by key, and deleting a key. Do not rely on Python’s built-in hash map for storage.

Key idea

Use a fixed-size array of buckets, mapping each key to a bucket with modulo. Each bucket is a linked list, so keys that map to the same bucket can coexist; operations scan only that bucket.

Approach

  1. Create an array of empty bucket heads and a node type holding a key, value, and next pointer.
  2. For each operation, compute the bucket index as key % bucket_count.
  3. In put, update the value if the key exists; otherwise, add a node to the bucket.
  4. In get, scan the bucket and return the value, or -1 if the key is absent.
  5. In remove, unlink the matching node if present.
class MyHashMap:
    class _Node:
        def __init__(self, key: int, value: int, next_node=None):
            self.key = key
            self.value = value
            self.next = next_node

    def __init__(self):
        # A prime bucket count helps distribute keys across buckets.
        self._bucket_count = 1009
        self._buckets = [None] * self._bucket_count

    def _index(self, key: int) -> int:
        return key % self._bucket_count

    def put(self, key: int, value: int) -> None:
        index = self._index(key)
        node = self._buckets[index]

        while node:
            if node.key == key:
                node.value = value
                return
            node = node.next

        # Add new keys at the head of the chain.
        self._buckets[index] = self._Node(
            key, value, self._buckets[index]
        )

    def get(self, key: int) -> int:
        node = self._buckets[self._index(key)]

        while node:
            if node.key == key:
                return node.value
            node = node.next

        return -1

    def remove(self, key: int) -> None:
        index = self._index(key)
        previous = None
        node = self._buckets[index]

        while node:
            if node.key == key:
                if previous is None:
                    self._buckets[index] = node.next
                else:
                    previous.next = node.next
                return

            previous = node
            node = node.next

Complexity:

  • Time: O(1) average per operation with a reasonably distributed hash; O(n) worst case if keys share a bucket.
  • Space: O(n + B), where n is the number of stored keys and B is the number of buckets.

Common follow-ups

  • How would you reduce long chains? Resize the bucket array and reinsert all entries when the load factor exceeds a threshold.
  • What if keys are negative? Use a modulo operation that always produces a valid nonnegative index, as Python’s % does.
  • How could you improve worst-case lookup? Use balanced trees within heavily populated buckets, giving O(log n) bucket searches.
CodingEasyOracleSoftware Engineer

8. Number of Valid Words in a Sentence (LeetCode)

Model answer

The task

Count the space-separated tokens in a sentence that follow the valid-word rules: lowercase letters are allowed, with limited use of a hyphen or ending punctuation. Tokens containing any other character are invalid.

Key idea

Check each token character by character. A hyphen must be the only hyphen and have lowercase letters on both sides; punctuation may appear only once, at the end.

Approach

  1. Split the sentence into tokens, ignoring repeated spaces.
  2. For each token, track whether it contains a hyphen.
  3. Reject characters that are not lowercase letters, a hyphen, or supported punctuation.
  4. Check that any hyphen has lowercase letters immediately before and after it.
  5. Count the token if it passes every check.
class Solution:
    def countValidWords(self, sentence: str) -> int:
        def is_valid(token: str) -> bool:
            hyphen_seen = False

            for i, char in enumerate(token):
                if "a" <= char <= "z":
                    continue

                if char == "-":
                    if hyphen_seen or i == 0 or i == len(token) - 1:
                        return False
                    if not ("a" <= token[i - 1] <= "z"):
                        return False
                    if not ("a" <= token[i + 1] <= "z"):
                        return False
                    hyphen_seen = True
                    continue

                if char in "!,." and i == len(token) - 1:
                    continue

                return False

            return True

        return sum(is_valid(token) for token in sentence.split())

Complexity:

  • Time: O(n), where n is the sentence length; each character is checked once.
  • Space: O(n), for the tokens created by split().

Common follow-ups

  • How can auxiliary space be reduced? Scan the sentence directly and validate each token without building a list.
  • What if punctuation may appear more than once at the end? Track the first punctuation position and require all later characters to be punctuation.
  • How would you support uppercase letters? Expand the letter check to include A through Z.
Product & growthEasyOracleProduct Manager

9. What is your favorite Oracle product and why?

The full question

What is your favorite Oracle product and why? How would you improve it?

Model answer

Favorite Product: Oracle Cloud Infrastructure (OCI)

Why: OCI provides robust, scalable, and secure cloud solutions that cater to enterprises of all sizes, offering flexibility and comprehensive support for various workloads.

How to Improve:

  1. Clarify & scope: Focus on enhancing user experience for enterprise clients by addressing usability and integration concerns.
  2. User segments & pain points: Enterprise IT departments that face integration challenges with existing systems.
  3. Goals & success metrics: Increase in customer satisfaction and integration success rates.
  4. Solutions: - Develop more comprehensive integration tools and APIs. - Enhance documentation and provide more interactive tutorials. - Offer dedicated integration support teams.
  5. Recommendation: Prioritize developing integration tools to streamline the process for IT departments.
  6. MVP, measurement & rollout: Launch a beta version of the integration tools with select enterprise clients, gather feedback, and refine the tools before a wider release.
Product & growthMediumOracleProduct Manager

10. How would you use an agentic workflow in a given workflow?

Model answer

Clarify & scope. I’ll use employee expense reimbursement as the workflow. The goal is to reduce the time and effort required to submit and approve a compliant claim—not to remove human judgment from financial decisions. I’d first confirm the users, policy rules, systems of record, and which actions the agent is allowed to take.

User segments & pain points. Employees struggle to find receipts, categorize transactions, and understand policy requirements. Finance teams spend time correcting incomplete submissions and reviewing routine claims, while managers need a clear basis for approval. I’d focus the initial product on employees submitting common, low-risk expenses and finance staff reviewing exceptions.

Goals & success metrics. The north-star metric could be the percentage of expense claims completed correctly without avoidable rework. Supporting metrics: time to submit, first-pass completeness, finance handling time, and reimbursement cycle time. Guardrails: policy violations, incorrect categorization, employee override rate, privacy incidents, and agent actions taken without required approval.

Solutions. I’d compare a guided form, a copilot that drafts a claim, and an agent that gathers information and submits it for review. Recommendation: start with a bounded agent that reads an uploaded receipt, extracts merchant/date/amount, suggests a category, checks policy, and prepares a claim. The employee confirms before submission; the agent never approves payment or invents missing details.

flowchart LR
  A[Employee uploads receipt] --> B[Agent extracts fields]
  B --> C[Policy and transaction checks]
  C --> D{Missing or unusual?}
  D -->|Yes| E[Ask employee or route to finance]
  D -->|No| F[Show draft and evidence]
  F --> G[Employee confirms]
  G --> H[Submit to expense system]
Diagram

Prioritization & trade-offs. I’d prioritize common, well-understood expenses because they offer repeat volume and lower risk. Better automation may reduce manual work, but an overly autonomous flow could create incorrect claims and undermine trust. I’d make evidence visible, explain policy flags, and require confirmation for consequential actions.

MVP, measurement & rollout. I’d test with one expense category and a small employee cohort, compare against the existing flow, and review errors with finance weekly. Expand only if first-pass completeness improves without worsening policy violations or trust. I’d instrument every extraction, correction, escalation, and submission so we can identify where the agent adds value and where a simple form is safer.

Product & growthMediumOracleProduct Manager

11. Describe your product vision.

Model answer

Vision. My product vision is to make ChatGPT the most useful and trustworthy partner for getting meaningful work done: a place where people can move from a question or intention to a high-quality outcome, while staying informed and in control.

Who it serves and what changes. I’d start with people who use AI regularly to learn, create, and solve problems, but still have to bridge gaps between getting an answer and completing the task. Today, users often repeat context, verify outputs manually, and switch among tools. The opportunity is to help them make progress across a workflow—not merely generate a response—without making the product feel opaque or overly automated.

Strategic pillars.

  • Useful intelligence: Give people capable help across writing, analysis, learning, and planning, tailored to their intent and context.
  • Continuity: Make it easier to build on prior work and move between conversation, files, tools, and collaborators where appropriate.
  • Trust and control: Make capabilities, uncertainty, data use, and consequential actions understandable; let users review and approve actions.
  • Broad access with clear value: Keep the core experience approachable while offering deeper capabilities where users demonstrate a need.

What I would not optimize for. I would not equate success with maximizing time in chat or automating every task. A shorter interaction that lets someone confidently finish their work can be a better outcome. I’d also avoid adding advanced features that increase complexity without solving a frequent, valuable user problem.

How I’d turn the vision into strategy. I’d translate it into a small number of user problems, choose a target segment and workflow, and sequence capabilities based on user value, feasibility, and trust risk. For example, I might first improve continuity for a high-frequency task, then test whether users want more proactive assistance, with explicit controls before expanding automation.

Success measures. My north star would be the rate of users who successfully complete a meaningful task and return to do so again. I’d pair that with task success, repeat use, user-reported usefulness, and retention, while guarding against harmful or incorrect outputs, privacy concerns, latency, and increased abandonment.

Leadership angle. I’d keep design, research, engineering, safety, and commercial teams aligned on the user outcome—not a feature checklist. The vision should be ambitious enough to guide investment, but specific enough that teams can make consistent trade-offs and stop work that does not advance it.

Product & growthMediumOracleGroup Product Manager

12. Can you walk us through your product portfolio?

Model answer

Portfolio overview

I’d describe my portfolio in terms of the customer outcomes it serves, rather than just listing products. I currently oversee [number] products for [customer segments], with responsibility for [regions, revenue, users, or platform scope]. Together, they support customers through [briefly describe the end-to-end journey or business problem].

Products and their roles

  • [Product A]: Serves [segment] with [core job to be done]. Its strategic role is [acquisition, core value, retention, monetization, or platform enablement]. I track [primary outcome metric] and guardrails such as [quality or cost metric].
  • [Product B]: Addresses [different or adjacent need] for [segment]. It complements Product A by [relationship], and I measure it through [primary outcome metric].
  • [Platform or shared capability, if relevant]: Enables [products or teams] to deliver [customer or business outcome]. I treat its internal adoption and reliability as leading indicators, but connect those to external customer impact.

How I manage the portfolio

I use a shared strategy and a distinct product thesis for each investment. That prevents every roadmap from becoming a collection of locally attractive features. I review customer needs, product performance, strategic fit, dependencies, and delivery risk together. For example, when [customer research or data signal] showed [specific problem], I chose to prioritize [investment] over [alternative], because it had stronger [customer impact or strategic value] despite [cost or trade-off].

At the Group PM level, I also make sure teams have clear ownership and compatible measures. I align leaders on cross-product dependencies, resolve resource conflicts, and make stop-or-scale decisions using agreed evidence—not just delivery status.

Success and trade-offs

I would summarize portfolio health with [North Star or customer outcome], supported by product-level measures such as [activation, retention, or task success], business measures such as [revenue or cost], and guardrails such as [reliability, support burden, or customer trust]. A strong portfolio is not necessarily one where every product grows equally; it is one where each product has a clear role and the combined investment delivers better outcomes than isolated roadmaps.

What I’d make concrete in an interview: the actual products, users, scale, metrics, one investment decision, and the measurable result.

System designEasyOracle

13. Design a simple URL shortening service.

Model answer

1. Requirements & scale

Functional Requirements:

  • Shorten a given URL.
  • Redirect to the original URL when a shortened URL is accessed.
  • Track the number of times a shortened URL is accessed.
  • Provide a custom alias for a URL (optional).

Non-Functional Requirements:

  • High availability and reliability.
  • Low latency for URL redirection.
  • Scalability to handle a large number of URLs and requests.

Estimates:

  • Assume 100 million URLs are shortened over the service's lifetime.
  • Average URL length: 100 characters.
  • Shortened URL length: 7 characters.
  • Estimated QPS (Queries Per Second): 500 for shortening and 5000 for redirection.
  • Storage: 100 million URLs * (100 + 7) bytes = ~10.7 GB.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[URL Shortening Service]
        E[Redirection Service]
    end

    subgraph Cache
        F[Redis Cache]
    end

    subgraph Datastores
        G[SQL Database]
    end

    A -->|Shorten URL Request| B
    B -->|Shorten URL Request| C
    C -->|Shorten URL Request| D
    D -->|Store URL Mapping| G
    D -->|Cache Shortened URL| F

    A -->|Access Shortened URL| B
    B -->|Access Shortened URL| C
    C -->|Access Shortened URL| E
    E -->|Check Cache| F
    F -->|Cache Hit| E
    F -->|Cache Miss| G
    G -->|Fetch Original URL| E
Diagram

3. API design

  • POST /shorten: Accepts a long URL and returns a shortened URL.
  • GET /{shortened_id}: Redirects to the original URL associated with the shortened ID.
  • POST /shorten/custom: Accepts a long URL and a custom alias, returns the custom shortened URL.

4. Data model & storage

Chosen Datastore:

  • SQL Database for ACID properties and simplicity in managing URL mappings.
  • Redis for caching frequently accessed URLs to reduce database load.

Key Tables:

  • URLMapping:
  • id (Primary Key, auto-increment)
  • shortened_id (VARCHAR, unique)
  • original_url (TEXT)
  • access_count (INT)

Partitioning:

  • Partition URLMapping by id to distribute data evenly across shards.

5. Deep dive

The core of the URL shortening service is generating a unique shortened ID for each URL. A common approach is using a base62 encoding of an auto-incremented ID from the database.

sequenceDiagram
    participant User
    participant Service
    participant DB as SQL Database
    participant Cache as Redis Cache

    User->>Service: POST /shorten
    Service->>DB: Insert original URL
    DB->>Service: Return ID
    Service->>Service: Encode ID to base62
    Service->>DB: Store shortened ID
    Service->>Cache: Cache shortened ID
    Service->>User: Return shortened URL

    User->>Service: GET /{shortened_id}
    Service->>Cache: Check shortened ID
    alt Cache Hit
        Cache->>Service: Return original URL
    else Cache Miss
        Service->>DB: Fetch original URL
        DB->>Service: Return original URL
        Service->>Cache: Update Cache
    end
    Service->>User: Redirect to original URL
Diagram

6. Scale, bottlenecks & trade-offs

Scaling:

  • Use database sharding to handle large datasets. Partition by id ensures even distribution.
  • Redis caching reduces database load and improves latency for frequently accessed URLs.

Bottlenecks:

  • Database write operations can become a bottleneck. Implement write-ahead logging and replication for reliability.
  • Cache invalidation strategies are crucial for maintaining consistency between Redis and the database.

Trade-offs:

  • Consistency vs. Availability: Opt for eventual consistency in caching to ensure high availability.
  • SQL vs. NoSQL: SQL is chosen for its transactional support, but NoSQL could be considered for more flexible scaling.
  • Push vs. Pull: Use a pull-based approach for cache updates to minimize stale data.

By following this design, the URL shortening service can efficiently handle high traffic and provide reliable and fast redirection.

System designMediumOracleSoftware EngineerOnsite

14. Design a rate limiting system for an API gateway.

The full question

Design a rate limiting system for an API gateway.

Your design should address:

  • Rate limits such as "N requests per second/minute" per key (e.g., per user, per IP, per API token).
  • Correctness under concurrency and bursty traffic.
  • Operation in a distributed, multi-instance gateway.
  • What happens on limit exceed (HTTP status, headers, retry guidance).
  • Observability and configurability (different limits per endpoint/customer tier).

Model answer

1. Requirements & scale

Functional Requirements:

  • Implement rate limiting for API requests based on criteria such as user, IP, or API token.
  • Support rate limits like "N requests per second/minute."
  • Provide different rate limits for different endpoints or customer tiers.
  • Ensure correctness under concurrent and bursty traffic.
  • Return appropriate HTTP status and headers when limits are exceeded.
  • Allow observability and configurability of rate limits.

Non-Functional Requirements:

  • High availability and fault tolerance.
  • Low latency impact on API requests.
  • Scalability to handle distributed, multi-instance API gateways.

Estimates:

  • Assume 10,000 requests per second (QPS) per instance.
  • If each request is approximately 1 KB, bandwidth is 10 MB/s per instance.
  • Storage for rate limit data: Assume 1 million users, each with a 1 KB record, totaling ~1 GB.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User]
    end
    subgraph "Edge/CDN"
        B[CDN]
    end
    subgraph "Load Balancer"
        C[Load Balancer]
    end
    subgraph "API / Services"
        D[API Gateway]
        E[Rate Limiter]
    end
    subgraph Cache
        F[Redis/Memcached]
    end
    subgraph Datastores
        G["SQL/NoSQL DB"]
    end
    subgraph "Message Queue"
        H[Queue]
    end

    A --> B --> C --> D
    D --> E
    E --> F
    F --> E
    E --> G
    E --> H
    D -->|Rate Limited Request| A
Diagram

3. API design

  • POST /api/resource: Process a request for a resource.
  • GET /api/rate_limit_status: Retrieve current rate limit status for a user or token.
  • POST /api/configure_rate_limit: Configure rate limits for specific endpoints or tiers.

4. Data model & storage

Datastore Choice:

  • Use Redis or Memcached for fast, in-memory storage of rate limit counters due to their low latency and high throughput.
  • Use a SQL/NoSQL database for persistent storage of rate limit configurations and historical data.

Key Tables:

  • RateLimits: Stores configurations with fields like endpoint, limit, time_window, tier.
  • UserLimits: Tracks current usage with fields like user_id, current_count, reset_time.

Partition/Sharding:

  • Partition UserLimits by user_id to distribute load evenly across nodes.

5. Deep dive

The core of the rate limiting system is the algorithm that tracks requests and enforces limits. A token bucket or leaky bucket algorithm is suitable for handling bursty traffic while maintaining a steady rate.

sequenceDiagram
    participant A as Client
    participant D as API Gateway
    participant E as Rate Limiter
    participant F as Cache (Redis)
    participant G as Datastore

    A->>D: Send API Request
    D->>E: Check Rate Limit
    E->>F: Retrieve Current Count
    F-->>E: Return Count
    alt Limit Not Exceeded
        E->>F: Update Count
        E->>D: Allow Request
        D->>A: Return Success
    else Limit Exceeded
        E->>D: Deny Request
        D->>A: Return HTTP 429
    end
Diagram

6. Scale, bottlenecks & trade-offs

Scaling:

  • Use horizontal scaling for API gateways and rate limiter instances.
  • Redis/Memcached can be clustered to handle increased load and provide redundancy.

Bottlenecks:

  • The cache layer (Redis/Memcached) could become a bottleneck if not properly scaled.
  • Network latency between distributed components can affect performance.

Trade-offs:

  • Consistency vs. Availability: Opt for eventual consistency in rate limit updates to ensure high availability.
  • Push vs. Pull: Use a pull model for rate limit checks to minimize latency.
  • SQL vs. NoSQL: Use NoSQL for flexible schema and high write throughput for rate limit configurations.

Failure Modes:

  • If the cache fails, fall back to a default rate limit to ensure service continuity.
  • Implement circuit breakers to handle downstream service failures gracefully.

By implementing this design, the system can effectively manage API rate limits, ensuring fair usage and protecting backend services from overload.

System designMediumOracle

15. How would you design a URL shortening service?

The full question

How would you design a URL shortening service? What components would you include?

Model answer

1. Requirements & scale

Functional Requirements:

  • Shorten a given URL and return a unique short URL.
  • Redirect to the original URL when the short URL is accessed.
  • Track the number of times a short URL has been accessed.
  • Provide an API for URL shortening and redirection.

Non-Functional Requirements:

  • High availability and reliability.
  • Low latency for URL redirection.
  • Scalability to handle a large number of requests.
  • Consistent performance under load.

Estimates:

  • Assume 1 million new URLs shortened per day.
  • Each URL is accessed 10 times on average.
  • Total requests per day = 1 million (shortening) + 10 million (redirection) = 11 million requests.
  • QPS (Queries Per Second) = 11 million / 86,400 seconds ≈ 130 QPS.
  • Storage: Assume each URL mapping requires 500 bytes. For 1 million URLs, storage needed per day = 500 MB. For a year, approximately 180 GB.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[URL Shortening Service]
        E[Redirection Service]
    end

    subgraph Cache
        F[Redis Cache]
    end

    subgraph Datastores
        G[SQL Database]
    end

    subgraph Message Queue
        H[Kafka Queue]
    end

    subgraph Workers
        I[Analytics Worker]
    end

    A -->|Shorten URL| B
    B --> C
    C --> D
    D -->|Store Mapping| G
    D -->|Cache Mapping| F
    A -->|Access Short URL| B
    B --> C
    C --> E
    E -->|Fetch from Cache| F
    F -->|Redirect to Original URL| A
    E -->|Fallback to DB| G
    E -->|Log Access| H
    H --> I
    I -->|Update Stats| G
Diagram

3. API design

  • POST /shorten: Accepts a long URL and returns a shortened URL.
  • GET /{shortUrl}: Redirects to the original URL associated with the short URL.
  • GET /stats/{shortUrl}: Returns access statistics for a given short URL.

4. Data model & storage

Datastore Choice:

  • SQL Database: Chosen for its ACID properties, ensuring consistency and integrity of URL mappings.

Key Tables:

  • URL_Mappings:
  • id (Primary Key)
  • short_url (Unique)
  • original_url
  • creation_date
  • access_count

Partitioning Strategy:

  • Partition URL_Mappings by creation_date to manage growth and optimize query performance.

5. Deep dive

URL Shortening Algorithm:

  1. Generate a unique ID for each URL using an auto-incrementing sequence.
  2. Convert the ID to a short string using a base conversion (e.g., Base62).
  3. Store the mapping of the short string to the original URL in the database.
sequenceDiagram
    participant User
    participant URLService
    participant Database
    User->>URLService: POST /shorten
    URLService->>Database: Insert URL, get ID
    Database-->>URLService: Return ID
    URLService->>URLService: Convert ID to Base62
    URLService->>Database: Store short URL mapping
    URLService-->>User: Return short URL
Diagram

6. Scale, bottlenecks & trade-offs

Scaling Strategies:

  • Replication: Use database replication to ensure high availability and reliability. This allows read operations to be served from replicas, reducing load on the master database.
  • Sharding: Implement sharding based on the short_url to distribute load across multiple database instances.
  • Caching: Use Redis to cache frequently accessed URL mappings, reducing database load and improving latency.

Bottlenecks & Trade-offs:

  • Consistency vs. Availability: Prioritize consistency for URL mappings to ensure correct redirection, potentially sacrificing some availability during network partitions (CAP theorem).
  • Cache Invalidation: Implement a strategy for cache invalidation to ensure that updates to URL mappings are reflected in the cache.
  • Data Growth: Regularly archive old URL mappings to manage database size and maintain performance.

By addressing these considerations, the URL shortening service can efficiently handle high traffic volumes while maintaining reliability and performance.

System designMediumOracle

16. Design a system that can efficiently process and store user login events for a large web application.

The full question

Design a system that can efficiently process and store user login events for a large web application. Describe the data structure you would use and how you would handle high traffic.

Model answer

1. Requirements & scale

Functional Requirements:

  • Capture and store user login events.
  • Provide real-time analytics on login trends.
  • Ensure data integrity and durability.

Non-Functional Requirements:

  • High availability and fault tolerance.
  • Low latency for both data ingestion and retrieval.
  • Scalability to handle spikes in login events.

Estimates:

  • Assume 10 million active users with an average of 2 logins per day.
  • Peak load: 5000 logins per second (QPS).
  • Each login event is approximately 1 KB.
  • Daily storage requirement: 10 million 2 1 KB = 20 GB.
  • Monthly storage requirement: 20 GB * 30 = 600 GB.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User Device]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[Login Service]
    end

    subgraph Cache
        E[Redis Cache]
    end

    subgraph Datastores
        F[NoSQL DB]
        G[Data Warehouse]
    end

    subgraph Message Queue
        H[Kafka]
    end

    subgraph Workers
        I[Event Processor]
    end

    A -->|Login Request| B
    B -->|Forward Request| C
    C -->|Route Request| D
    D -->|Check Cache| E
    E -->|Cache Miss| F
    D -->|Publish Event| H
    H -->|Consume Event| I
    I -->|Store Event| F
    I -->|Analytics| G
Diagram

3. API design

  • POST /login: Capture a user login event.
  • Purpose: Record a login event and trigger analytics processing.
  • GET /login-stats: Retrieve login statistics.
  • Purpose: Provide real-time analytics on login trends.

4. Data model & storage

Chosen Datastores:

  • NoSQL DB (e.g., Cassandra): Chosen for its high write throughput and ability to handle large volumes of data across distributed nodes.
  • Data Warehouse (e.g., Amazon Redshift): Used for analytical queries and reporting.

Key Tables:

  • LoginEvents:
  • Partition Key: user_id
  • Clustering Key: timestamp
  • Fields: user_id, timestamp, ip_address, device_info

5. Deep dive

The core of this system is efficiently processing and storing login events while ensuring scalability and low latency. The flow begins with a user login request, which is routed through a CDN and load balancer to the Login Service. The service first checks a Redis cache to verify if the user session is already active, minimizing database hits.

If a cache miss occurs, the event is logged in a NoSQL database for durability. Simultaneously, the login event is published to a Kafka message queue, which decouples the ingestion from processing, allowing for asynchronous handling of events.

sequenceDiagram
    participant User
    participant CDN
    participant LB as Load Balancer
    participant LS as Login Service
    participant RC as Redis Cache
    participant MQ as Kafka
    participant DB as NoSQL DB
    participant DW as Data Warehouse

    User->>CDN: Login Request
    CDN->>LB: Forward Request
    LB->>LS: Route to Login Service
    LS->>RC: Check Cache
    RC-->>LS: Cache Miss
    LS->>DB: Store Event
    LS->>MQ: Publish Event
    MQ->>DW: Process for Analytics
Diagram

6. Scale, bottlenecks & trade-offs

Scalability:

  • Sharding: The NoSQL database is sharded by user_id to distribute load evenly.
  • Horizontal Scaling: Both the NoSQL database and Kafka can be scaled horizontally to handle increased load.

Caching:

  • Redis: Used to reduce read load on the database by caching active sessions.
  • Eviction Policy: Implementing LRU to manage cache size effectively.

Bottlenecks & Trade-offs:

  • Consistency vs. Availability: The system prioritizes availability over strict consistency due to the eventual consistency model of NoSQL databases.
  • Latency: Using in-memory caching and message queues reduces latency but introduces complexity in ensuring eventual consistency.
  • Data Durability: Kafka ensures that events are reliably processed even in the event of service failures.

By carefully balancing these elements, the system can efficiently handle high traffic and provide real-time insights into user login behavior.

TechnicalEasyOracleTechnical Program Manager

17. What was your role in your most recent project?

Model answer

A strong response makes clear what you owned, how you operated across technical teams, and how the project performed. Adapt this example to a real recent project:

  1. Set the context. “My most recent project was modernizing checkout for a high-traffic commerce platform. The goal was to improve reliability and reduce latency while keeping the existing customer experience available during migration.” Give the scale and stakes if you can: services involved, teams, traffic, deadline, or customer impact.
  2. Define your role precisely. “As the TPM, I owned the integrated plan and delivery outcomes—not the engineering design itself. I coordinated API, payments, infrastructure, security, QA, and operations, and made sure dependencies and decisions had clear owners.”
  3. Explain how you drove execution. Describe how you turned the goal into milestones and launch criteria, surfaced cross-team dependencies, resolved decision bottlenecks, and communicated trade-offs. Give one concrete example, such as agreeing to defer a noncritical feature to protect the reliability work on the critical path.
  4. Show technical fluency. Explain the system boundary or migration approach briefly: for example, routing a small percentage of traffic to the new path behind a feature flag, comparing outcomes, and increasing traffic only when latency and error-rate guardrails were met.
  5. Close with measurable impact and learning. Share truthful before-and-after results—such as p95 latency, error rate, delivery date, incident rate, adoption, or operational load. State what you would improve next time.
flowchart LR
  A[Align on goal and scope] --> B[Map teams and dependencies]
  B --> C[Agree milestones and exit criteria]
  C --> D[Integrate and test]
  D --> E[Canary rollout]
  E --> F[Monitor outcomes and risks]
  F --> G[Expand or rollback]
Diagram

What interviewers listen for: clear personal accountability without taking credit for engineering work; enough technical understanding to anticipate dependencies and failure modes; decisions made under real constraints; and outcomes measured against customer and operational goals. Avoid a task list—show how your actions changed the project’s trajectory.

TechnicalEasyOracleSenior Director of Engineering

18. Can you tell me more about the projects you have worked on?

Model answer

How I’d answer

I’d organize my experience around three projects that show different kinds of leadership, rather than reciting a project list. For each, I’d cover the business problem, my scope, the decisions I influenced, and measurable results.

  • A growth or customer-impact project: “One example was [project], where we needed to [customer or business outcome]. I was accountable for [team, product area, or cross-functional scope]. We chose [key approach] over [alternative] because [trade-off]. The result was [measurable impact], while [quality or customer metric] stayed within target.”
  • A platform or reliability investment: Explain the operational pain, scale, and why it mattered to product teams. Describe how you balanced migration cost against reliability or developer productivity, and quantify outcomes such as incident rate, availability, deployment frequency, or time to onboard a service.
  • A change in organizational capability: Describe how you improved ownership, delivery predictability, or technical decision-making across teams. Show what changed in engineering practice and how you measured whether the change lasted.

What to emphasize

  • State your personal accountability separately from the team’s work. Include organization size, partner functions, and system scale when relevant.
  • Make the technical choices understandable to a business audience; explain the alternatives and consequences, not just the technology selected.
  • Use a small number of credible measures: customer conversion or retention, revenue, latency, availability, incident rate, delivery lead time, or cost.
  • Include one setback or changed assumption. Explain how you responded and what you learned.
  • Close by connecting the examples to the role: “Across these projects, the common thread was aligning engineering investment to customer and business outcomes while building teams that could sustain the results.”

What interviewers listen for: clear ownership, meaningful scope, sound trade-offs, cross-functional influence, measurable outcomes, and lessons that apply beyond one project.

TechnicalEasyOraclePrincipal EngineerScreening

19. What recent work have you done on your projects?

Model answer

  1. Choose one recent project, not a tour of everything. Give the context, your role, the users or teams affected, and why the work mattered. Be precise about your personal contribution versus the team’s contribution.
  2. Explain the problem and constraints. For example: “We were seeing [specific reliability, latency, cost, or delivery issue] at [scale]. I owned [scope], while balancing [constraint such as compatibility, migration risk, or delivery date].” Replace the brackets with a real project and numbers you can defend.
  3. Describe the technical decisions and trade-offs. Cover the existing design, the options you considered, why you chose the approach you did, and what you deliberately did not do. Include one concrete engineering detail—such as a data model, API boundary, failure mode, or rollout strategy—rather than listing technologies.
  4. Show Principal-level influence. Explain how you aligned partner teams, clarified ownership, raised the quality bar, or enabled other engineers to deliver. Make clear how you handled disagreement and how the decision affected systems beyond your immediate team.
  5. Close with measured results and learning. Use before-and-after evidence where possible: p95 latency, error rate, availability, cloud spend, ingestion throughput, adoption, or deployment lead time. State what you learned and what you would improve next.

Adaptable spoken outline: “Recently, I led [project] because [user or business problem]. I was accountable for [scope] across [teams/systems]. The hardest constraint was [constraint]. I evaluated [options] and chose [decision] because [reason], while mitigating [risk] through [rollout or safeguard]. I aligned [partners] around [decision or ownership model]. We measured [metric] and achieved [result]. The main lesson was [learning], and the next step is [follow-up].”

What interviewers listen for: clear ownership, technical judgment, organizational influence, credible metrics, and honest reflection. Avoid an ungrounded technology list or claiming team outcomes as individual work.

TechnicalEasyOracle

20. What is the difference between a primary key and a foreign key in a relational database?

Model answer

Primary Key vs. Foreign Key in a Relational Database

  1. Primary Key: - A primary key is a column, or a set of columns, in a relational database table that uniquely identifies each row in that table. - It ensures that no two rows have the same value(s) in the primary key column(s), thereby maintaining data integrity. - A primary key cannot contain NULL values, as it must uniquely identify a record. - Typically, a primary key is used to enforce entity integrity.
  2. Foreign Key: - A foreign key is a column, or a set of columns, in one table that refers to the primary key in another table. - It establishes a relationship between two tables, enforcing referential integrity. - Unlike primary keys, foreign keys can contain NULL values, depending on the database design. - Foreign keys are used to ensure that the data in one table corresponds to valid data in another table.
  3. Key Differences: - Purpose: The primary key uniquely identifies records within its own table, while the foreign key creates a link between two tables. - Integrity: Primary keys ensure entity integrity, whereas foreign keys ensure referential integrity. - Uniqueness: Primary keys must be unique and non-null, while foreign keys can have duplicate values and may include NULLs. - Location: A primary key is defined within a single table, whereas a foreign key is defined in one table but refers to the primary key of another table.

Understanding these differences is crucial for designing robust relational databases that maintain data integrity and support complex relationships between tables.

Practice these out loud, don't memorise them

Reading an answer is not the same as being able to give one under pressure. ChannelPulse plays the interviewer, asks the follow-ups, and scores each answer with feedback and a model answer so you can hear the gap between what you said and what lands.

Get ChannelPulse Browse all questions