In-Class Exercise: OLTP vs OLAP

Instructions:

  1. Read each business scenario carefully.
  2. Determine whether the scenario is better suited for OLTP (Online Transaction Processing) or OLAP (Online Analytical Processing).
  3. Justify your choice based on the characteristics we’ve discussed in class.
  4. Be prepared to share and discuss your answers with the class.

Scenarios:

  1. A retail company needs to process customer orders on its e-commerce website, updating inventory levels in real-time. Your answer: [ OLTP / OLAP ] Justification:

  2. A marketing team wants to analyze customer buying patterns over the last 5 years to identify trends and segment customers. Your answer: [ OLTP / OLAP ] Justification:

  3. A warehouse management system needs to update inventory levels after each product is picked and shipped. Your answer: [ OLTP / OLAP ] Justification:

  4. The sales department requires a report on the top-selling products by region for the past quarter. Your answer: [ OLTP / OLAP ] Justification:

  5. A hospital needs to record patient visits, including admission time, assigned doctor, and initial diagnosis. Your answer: [ OLTP / OLAP ] Justification:

  6. A financial analyst needs to predict future sales based on historical data, market trends, and economic indicators. Your answer: [ OLTP / OLAP ] Justification:

  7. A bank needs to process ATM transactions, including withdrawals, deposits, and balance inquiries. Your answer: [ OLTP / OLAP ] Justification:

  8. A telecommunications company wants to analyze call data records to optimize network performance and identify potential areas for infrastructure improvement. Your answer: [ OLTP / OLAP ] Justification:

Characteristics to Consider:

  • OLTP:

    • Handles day-to-day transactions
    • Short, simple transactions
    • High concurrency
    • Predictable, repetitive queries
    • Focused on data entry and retrieval
  • OLAP:

    • Supports complex analytical queries
    • Aggregations and summarizations
    • Lower concurrency, longer-running queries
    • Historical and predictive analysis
    • Focused on decision support and data mining

Remember, while some scenarios may have elements of both OLTP and OLAP, try to determine which system would be the primary or more suitable choice based on the main requirements of the scenario.

Pierre-Henri Paris
Pierre-Henri Paris
Associate Professor in Artificial Intelligence

My research interests include Knowlegde Graphs, Information Extraction, and NLP.