Categories
Database Technology

FIT9019: Week 11

Week 11 gave us a quick introduction to PL/SQL.

The primary tools of PL SQL are:

  • Anonymous Blocks
  • Named Blocks
  • Subprograms
  • Triggers

Of these subprograms and triggers would be the most commonly used.

The structure of PL/SQL:

DECLARE
/*Declarative section is where variables and other objects such as cursors, types, exceptions, etc. are declared. Local
procedures and functions can also be declared and will be available for this block only. This section is optional */
BEGIN
/* Executable section can consist of both SQL statement and procedural statements. This section is where the work the
block has to perform is done. This section is mandatory */
EXCEPTION
/* Exception handling section is where errors are handled. The code in this section gets executed only when an error
is encountered. This section is optional. */
END;
/

A couple of examples of PL/SQL blocks:

-- Whenever emp_salary is updated or an employee deleted, this trigger enters a corresponding record into
--'EMPLOYEE_SALARY_CHANGE' table.
CREATE OR REPLACE TRIGGER trg_trackSalaryChange
AFTER UPDATE OR DELETE OF e_salary ON employee
FOR EACH ROW
DECLARE
oper VARCHAR2(10);
new_sal NUMBER(6,2);
BEGIN
IF updating THEN
oper := 'UPDATE';
new_sal := :new.e_salary;
IF :new.e_salary <= 0 THEN
RAISE_APPLICATION_ERROR (-20000, 'SALARY CANNOT BE ZERO OR NEGATIVE.');
END IF;
END IF;
IF deleting THEN
oper := 'DELETE';
new_sal := NULL;
END IF;

INSERT INTO employee_salary_change VALUES (:old.e_no, :old.e_name, :old.e_salary,
new_sal, user, sysdate, oper);
END;
/

For some basics on PL SQL such as syntax and constructs visit: http://plsql-tutorial.com/index.htm

Categories
Systems Analysis and Design

FIT9030: Week 11

Week 11 and 12 are both coming along a bit late. The 3 secondary assignments which were due in the last week took up most of my study time and my review process was somewhat derailed. I have definitley noticed that I do not adsorb as much from the lectures if I don’t keep up with this quick review within 48 hours of first hearing the lecture.

Week 11 was all about the User Interface, the key points taken from this lecture were:

  • 3 Principles of user centered design [UCD]
    • Focus early on the users and their work (interviews, questionnaires, observation)
    • Evaluate designs to ensure usability (must be easy to learn)
    • Use iterative development (prototyping with case tools will assist a great deal with this)
  • 3 metaphors of human-computer interaction
    • Direct Manipulation – User interacts with objects on the screen (evolved into the Desktop metaphor)
    • Document – electronic documents, ie: forms
    • Dialog  – command and response.
  • Principles of visibility and affordance
    • Visibility – everything that is expected to appear does and in the expected location, ie: submit button should immediately be visible on all forms.
    • Affordance – appearance should suggest function ie: an envelope suggests email function.
    • Standards and guidelines are also important to ensure visibility and affordance (particularly Microsoft and Apple’s  standards which are publicly available)
  • Aspect of user interface
    • Physical – Devices touched (mouse/keyboard),  manuals/documentation
    • Perceptual – Screens/Menus/Buttons
    • Conceptual – What the user understands about the logical tasks/functions of the system

User interface is a very large field and this quick skim over the lecture does not cover a large fraction of what we discussed in the lecture and the tut. In the interest of getting back on track with posts the above points will suffice.

The are some crazy examples of how far GUI design can go on Youtube based on Linux: