Part seven: Modern IT Architecture. Desktop Systems (one computer) Desktop Systems (one computer) PC...

51
Part seven: Part seven: Modern IT Architecture Modern IT Architecture
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    225
  • download

    0

Transcript of Part seven: Modern IT Architecture. Desktop Systems (one computer) Desktop Systems (one computer) PC...

Part seven:Part seven:

Modern IT ArchitectureModern IT Architecture

Desktop Systems (one computer)Desktop Systems (one computer) PC HardwarePC Hardware Software SystemsSoftware Systems

Distributed Systems (many Distributed Systems (many computer) computer) Computer Networks and the InternetComputer Networks and the Internet Distributed application and Distributed application and

Client/ServerClient/Server The World Wide Web and e-commerceThe World Wide Web and e-commerce

Databases TechnologyDatabases Technology

1. Database Concepts1. Database Concepts 2. Microsoft Access2. Microsoft Access 3. Database Trends3. Database Trends

FILE ORGANIZATIONFILE ORGANIZATION A computer system organizes data in a A computer system organizes data in a

hierarchy that begins with bits, and proceeds hierarchy that begins with bits, and proceeds to bytes, fields, records, files, and database.to bytes, fields, records, files, and database.

File

Record Record

Field FiledField Field

Byte Byte Byte Byte

Bit BitBit Bit

FILE ORGANIZATIONFILE ORGANIZATION BIT:BIT: Binary Digit (0,1;Y,N;On, Off)Binary Digit (0,1;Y,N;On, Off) BYTE:BYTE: Combination of BITS which Combination of BITS which

represent a CHARACTERrepresent a CHARACTER FIELD:FIELD: A logical grouping of characters A logical grouping of characters

into a word, a group of words, or a into a word, a group of words, or a complete number. complete number.

RECORD:RECORD: Collection of FIELDS which Collection of FIELDS which reflect a TRANSACTIONreflect a TRANSACTION

FILE:FILE: A Collection of Similar RECORDSA Collection of Similar RECORDS DATABASE:DATABASE: An Organization’s An Organization’s

Electronic Library of FILESElectronic Library of FILES

FILE ORGANIZATION FILE ORGANIZATION For For Example,Example, Filed: Student’s name;Filed: Student’s name; Record:Record:

Number Name Course Date Grade

9525012 Zhang Yan

MIS 1998.9 A

A record

•File:Number Name Course Date Grade

9525012 Zhang Yan

MIS 1998.9 A

9525018 Jeff Yu MIS 1998.9 A

9525027 …

He Hui …

MIS …

1998.9 …

B …

FILE ORGANIZATIONFILE ORGANIZATION : Another : Another way of thinking about database way of thinking about database components——components—— ENTITY:ENTITY: Person, Place, Thing, Event Person, Place, Thing, Event

about Which Data Must be Kept ( a about Which Data Must be Kept ( a record describes an entity ) record describes an entity )

ATTRIBUTE:ATTRIBUTE: Description of a Description of a Particular ENTITY Particular ENTITY (( corresponds to corresponds to fields)fields)

KEY FIELDKEY FIELD: : Field Used to Retrieve, Field Used to Retrieve, Update, Sort RECORDUpdate, Sort RECORD

**

FILE ORGANIZATIONFILE ORGANIZATION

FDU NO. HKU NO. NAME SEX TEL(O) TEL(H)

98HM001 93835 Xie Mingqiang M 58702331

98HM002 93840 Yu Bing F 65110968

98hm003 93841 Wang Pei F 58711001-23306

63568504

98HM004 93842 Ge Ruijin M 56938860 56873143

98HM005 93843 Wang Xintao M 58611828 65352394

98HM006 93844 Fu Qiang F 58666060-6007

58836304

Attribute

Record

Key Field Key Field

File

KEY FIELDKEY FIELD

Field in Each RecordField in Each Record Uniquely Identifies THIS RecordUniquely Identifies THIS Record For RETRIEVALFor RETRIEVAL

UPDATINGUPDATING

SORTINGSORTING

**

Accessing Records from Accessing Records from Computer FilesComputer Files:Sequential :Sequential vs. Direct or random file vs. Direct or random file

organization organization SEQUENTIAL:SEQUENTIAL: Data records must be Data records must be retrieved in the same physical retrieved in the same physical sequence in which they are stored. sequence in which they are stored. (Magnetic tape )(Magnetic tape )

DIRECT:DIRECT: Data can be accessed Data can be accessed without regard to physical sequence. without regard to physical sequence. (Disk)(Disk)

**Direct fileorganization

Sequential fileorganization

Problems Arising Problems Arising from the File from the File OrganizationOrganization

Data Redundancy: Data Redundancy: The same piece The same piece of information could be duplicated of information could be duplicated in several files. in several files.

Data Inconsistency:Data Inconsistency: Data Isolation: Data Isolation: Data files are likely Data files are likely

to be organized differently, stored to be organized differently, stored in different formats, and often in different formats, and often physically inaccessible to other physically inaccessible to other applications. applications.

data integrity problem: data integrity problem: It is difficult It is difficult to place data integrity constraints to place data integrity constraints across multiple data files.across multiple data files.

Application and Data Independence: Application and Data Independence: In the file environment, the In the file environment, the applications and their associated applications and their associated data files are dependent on each data files are dependent on each other.other.

Poor security: Poor security: is difficult to enforce in is difficult to enforce in the file environment.the file environment.

Lack of data sharing & availabilityLack of data sharing & availability

Problems Arising from the File Problems Arising from the File OrganizationOrganization Data Redundancy;Data Redundancy; Data Inconsistency;Data Inconsistency; Data Isolation, data integrity problem;Data Isolation, data integrity problem; Application and Data Independence;Application and Data Independence; Security, data sharing problem.Security, data sharing problem.

These problems led to the development of DATABASE

DATABASEDATABASE A Database is an organized logical A Database is an organized logical

grouping of related files.grouping of related files. In a Database, data are stored & In a Database, data are stored &

managed in a convenient form, and managed in a convenient form, and integrated and related so that one set integrated and related so that one set of software programs provides access of software programs provides access to all the data.to all the data.

DATABASE MANAGEMENT DATABASE MANAGEMENT SYSTEM SYSTEM (DBMS)(DBMS)

Software to create & maintain DATA Software to create & maintain DATA enables business applications to enables business applications to extract data independent of specific extract data independent of specific computer programs. computer programs.

registrar

accounting

athletics

Class programs Class file

Accounts programs

Class file

Class file

Sports programs

Computer based files of this type cause problems such as redundancy, inconsistency, and data isolation.

registrar

accounting

athletics

Class programs

Accounts programs

Sports programs

DBMSDatabaseClass file

Accounts fileSports file

DBMS provides access to all data in the database

COMPONENTS OF COMPONENTS OF DBMS:DBMS:

DATA DEFINITION LANGUAGE:DATA DEFINITION LANGUAGE: Defines Data Elements in DatabaseDefines Data Elements in Database

DATA MANIPULATION LANGUAGE:DATA MANIPULATION LANGUAGE: Manipulates Data for ApplicationsManipulates Data for Applications

DATA DICTIONARY:DATA DICTIONARY: Formal Definitions of all Variables in Formal Definitions of all Variables in

Database; Controls Variety of Database Database; Controls Variety of Database ContentsContents

**

TWO VIEWS OF TWO VIEWS OF DATADATA PHYSICAL VIEW: WHERE IS DATA PHYSICALLY?PHYSICAL VIEW: WHERE IS DATA PHYSICALLY?

DRIVE, DISK, SURFACE, TRACK, SECTOR DRIVE, DISK, SURFACE, TRACK, SECTOR (BLOCK), RECORD(BLOCK), RECORD

TAPE, BLOCK, RECORD NUMBER (KEY)TAPE, BLOCK, RECORD NUMBER (KEY) LOGICAL VIEW:LOGICAL VIEW: WHAT DATA IS NEEDED BY WHAT DATA IS NEEDED BY

APPLICATION?APPLICATION? SUCCESSION OF FACTS NEEDED BY SUCCESSION OF FACTS NEEDED BY

APPLICATIONAPPLICATION NAME, TYPE, LENGTH OF FIELDNAME, TYPE, LENGTH OF FIELD

**

Database StructuresDatabase Structures

HIERARCHICAL DATABASEHIERARCHICAL DATABASE

ROOT

FIRST CHILD

2nd CHILD

RatingsRatings SalarySalary

CompensationCompensation JobJobAssignmentsAssignments

PensionPension InsuranceInsurance HealthHealth

BenefitsBenefits

EmployerEmployer

Type of Type of RELATIONSRELATIONS

ONE-TO-ONE: STUDENT ID

ONE-TO-MANY:CLASS

STUDENTA

STUDENTB

STUDENTC

MANY-TO-MANY:

STUDENTA

STUDENTB

STUDENTC

CLASS1

CLASS2

NETWORK DATA MODELNETWORK DATA MODEL

Variation of Hierarchical ModelVariation of Hierarchical Model Useful for many-to-many Useful for many-to-many

relationshipsrelationships

STUDENTA

STUDENTB

STUDENTC

CLASS1

CLASS2

RELATIONAL DATA MODELRELATIONAL DATA MODEL

DATA IN TABLE FORMATDATA IN TABLE FORMAT RELATION: TABLERELATION: TABLE Tuple: ROW (RECORD) IN TABLETuple: ROW (RECORD) IN TABLE Field: COLUMN (ATTRIBUTE) IN TABLEField: COLUMN (ATTRIBUTE) IN TABLE

**HOURS RATE TOTAL

ABLE 40.50$ 10.35$ 419.18$ BAXTER 38.00$ 8.75$ 332.50$

CHEN 42.70$ 9.25$ 394.98$ DENVER 35.90$ 9.50$ 341.05$

The Relational Database MoThe Relational Database Modeldel

The The relational modelrelational model is based on is based on aa simple simple concept of tables in order to capitalize on concept of tables in order to capitalize on characteristics of rows and columns of data, characteristics of rows and columns of data, which is consistent with real-world business which is consistent with real-world business situations. situations.

Tables are calledTables are called relations relations, , and the model is based on tand the model is based on the mathematical theory of sets and relationshe mathematical theory of sets and relations..

A row is called aA row is called a tuple tuple, and a column is called an , and a column is called an attribattributeute..

One of the greatest advantages of the relational mOne of the greatest advantages of the relational model is its conceptual simplicity and the ability to lodel is its conceptual simplicity and the ability to link records in a way that is not predefined. ink records in a way that is not predefined.

Example DB: Fortune Example DB: Fortune 500 Companies500 Companies

companycompany

industry codesindustry codes

allied

boeing

...

compname sales assets netincome empls indcode yr

9115000

9035000

13271000

7593000

-279000

292000

143800

95700

37

37

85

82

42

44

...

indcode indname

pharmaceuticals

computers

The Relational The Relational AbstractionAbstraction

Information is in tablesInformation is in tables Also called (base) relationsAlso called (base) relations

Columns define attributesColumns define attributes Also called fields or domainsAlso called fields or domains

Rows define recordsRows define records Also called tuplesAlso called tuples

Cells contain valuesCells contain values All cells in column have information of same tyAll cells in column have information of same ty

pepe e.g., integer, floating point, text, datee.g., integer, floating point, text, date

Operations on TablesOperations on Tables Add new rows (or sometimes columns)Add new rows (or sometimes columns)

Modify existing rowsModify existing rows Choose a subset of columnsChoose a subset of columns Choose a subset of rowsChoose a subset of rows Combine rows (e.g., sum values in a Combine rows (e.g., sum values in a

column)column) Combine columnsCombine columns Combine two tables (join)Combine two tables (join) No operations to combine individual cellsNo operations to combine individual cells

Unlike spreadsheetUnlike spreadsheet

Operating on Databases: Operating on Databases: SQLSQL

Every abstraction needs an interface Every abstraction needs an interface through which users invoke abstract through which users invoke abstract operationsoperations

graphical interfacegraphical interface languagelanguage

Structured Query LanguageStructured Query Language Has all those operationsHas all those operations We'll focus only on queriesWe'll focus only on queries

Query = questionQuery = question Extract some data from one or more tables to Extract some data from one or more tables to

answer a particular questionanswer a particular question

Physical vs. Logical Data ViePhysical vs. Logical Data Vieww

How can a single, unified database meet the How can a single, unified database meet the differing requirements of so many users?differing requirements of so many users?

Minimizes these problems by providing two Minimizes these problems by providing two “views” of the database data: “views” of the database data: The physical viewThe physical view deals with the actual, physical deals with the actual, physical

arrangement and location of data in the arrangement and location of data in the direct acdirect access storage devicescess storage devices (DASD). (DASD).

The logical view,The logical view, or user’s view, represents data or user’s view, represents data in a format that is meaningful to a user and to the in a format that is meaningful to a user and to the software programs that process that data. software programs that process that data.

2. Microsoft Access2. Microsoft Access

Features:Features: Create/Modify databasesCreate/Modify databases Specify/Run queriesSpecify/Run queries Design/Print reportsDesign/Print reports Design graphical user interfaces Design graphical user interfaces

around databasesaround databases Forms for entering, viewing dataForms for entering, viewing data

An IntroductionAn Introduction

Microsoft Access GUI Microsoft Access GUI BuildingBuilding

A GUI is A Set of FormsA GUI is A Set of Forms

FormsForms Used forUsed for

Entering data to tablesEntering data to tables Displaying data from tables or queries in a nicer Displaying data from tables or queries in a nicer

wayway Each form is usually “bound” to a table or Each form is usually “bound” to a table or

queryquery every “screenful” in the form displays the conevery “screenful” in the form displays the con

tents of one record in that table or querytents of one record in that table or query

Forms contain ControlsForms contain Controls

Labels

Buttons

Text boxes

Pictures

ControlsControls

Forms contain controlsForms contain controls Text labelsText labels Text boxesText boxes List boxesList boxes Combo boxesCombo boxes Option groupsOption groups ButtonsButtons ““Objects” created by other applicationsObjects” created by other applications

PicturesPictures Word documentsWord documents SpreadsheetsSpreadsheets

Decorative lines and boxesDecorative lines and boxes

Every Control has a set Every Control has a set of Propertiesof Properties

Properties determineProperties determine where the control gets its data fromwhere the control gets its data from how it is displayedhow it is displayed

Usually properties are automatically Usually properties are automatically set by wizardsset by wizards

users only need to occasionally fine-users only need to occasionally fine-tune themtune them

Creating FormsCreating Forms

Easy way: use an Access WizardEasy way: use an Access Wizard Difficult way: manually add controlsDifficult way: manually add controls

Editing a form’s designEditing a form’s design Select “Design View”Select “Design View” Modify controlsModify controls

move them, resize them, delete themmove them, resize them, delete them Modify propertiesModify properties

right-click on a control to get to its property right-click on a control to get to its property listlist

Add new controlsAdd new controls make Toolbox visible by selecting it from the make Toolbox visible by selecting it from the

“View” menu“View” menu drag and drop new controls from the Toolboxdrag and drop new controls from the Toolbox set the properties of the new controlsset the properties of the new controls

ReportsReports

Specify the structure of printed reportsSpecify the structure of printed reports Similar structure to formsSimilar structure to forms

Every report is bound to a table or queryEvery report is bound to a table or query Reports have controls, where every control Reports have controls, where every control

specifies how a specific field of a record in specifies how a specific field of a record in the table/query will appearthe table/query will appear

Access provides wizards for easy creation Access provides wizards for easy creation of new reportsof new reports

Users typically only need to fine-tune themUsers typically only need to fine-tune them

Report ExamplesReport Examples

Category Sales for 1995Category Sales for 1995 New report, select Report WizardNew report, select Report Wizard Base on query “Category Sales for 1995”Base on query “Category Sales for 1995” Select both fields, no grouping, sort by Select both fields, no grouping, sort by

“Category Name”“Category Name” Tabular Layout, Corporate StyleTabular Layout, Corporate Style Store as “Category Sales for 1995”Store as “Category Sales for 1995” Switch to “Design View”, add a text box in Switch to “Design View”, add a text box in

Report Footer to show “Total Sales”Report Footer to show “Total Sales”

Access GUI SummaryAccess GUI Summary1. A GUI is a set of forms

2. A form displaysrecords from a table or query

3. A form has a set of controls

4. A control displaysdata from a fieldor accepts user input

6. User interaction with forms/controlsgenerates events

7. Macros can beattached to form/controlevent properties

5. A control hasa set of properties

MacrosMacros

Allow programmers to build Allow programmers to build functionality into MS Access formsfunctionality into MS Access forms

Connect to forms and controls Connect to forms and controls through eventsthrough events

Typical Uses of MacrosTypical Uses of Macros

Open Forms from inside other FormsOpen Forms from inside other Forms Synchronize data in two open FormsSynchronize data in two open Forms

when data changes in one form, when data changes in one form, corresponding data also changes on the corresponding data also changes on the other formother form

Find a record which satisfies given Find a record which satisfies given propertiesproperties

more user-friendly that writing queriesmore user-friendly that writing queries Validating input dataValidating input data

EventsEvents

““Certain things that happen on the form Certain things that happen on the form or control”or control”

Mouse clicks/double clicksMouse clicks/double clicks Form open/closeForm open/close Control value changedControl value changed etc.etc.

Controls have one property per event typeControls have one property per event type Determines what happens when event is Determines what happens when event is

triggeredtriggered Can be connected to a macroCan be connected to a macro

Most Important Event Most Important Event PropertiesProperties

On ClickOn Click On DoubleClickOn DoubleClick

triggered when we click/doubleclick on a controtriggered when we click/doubleclick on a controll

After UpdateAfter Update triggered after we have changed the value of a ctriggered after we have changed the value of a c

ontrolontrol

On CurrentOn Current Triggered every time a new record is displayed iTriggered every time a new record is displayed i

n a Formn a Form

Macro StructureMacro Structure

Each macro is a set of sequential Each macro is a set of sequential actionsactions

Each action has a set of parametersEach action has a set of parameters Actions may (optionally) be Actions may (optionally) be

conditionalconditional Macros can be named and saved Macros can be named and saved

(just as tables,queries, forms)(just as tables,queries, forms)

Macro ExampleMacro ExampleConditions Actions Comments

Parametersforcurrentaction

Explanationofparameters

3. Database Trends(1)3. Database Trends(1)

The evolution of Database SystemThe evolution of Database System DataData

Simple data => Multimedia data, Simple data => Multimedia data, KnowledgeKnowledge

Model Model Relational model => OO modelRelational model => OO model

Object relational modelObject relational model

Databases Trends (2)Databases Trends (2) ApplicationApplication

OLTP => OLAPOLTP => OLAP Data organizationData organization

Database => Data warehouse, Data Database => Data warehouse, Data MartsMarts

Query languageQuery language SQL => DeductiveSQL => Deductive

Emerging Database ModelsEmerging Database Models

The most common database The most common database models are:models are:

Multimedia databaseMultimedia database Deductive databasesDeductive databases Object-oriented databasesObject-oriented databases Multimedia and hypermedia dMultimedia and hypermedia d

atabasesatabases

Object-Oriented Database MObject-Oriented Database Modelodel

Object-oriented (OO) databases store both data Object-oriented (OO) databases store both data and procedures acting on the data, as objects. and procedures acting on the data, as objects.

The OO database can be particularly helpful in The OO database can be particularly helpful in multimedia environments, such as in manufacmultimedia environments, such as in manufacturing sites using CAD/CAM.turing sites using CAD/CAM.

OO databases can be particularly useful in supOO databases can be particularly useful in supporting temporal and spatial(porting temporal and spatial( 时空) 时空) dimensiodimensions. ns.

Terminology in the OO model includes:Terminology in the OO model includes: objects, attributes, classes, methods, and messages.objects, attributes, classes, methods, and messages.

Hypermedia Database ModeHypermedia Database Modell

The The hypermedia database modelhypermedia database model stor stores chunks of information in the form oes chunks of information in the form of nodes connected by links established f nodes connected by links established by the user. by the user.

The nodes can contain text, graphics, sThe nodes can contain text, graphics, sound, full-motion video, or executable ound, full-motion video, or executable computer programs. computer programs.

Users can branch to related informatioUsers can branch to related information in any kind of relationship.n in any kind of relationship.

Thanks for Your AttentionThanks for Your Attention