320 likes | 406 Views
Week 1 January 25. Introduction to 4GLs 4GLs versus 3GLs File-based systems versus database. PowerBuilder 4GL Model. Interface. Interface. User. Process. Data. Program. Interface. Conventional File-Based Applications. Records. Text. File-based. Procedural Code. Terminals.
E N D
Week 1January 25 Introduction to 4GLs 4GLs versus 3GLs File-based systems versus database
PowerBuilder 4GL Model Interface Interface User Process Data Program
Interface Conventional File-Based Applications Records Text File-based Procedural Code Terminals Interface User Process Data Text Procedural Records • 80 x 24 Screen • Characters • Function keys • 3GL program • Files • Hierarchical database
Text-Based Interactive Application Press function key corresponding to a menu option Enter letters corresponding to a menu options Function keys
File-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
File-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
Data 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
Interface 4GL Applications GUI Sets Work- stations SQL Interface Database User Process Data GUI Event Driven Set • Windows • Objects • Pictures and graphics • Point and click • Code • RDBMS
Interface Oracle Developer Applications Data GUI Sets Interface Query User Process Data
Interface Interface Oracle Developer Applications Presentation Data Source GUI Sets File Account #: User Process Data • Reports • Forms • Graphs • Triggers (PL/SQL) • Query
Database • “A shared collection of logically related data (and a description of this data), designed to meet the information needs of an organization.”
Database Management Queries Customer Orders Application Programs DBMS Order Items Products Manufacturers • DDL • DML • Controlled access Other Software Central Repository Single Access Multitude of Applications
Data Abstraction • Separation between the data’s 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
Data Abstraction • Separation between the data’s 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
Data Abstraction • Separation between the data’s structure (definition) and the application programs Data and data definitions Database Application Application Application
Advantages 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
Disadvantages of the Database Approach • Complexity • Size • Cost of DBMS • Additional hardware costs • Cost of conversion • Performance • Higher impact of failureStair, 1995
What 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
For 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
Control 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
Control 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
Control 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
What 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-ID=1234
Characteristics 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
Characteristics 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
Other CharacteristicsApplicable to Today’s 4GLs • Menu driven • Database oriented • Embedded query commands (e.g., SQL) • Retrieval focused • Query capabilities • Human factors designed Martin, 1991
Menu object Graphic background Event-driven command buttons
4GLs: 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
4GLs: 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
Oracle Developer • Forms (interactive) • Presenting information and entering data online • Reports (reporting) • Page-oriented display of information • Graphics (charts) • Graphic representation of data