Download presentation
Presentation is loading. Please wait.
1
Part seven: Modern IT Architecture
2
Desktop Systems (one computer) Desktop Systems (one computer) PC Hardware PC Hardware Software Systems Software Systems Distributed Systems (many computer) Distributed Systems (many computer) Computer Networks and the Internet Computer Networks and the Internet Distributed application and Client/Server Distributed application and Client/Server The World Wide Web and e-commerce The World Wide Web and e-commerce
3
Databases Technology 1. Database Concepts 1. Database Concepts 2. Microsoft Access 2. Microsoft Access 3. Database Trends 3. Database Trends
4
FILE ORGANIZATION A computer system organizes data in a hierarchy that begins with bits, and proceeds to bytes, fields, records, files, and database. A computer system organizes data in a hierarchy that begins with bits, and proceeds to bytes, fields, records, files, and database. File Record FieldFiledField Byte Bit
5
FILE ORGANIZATION BIT: Binary Digit (0,1;Y,N;On, Off) BIT: Binary Digit (0,1;Y,N;On, Off) BYTE: Combination of BITS which BYTE: Combination of BITS which represent a CHARACTER represent a CHARACTER FIELD: A logical grouping of characters into a word, a group of words, or a complete number. FIELD: A logical grouping of characters into a word, a group of words, or a complete number. RECORD: Collection of FIELDS which reflect a TRANSACTION RECORD: Collection of FIELDS which reflect a TRANSACTION FILE: A Collection of Similar RECORDS FILE: A Collection of Similar RECORDS DATABASE: An Organization’s Electronic Library of FILES DATABASE: An Organization’s Electronic Library of FILES
6
FILE ORGANIZATION For Example, Filed: Student ’ s name; Filed: Student ’ s name; Record: Record: A record File:
7
FILE ORGANIZATION : Another way of thinking about database components —— ENTITY: Person, Place, Thing, Event about Which Data Must be Kept ( a record describes an entity ) ENTITY: Person, Place, Thing, Event about Which Data Must be Kept ( a record describes an entity ) ATTRIBUTE: Description of a Particular ENTITY ( corresponds to fields) ATTRIBUTE: Description of a Particular ENTITY ( corresponds to fields) KEY FIELD: Field Used to Retrieve, Update, Sort RECORD KEY FIELD: Field Used to Retrieve, Update, Sort RECORD*
8
FILE ORGANIZATION Attribute Record Key Field File
9
KEY FIELD Field in Each Record Field in Each Record Uniquely Identifies THIS Record Uniquely Identifies THIS Record For RETRIEVAL For RETRIEVAL UPDATING UPDATINGSORTING*
10
Accessing Records from Computer Files:Sequential vs. Direct or random file organization SEQUENTIAL: Data records must be retrieved in the same physical sequence in which they are stored. (Magnetic tape ) SEQUENTIAL: Data records must be retrieved in the same physical sequence in which they are stored. (Magnetic tape ) DIRECT: Data can be accessed without regard to physical sequence. (Disk) DIRECT: Data can be accessed without regard to physical sequence. (Disk)* Direct file organization Sequential file organization
11
Problems Arising from the File Organization Data Redundancy: The same piece of information could be duplicated in several files. Data Redundancy: The same piece of information could be duplicated in several files. Data Inconsistency: Data Inconsistency: Data Isolation: Data files are likely to be organized differently, stored in different formats, and often physically inaccessible to other applications. Data Isolation: Data files are likely to be organized differently, stored in different formats, and often physically inaccessible to other applications.
12
data integrity problem: It is difficult to place data integrity constraints across multiple data files. data integrity problem: It is difficult to place data integrity constraints across multiple data files. Application and Data Independence: In the file environment, the applications and their associated data files are dependent on each other. Application and Data Independence: In the file environment, the applications and their associated data files are dependent on each other. Poor security: is difficult to enforce in the file environment. Poor security: is difficult to enforce in the file environment. Lack of data sharing & availability Lack of data sharing & availability
13
Problems Arising from the File Organization 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
14
DATABASE A Database is an organized logical grouping of related files. A Database is an organized logical grouping of related files. In a Database, data are stored & managed in a convenient form, and integrated and related so that one set of software programs provides access to all the data. In a Database, data are stored & managed in a convenient form, and integrated and related so that one set of software programs provides access to all the data.
15
DATABASE MANAGEMENT SYSTEM (DBMS) Software to create & maintain DATA enables business applications to extract data independent of specific computer programs. Software to create & maintain DATA enables business applications to extract data independent of specific computer programs.
16
registrar accounting athletics Class programs Class file Accounts programs 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 DBMS Database Class file Accounts file Sports file DBMS provides access to all data in the database
17
COMPONENTS OF DBMS: DATA DEFINITION LANGUAGE: DATA DEFINITION LANGUAGE: Defines Data Elements in Database Defines Data Elements in Database DATA MANIPULATION LANGUAGE: DATA MANIPULATION LANGUAGE: Manipulates Data for Applications Manipulates Data for Applications DATA DICTIONARY: DATA DICTIONARY: Formal Definitions of all Variables in Database; Controls Variety of Database Contents Formal Definitions of all Variables in Database; Controls Variety of Database Contents*
18
TWO VIEWS OF DATA PHYSICAL VIEW: WHERE IS DATA PHYSICALLY? PHYSICAL VIEW: WHERE IS DATA PHYSICALLY? DRIVE, DISK, SURFACE, TRACK, SECTOR (BLOCK), RECORD DRIVE, DISK, SURFACE, TRACK, SECTOR (BLOCK), RECORD TAPE, BLOCK, RECORD NUMBER (KEY) TAPE, BLOCK, RECORD NUMBER (KEY) LOGICAL VIEW: WHAT DATA IS NEEDED BY APPLICATION? LOGICAL VIEW: WHAT DATA IS NEEDED BY APPLICATION? SUCCESSION OF FACTS NEEDED BY APPLICATION SUCCESSION OF FACTS NEEDED BY APPLICATION NAME, TYPE, LENGTH OF FIELD NAME, TYPE, LENGTH OF FIELD*
19
Database Structures
20
HIERARCHICAL DATABASE ROOT FIRST CHILD 2nd CHILD RatingsSalary Compensation Job Assignments Pension InsuranceHealth Benefits Employer
21
Type of RELATIONS ONE-TO-ONE: STUDENT ID ONE-TO-MANY: CLASS STUDENT A STUDENT B STUDENT C MANY-TO-MANY: STUDENT A STUDENT B STUDENT C CLASS 1 CLASS 2
22
NETWORK DATA MODEL Variation of Hierarchical Model Variation of Hierarchical Model Useful for many-to-many relationships Useful for many-to-many relationships STUDENT A STUDENT B STUDENT C CLASS 1 CLASS 2
23
RELATIONAL DATA MODEL DATA IN TABLE FORMAT DATA IN TABLE FORMAT RELATION: TABLE RELATION: TABLE Tuple: ROW (RECORD) IN TABLE Tuple: ROW (RECORD) IN TABLE Field: COLUMN (ATTRIBUTE) IN TABLE Field: COLUMN (ATTRIBUTE) IN TABLE*
24
The Relational Database Model The relational model is based on a simple concept of tables in order to capitalize on characteristics of rows and columns of data, which is consistent with real-world business situations. Tables are called relations, and the model is based on the mathematical theory of sets and relations. Tables are called relations, and the model is based on the mathematical theory of sets and relations. A row is called a tuple, and a column is called an attribute. A row is called a tuple, and a column is called an attribute. One of the greatest advantages of the relational model is its conceptual simplicity and the ability to link records in a way that is not predefined.
25
Example DB: Fortune 500 Companies company company industry codes industry codes allied boeing... compnamesalesassetsnetincomeemplsindcodeyr 9115000 9035000 13271000 7593000 -279000 292000 143800 95700 37 85 82 42 44... indcodeindname pharmaceuticals computers
26
The Relational Abstraction Information is in tables Information is in tables Also called (base) relations Also called (base) relations Columns define attributes Columns define attributes Also called fields or domains Also called fields or domains Rows define records Rows define records Also called tuples Also called tuples Cells contain values Cells contain values All cells in column have information of same type All cells in column have information of same type e.g., integer, floating point, text, date e.g., integer, floating point, text, date
27
Operations on Tables Add new rows (or sometimes columns) Add new rows (or sometimes columns) Modify existing rows Modify existing rows Choose a subset of columns Choose a subset of columns Choose a subset of rows Choose a subset of rows Combine rows (e.g., sum values in a column) Combine rows (e.g., sum values in a column) Combine columns Combine columns Combine two tables (join) Combine two tables (join) No operations to combine individual cells No operations to combine individual cells Unlike spreadsheet Unlike spreadsheet
28
Operating on Databases: SQL Every abstraction needs an interface through which users invoke abstract operations Every abstraction needs an interface through which users invoke abstract operations graphical interface graphical interface language language Structured Query Language Structured Query Language Has all those operations Has all those operations We'll focus only on queries We'll focus only on queries Query = question Query = question Extract some data from one or more tables to answer a particular question Extract some data from one or more tables to answer a particular question
29
Physical vs. Logical Data View How can a single, unified database meet the differing requirements of so many users? How can a single, unified database meet the differing requirements of so many users? Minimizes these problems by providing two “ views ” of the database data: Minimizes these problems by providing two “ views ” of the database data: The physical view deals with the actual, physical arrangement and location of data in the direct access storage devices (DASD). The physical view deals with the actual, physical arrangement and location of data in the direct access storage devices (DASD). The logical view, or user ’ s view, represents data in a format that is meaningful to a user and to the software programs that process that data. The logical view, or user ’ s view, represents data in a format that is meaningful to a user and to the software programs that process that data.
30
2. Microsoft Access Features: Features: Create/Modify databases Create/Modify databases Specify/Run queries Specify/Run queries Design/Print reports Design/Print reports Design graphical user interfaces around databases Design graphical user interfaces around databases Forms for entering, viewing data Forms for entering, viewing data An Introduction An Introduction An Introduction An Introduction
31
Microsoft Access GUI Building A GUI is A Set of Forms Forms Used for Used for Entering data to tables Entering data to tables Displaying data from tables or queries in a nicer way Displaying data from tables or queries in a nicer way Each form is usually “ bound ” to a table or query Each form is usually “ bound ” to a table or query every “ screenful ” in the form displays the contents of one record in that table or query every “ screenful ” in the form displays the contents of one record in that table or query
32
Forms contain Controls Labels Buttons Text boxes Pictures
33
Controls Forms contain controls Forms contain controls Text labels Text labels Text boxes Text boxes List boxes List boxes Combo boxes Combo boxes Option groups Option groups Buttons Buttons “ Objects ” created by other applications “ Objects ” created by other applications Pictures Pictures Word documents Word documents Spreadsheets Spreadsheets Decorative lines and boxes Decorative lines and boxes
34
Every Control has a set of Properties Properties determine Properties determine where the control gets its data from where the control gets its data from how it is displayed how it is displayed Usually properties are automatically set by wizards Usually properties are automatically set by wizards users only need to occasionally fine-tune them users only need to occasionally fine-tune them
35
Creating Forms Easy way: use an Access Wizard Easy way: use an Access Wizard Difficult way: manually add controls Difficult way: manually add controls
36
Editing a form ’ s design Select “ Design View ” Select “ Design View ” Modify controls Modify controls move them, resize them, delete them move them, resize them, delete them Modify properties Modify properties right-click on a control to get to its property list right-click on a control to get to its property list Add new controls Add new controls make Toolbox visible by selecting it from the “ View ” menu make Toolbox visible by selecting it from the “ View ” menu drag and drop new controls from the Toolbox drag and drop new controls from the Toolbox set the properties of the new controls set the properties of the new controls
37
Reports Specify the structure of printed reports Specify the structure of printed reports Similar structure to forms Similar structure to forms Every report is bound to a table or query Every report is bound to a table or query Reports have controls, where every control specifies how a specific field of a record in the table/query will appear Reports have controls, where every control specifies how a specific field of a record in the table/query will appear Access provides wizards for easy creation of new reports Access provides wizards for easy creation of new reports Users typically only need to fine-tune them Users typically only need to fine-tune them
38
Report Examples Category Sales for 1995 Category Sales for 1995 New report, select Report Wizard New 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 “ Category Name ” Select both fields, no grouping, sort by “ Category Name ” Tabular Layout, Corporate Style Tabular Layout, Corporate Style Store as “ Category Sales for 1995 ” Store as “ Category Sales for 1995 ” Switch to “ Design View ”, add a text box in Report Footer to show “ Total Sales ” Switch to “ Design View ”, add a text box in Report Footer to show “ Total Sales ”
39
Access GUI Summary 1. A GUI is a set of forms 2. A form displays records from a table or query 3. A form has a set of controls 4. A control displays data from a field or accepts user input 6. User interaction with forms/controls generates events 7. Macros can be attached to form/control event properties 5. A control has a set of properties
40
Macros Allow programmers to build functionality into MS Access forms Allow programmers to build functionality into MS Access forms Connect to forms and controls through events Connect to forms and controls through events
41
Typical Uses of Macros Open Forms from inside other Forms Open Forms from inside other Forms Synchronize data in two open Forms Synchronize data in two open Forms when data changes in one form, corresponding data also changes on the other form when data changes in one form, corresponding data also changes on the other form Find a record which satisfies given properties Find a record which satisfies given properties more user-friendly that writing queries more user-friendly that writing queries Validating input data Validating input data
42
Events “ Certain things that happen on the form or control ” “ Certain things that happen on the form or control ” Mouse clicks/double clicks Mouse clicks/double clicks Form open/close Form open/close Control value changed Control value changed etc. etc. Controls have one property per event type Controls have one property per event type Determines what happens when event is triggered Determines what happens when event is triggered Can be connected to a macro Can be connected to a macro
43
Most Important Event Properties On Click On Click On DoubleClick On DoubleClick triggered when we click/doubleclick on a control triggered when we click/doubleclick on a control After Update After Update triggered after we have changed the value of a control triggered after we have changed the value of a control On Current On Current Triggered every time a new record is displayed in a Form Triggered every time a new record is displayed in a Form
44
Macro Structure Each macro is a set of sequential actions Each macro is a set of sequential actions Each action has a set of parameters Each action has a set of parameters Actions may (optionally) be conditional Actions may (optionally) be conditional Macros can be named and saved (just as tables,queries, forms) Macros can be named and saved (just as tables,queries, forms)
45
Macro Example ConditionsActionsComments Parameters for current action Explanation of parameters
46
3. Database Trends(1) The evolution of Database System The evolution of Database System Data Data Simple data => Multimedia data, Knowledge Simple data => Multimedia data, Knowledge Model Model Relational model => OO model Relational model => OO model Object relational model Object relational model
47
Databases Trends (2) Databases Trends (2) Application Application OLTP => OLAP OLTP => OLAP Data organization Data organization Database => Data warehouse, Data Marts Database => Data warehouse, Data Marts Query language Query language SQL => Deductive SQL => Deductive
48
Emerging Database Models The most common database models are: Multimedia database Deductive databases Object-oriented databases Multimedia and hypermedia databases
49
Object-Oriented Database Model Object-oriented (OO) databases store both data and procedures acting on the data, as objects. Object-oriented (OO) databases store both data and procedures acting on the data, as objects. The OO database can be particularly helpful in multimedia environments, such as in manufacturing sites using CAD/CAM. The OO database can be particularly helpful in multimedia environments, such as in manufacturing sites using CAD/CAM. OO databases can be particularly useful in supporting temporal and spatial( 时空) dimensions. OO databases can be particularly useful in supporting temporal and spatial( 时空) dimensions. Terminology in the OO model includes: Terminology in the OO model includes: objects, attributes, classes, methods, and messages. objects, attributes, classes, methods, and messages.
50
Hypermedia Database Model The hypermedia database model stores chunks of information in the form of nodes connected by links established by the user. The nodes can contain text, graphics, sound, full-motion video, or executable computer programs. Users can branch to related information in any kind of relationship.
51
Thanks for Your Attention
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.