Relational processing entails treating whole relationships as operands. Its primary purpose is loop-avoidance, an absolute requirement for end users to be productive at all, and a clear productivity booster for application programmers. – EF Codd, 1981 Turing Award Lecture, CACM, 25(2), 1982

Work through the following materials this week, making sure that you can do the given activities.

  1. Sections 10.1, 10.4.1 & 26.1.1–2

    1. Name the three basic approaches to database programming.

    2. Explain the concepts of:

      1. impedance mismatch

      2. stored procedures

      3. triggers

  2. Server-Side Programming: PL/SQL and Java. — Focus on server-side programming, PL/SQL and triggers; skip the section on “Overview of Java in Oracle Database”.

    1. Compare and contrast:

      1. procedural vs non-procedural languages.

      2. client-side vs server-side database programming.

    2. Explain why one would want to do server-side programming using PL/SQL.

    3. For each of the following code segments, identify the type of the database object and explain what it does.

      1. CREATE PROCEDURE limited_count (limit IN integer) AS
        BEGIN
          FOR i IN 1..limit LOOP
              dbms_output.put_line(i);
          END LOOP;
        END;

         

      2. BEGIN
          dbms_output.put_line('Hello, PL/SQL!');
        END;

         

      3. CREATE TRIGGER log_trigger
          BEFORE INSERT OR UPDATE OF lastName ON Person
          FOR each row
        BEGIN
          dbms_output.put_line('Hello, name change!');
        END;