Title: Week 1 January 25
1Week 1January 25
- Introduction to 4GLs
- 4GLs versus 3GLs
- File-based systems versus database
2PowerBuilder 4GL Model
Interface
Interface
User
Process
Data
Program
3Conventional File-Based Applications
Records
Text
File-based
Procedural Code
Terminals
Interface
User
Process
Data
Text
Procedural
Records
- 80 x 24 Screen
- Characters
- Function keys
- Files
- Hierarchical database
4Text-Based Interactive Application
Press function key corresponding to a menu option
Enter letters corresponding to a menu options
Function keys
5File-Based System
PO Program
Invoice
Customer Order File
One file, one program, one output
Account Report
Customer Accounts Program
Customer Account File
Customer Mailings Program
Customer Mailing List File
Mailing List
6File-Based Systems
- Records contain logically related data
- Limitations
- Separation and isolation of data
- Duplication of data
- Loss of data integrity
- Data dependence
- Incompatibility of files
- Fixed queries/proliferation of application
programs
7Data Redundancy
- Customer Order File
- PO number
- Customer account number
- Customer name, address, city, state, zip code
- Order date
- Product code, product description, price, unit
- Customer Account File
- Account Number
- Customer name, mailing address, city, state, zip
code - Customer Mailing List File
- Customer name, mailing address, city, state, zip
code
84GL Applications
GUI
Sets
Work- stations
SQL
Interface
Database
User
Process
Data
GUI
Event Driven
Set
- Windows
- Objects
- Pictures and graphics
- Point and click
9Oracle Developer Applications
Data
GUI
Sets
Interface
Query
User
Data
Process
10Oracle Developer Applications
Presentation
Data Source
GUI
Sets
File
Account
User
Process
Data
11Database
- A shared collection of logically related data
(and a description of this data), designed to
meet the information needs of an organization.
12Database
Management Queries
Customer
Orders
Application Programs
DBMS
Order Items
Products
Manufacturers
- DDL
- DML
- Controlled access
Other Software
Central Repository
Single Access
Multitude of Applications
13Data Abstraction
- Separation between the datas structure
(definition) and the application programs
In a procedural language program such as COBOL...
FD Master-File. 01 Master-Record. 05 ID PIC
X(10). 05 Customer-Fname PIC
X(25). . . .
Tightly binds the data file and program
14Data Abstraction
- Separation between the datas structure
(definition) and the application programs
In a procedural language program such as COBOL...
Data
FD Master-File. 01 Master-Record. 05 ID PIC
X(10). 05 Customer-Fname PIC
X(25). . . .
Tightly binds the data file and program
Output
Program
15Data Abstraction
- Separation between the datas structure
(definition) and the application programs
Data and data definitions
Database
Application
Application
Application
16Advantages of the Database Approach
- Reduced redundancy
- Data consistency
- Greater informational gain
- Better access to data and information
- Improved data integrity
- Improved access and security
- Enforcement of standards
- Easier modification and updating
- Data and program independence
- Standardization of data access
17Disadvantages of the Database Approach
- Complexity
- Size
- Cost of DBMS
- Additional hardware costs
- Cost of conversion
- Performance
- Higher impact of failure Stair, 1995
18What is a Fourth Generation Language (4GL)?
- ...a programming language that is less procedural
and more English-like than third generation
languages. It emphasizes what is to be done more
than how statements are to be written.
Stair, 1995
19For example...
COBOL OPEN INPUT EMPLOYEE-FILE. READ
EMPLOYEE-FILE. PERFORM WHILE NOT EOF IF
EMP-ID SEARCH-KEY DISPLAY EMP-ID " "
EMP-FIRST-NAME " "
EMP-LAST-NAME " " EMP-YTD-PAY
END-IF READ EMPLOYEE-FILE END-PERFORM.
- Three Control Structures
- Sequence
- Iteration
- Decision
20Control Structures
COBOL OPEN INPUT EMPLOYEE-FILE. READ
EMPLOYEE-FILE. PERFORM WHILE NOT EOF IF
EMP-ID SEARCH-KEY DISPLAY EMP-ID " "
EMP-FIRST-NAME " "
EMP-LAST-NAME " " EMP-YTD-PAY
END-IF READ EMPLOYEE-FILE END-PERFORM.
Sequence
21Control Structures
COBOL OPEN INPUT EMPLOYEE-FILE. READ
EMPLOYEE-FILE. PERFORM WHILE NOT EOF IF
EMP-ID SEARCH-KEY DISPLAY EMP-ID " "
EMP-FIRST-NAME " "
EMP-LAST-NAME " " EMP-YTD-PAY
END-IF READ EMPLOYEE-FILE END-PERFORM.
Iteration
22Control Structures
COBOL OPEN INPUT EMPLOYEE-FILE. READ
EMPLOYEE-FILE. PERFORM WHILE NOT EOF IF
EMP-ID SEARCH-KEY DISPLAY EMP-ID " "
EMP-FIRST-NAME " "
EMP-LAST-NAME " " EMP-YTD-PAY
END-IF READ EMPLOYEE-FILE END-PERFORM.
Condition
False
True
Decision
23What as Opposed to How
How to What
COBOL OPEN INPUT EMPLOYEE-FILE. READ
EMPLOYEE-FILE. PERFORM WHILE NOT EOF IF
EMP-ID SEARCH-KEY DISPLAY EMP-ID " "
EMP-FIRST-NAME " "
EMP-LAST-NAME " " EMP-YTD-PAY
END-IF READ EMPLOYEE-FILE END-PERFORM.
SQL SELECT EMP-ID, EMP-FIRST-NAME,
EMP-LAST-NAME, EMP-YTD-PAY FROM
EMPLOYEE WHERE EMP-ID1234
24Characteristics of 4GLs
- User friendly
- Less syntax-bound
- Fewer programming skills required
- Non-procedural
- Emphasis is on what (outs are desired) rather
than how (programming statements should be
written) - Shorter application development time
- GUI (graphical user interface)
- Incorporate the use of the mouse (point and
click) - Involve the use of icons
25Characteristics of 4GLs
- Function-based
- User calls upon pre-programmed functions
- Specifies the arguments and parameters which
define the scope of the results - Graphical or tabular output
- Popular for developing client/server applications
- Toted as client/server solutions
26Other CharacteristicsApplicable to Todays 4GLs
- Menu driven
- Database oriented
- Embedded query commands (e.g., SQL)
- Retrieval focused
- Query capabilities
- Human factors designed Martin, 1991
27Menu object
Graphic background
Event-driven command buttons
28SQL statement retrieves customer data
294GLs Pros and Cons
- Good for ad hoc and nonrecurring reporting
- One-time information reporting
- Good for prototyping and end-user computing (EUC)
application development - Discovering specifications (prototyping)
- Developing and implementing single-user
applications (EUC) - Short learning curve
304GLs Pros and Cons
- Poor computing efficiency
- Not appropriate for
- Processing voluminous amounts of data
- Transaction processing
- Scheduled reporting
- Difficult to enforce organizational computing
standards - Very difficult to debug
- Very difficult to maintain
31Oracle Developer
- Forms (interactive)
- Presenting information and entering data online
- Reports (reporting)
- Page-oriented display of information
- Graphics (charts)
- Graphic representation of data
32(No Transcript)