1 Ching, Ph.D. • MIS Dept. • California State University, Sacramento Ching, Ph.D. • MIS Dept. • California State University, Sacramento Week 1 Week 1 January 25 January 25 • Introduction to 4GLs Introduction to 4GLs • 4GLs versus 3GLs 4GLs versus 3GLs • File-based systems versus File-based systems versus database database
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. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Week 1Week 1January 25January 25
•Introduction to 4GLsIntroduction to 4GLs•4GLs versus 3GLs4GLs versus 3GLs
•File-based systems versus databaseFile-based systems versus database
2R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
PowerBuilder 4GL ModelPowerBuilder 4GL Model
UserUser ProcessProcess DataData
Inte
rfac
eIn
terf
ace
Inte
rfac
eIn
terf
ace
ProgramProgram
3R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Inte
rfac
e
UserUser ProcessProcess DataData
TextText ProceduralProcedural RecordsRecords
• 80 x 24 Screen80 x 24 Screen• CharactersCharacters• Function keysFunction keys
One file, one program, one outputOne file, one program, one output
Customer Customer Account Account
FileFile
Customer Customer Mailing Mailing List FileList File
6R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
File-Based SystemsFile-Based Systems
• Records contain Records contain logically related logically related datadata
• Limitations:Limitations:
– Separation and isolation of dataSeparation and isolation of data
– Duplication of dataDuplication of data
• Loss of data integrityLoss of data integrity
– Data dependenceData dependence
– Incompatibility of filesIncompatibility of files
– Fixed queries/proliferation of application programsFixed queries/proliferation of application programs
7R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Data RedundancyData Redundancy
• Customer Order FileCustomer Order File– PO numberPO number– Customer account numberCustomer account number– Customer name, address, city, state, zip codeCustomer name, address, city, state, zip code– Order dateOrder date– Product code, product description, price, unitProduct code, product description, price, unit
• Customer Account FileCustomer Account File– Account NumberAccount Number– Customer name, mailing address, city, state, zip codeCustomer name, mailing address, city, state, zip code
• Customer Mailing List FileCustomer Mailing List File– Customer name, mailing address, city, state, zip codeCustomer name, mailing address, city, state, zip code
8R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
4GL Applications4GL Applications
User Process Data
GUIGUI Event DrivenEvent Driven SetSet
• WindowsWindows• ObjectsObjects• Pictures and graphicsPictures and graphics• Point and clickPoint and click
• RDBMSRDBMS
Inte
rfac
e Work
-
Work
-
statio
ns
statio
nsGUI
Inte
rfac
e
Sets
SQLSQL
• CodeCode
DatabaseDatabase
9R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
11R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
DatabaseDatabase
• ““A shared collection of logically related data (and a A shared collection of logically related data (and a description of this data), designed to meet the information description of this data), designed to meet the information needs of an organization.”needs of an organization.”
12R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Central RepositoryCentral Repository Single AccessSingle Access Multitude of Multitude of ApplicationsApplications
13R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Data AbstractionData Abstraction
• Separation between the data’s structure (definition) and the Separation between the data’s structure (definition) and the application programsapplication programs
Tightly binds the Tightly binds the data file and data file and
programprogram
In a procedural language program such as COBOL...In a procedural language program such as COBOL...
14R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Data AbstractionData Abstraction
• Separation between the data’s structure (definition) and the Separation between the data’s structure (definition) and the application programsapplication programs
Tightly binds the Tightly binds the data file and data file and
programprogram
DataDataOutputOutput
ProgramProgram
In a procedural language program such as COBOL...In a procedural language program such as COBOL...
15R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
DatabaseDatabase
Data and data definitionsData and data definitions
ApplicationApplication
ApplicationApplication
ApplicationApplication
Data AbstractionData Abstraction
• Separation between the data’s structure (definition) and the Separation between the data’s structure (definition) and the application programsapplication programs
16R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Advantages of the Database ApproachAdvantages of the Database Approach
• Reduced redundancyReduced redundancy
• Data consistency Data consistency
• Greater informational gainGreater informational gain
– Better access to data and informationBetter access to data and information
• Improved data integrityImproved data integrity
• Improved access and securityImproved access and security
• Enforcement of standardsEnforcement of standards
• Easier modification and updatingEasier modification and updating
• Data and program independenceData and program independence
• Standardization of data accessStandardization of data access
17R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Disadvantages of the Database ApproachDisadvantages of the Database Approach
• Higher impact of failureHigher impact of failure
Stair, 1995Stair, 1995
18R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
What is a Fourth Generation Language What is a Fourth Generation Language (4GL)?(4GL)?
• ...a programming language that is less procedural and more ...a programming language that is less procedural and more English-like than third generation languages. It English-like than third generation languages. It emphasizes what is to be done more than how statements emphasizes what is to be done more than how statements are to be written.are to be written.
Stair, 1995 Stair, 1995
19R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
For example...For example...
COBOLCOBOLOPEN INPUT EMPLOYEE-FILE.OPEN INPUT EMPLOYEE-FILE.READ EMPLOYEE-FILE.READ EMPLOYEE-FILE.PERFORM WHILE NOT EOFPERFORM WHILE NOT EOF IF EMP-ID = SEARCH-KEYIF EMP-ID = SEARCH-KEY DISPLAY EMP-ID " " DISPLAY EMP-ID " " EMP-FIRST-NAME " "EMP-FIRST-NAME " " EMP-LAST-NAME " "EMP-LAST-NAME " " EMP-YTD-PAYEMP-YTD-PAY END-IFEND-IF READ EMPLOYEE-FILEREAD EMPLOYEE-FILEEND-PERFORM.END-PERFORM.
Three Control Structures:Three Control Structures:• SequenceSequence• IterationIteration• DecisionDecision
20R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Control StructuresControl Structures
COBOLCOBOLOPEN INPUT EMPLOYEE-FILE.OPEN INPUT EMPLOYEE-FILE.READ EMPLOYEE-FILE.READ EMPLOYEE-FILE.PERFORM WHILE NOT EOFPERFORM WHILE NOT EOF IF EMP-ID = SEARCH-KEYIF EMP-ID = SEARCH-KEY DISPLAY EMP-ID " " DISPLAY EMP-ID " " EMP-FIRST-NAME " "EMP-FIRST-NAME " " EMP-LAST-NAME " "EMP-LAST-NAME " " EMP-YTD-PAYEMP-YTD-PAY END-IFEND-IF READ EMPLOYEE-FILEREAD EMPLOYEE-FILEEND-PERFORM.END-PERFORM.
SequenceSequence
21R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Control StructuresControl Structures
COBOLCOBOLOPEN INPUT EMPLOYEE-FILE.OPEN INPUT EMPLOYEE-FILE.READ EMPLOYEE-FILE.READ EMPLOYEE-FILE.PERFORM WHILE NOT EOFPERFORM WHILE NOT EOF IF EMP-ID = SEARCH-KEYIF EMP-ID = SEARCH-KEY DISPLAY EMP-ID " " DISPLAY EMP-ID " " EMP-FIRST-NAME " "EMP-FIRST-NAME " " EMP-LAST-NAME " "EMP-LAST-NAME " " EMP-YTD-PAYEMP-YTD-PAY END-IFEND-IF READ EMPLOYEE-FILEREAD EMPLOYEE-FILEEND-PERFORM.END-PERFORM.
IterationIteration
22R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Control StructuresControl Structures
COBOLCOBOLOPEN INPUT EMPLOYEE-FILE.OPEN INPUT EMPLOYEE-FILE.READ EMPLOYEE-FILE.READ EMPLOYEE-FILE.PERFORM WHILE NOT EOFPERFORM WHILE NOT EOF IF EMP-ID = SEARCH-KEYIF EMP-ID = SEARCH-KEY DISPLAY EMP-ID " " DISPLAY EMP-ID " " EMP-FIRST-NAME " "EMP-FIRST-NAME " " EMP-LAST-NAME " "EMP-LAST-NAME " " EMP-YTD-PAYEMP-YTD-PAY END-IFEND-IF READ EMPLOYEE-FILEREAD EMPLOYEE-FILEEND-PERFORM.END-PERFORM.
DecisionDecision
FalseFalse
TrueTrue
ConditionCondition
23R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
WhatWhat as Opposed to as Opposed to HowHow
COBOLCOBOLOPEN INPUT EMPLOYEE-FILE.OPEN INPUT EMPLOYEE-FILE.READ EMPLOYEE-FILE.READ EMPLOYEE-FILE.PERFORM WHILE NOT EOFPERFORM WHILE NOT EOF IF EMP-ID = SEARCH-KEYIF EMP-ID = SEARCH-KEY DISPLAY EMP-ID " " DISPLAY EMP-ID " " EMP-FIRST-NAME " "EMP-FIRST-NAME " " EMP-LAST-NAME " "EMP-LAST-NAME " " EMP-YTD-PAYEMP-YTD-PAY END-IFEND-IF READ EMPLOYEE-FILEREAD EMPLOYEE-FILEEND-PERFORM.END-PERFORM.
SQLSQL
SELECT EMP-ID,SELECT EMP-ID, EMP-FIRST-NAME,EMP-FIRST-NAME, EMP-LAST-NAME,EMP-LAST-NAME, EMP-YTD-PAYEMP-YTD-PAY FROM EMPLOYEEFROM EMPLOYEE WHERE EMP-ID=1234WHERE EMP-ID=1234
How to WhatHow to What
24R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Characteristics of 4GLsCharacteristics of 4GLs
• User friendlyUser friendly– Less syntax-boundLess syntax-bound– Fewer programming skills requiredFewer programming skills required
• Non-proceduralNon-procedural– Emphasis is on Emphasis is on whatwhat (outs are desired) rather than (outs are desired) rather than howhow
(programming statements should be written)(programming statements should be written)– Shorter application development timeShorter application development time
• GUI (graphical user interface)GUI (graphical user interface)– Incorporate the use of the mouse (point and click)Incorporate the use of the mouse (point and click)– Involve the use of iconsInvolve the use of icons
25R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Characteristics of 4GLsCharacteristics of 4GLs
• Function-basedFunction-based
– User calls upon pre-programmed functionsUser calls upon pre-programmed functions
• Specifies the arguments and parameters which Specifies the arguments and parameters which define the scope of the results define the scope of the results
– Graphical or tabular output Graphical or tabular output
• Popular for developing client/server applicationsPopular for developing client/server applications
– Toted asToted as client/server solutions client/server solutions
26R. Ching, Ph.D. • MIS Dept. • California State University, SacramentoR. Ching, Ph.D. • MIS Dept. • California State University, Sacramento
Other CharacteristicsOther CharacteristicsApplicable to Today’s 4GLsApplicable to Today’s 4GLs