Transcript
CIS 1 Ch 10: Database Ch 11: ProgrammingPerry MehtaSolano Community College
What is Database?
Employees Clients Vendors
Database – An integrated collection of log1cally related files
(Some databases contain only a single file.)
Purpose of Database Management•Define organizations, procedures, and analytical methods•Allow us to master the richer flow, faster pace, and huge volume of data and information - to find better, not just faster, analysis and decision-making procedures
Information Management
•Information Management is the process of acquiring mountains of data and quickly translating them into knowledge and understanding.
Achieved by using judgment to give knowledge relevance within a specific situational context.
Representation of facts, concepts, or instructions in a formalized manner suitable for communication, interpretation, or processing by humans or by automatic means
Data placed in a subjective context, or as data colored by perception
Information tested and accepted as factual through cognition through assessment or testing to prove the information, or be acceptance of the information as factual.
Logical Data Elements
EmployeeRecord 2
EmployeeRecord 1
EmployeeRecord 3
EmployeeRecord 4
Name SS Salary Name SS Salary Name SS Salary Name SS Salary
Data Data Data Data Data Data Data Data Data Data Data Data
PersonnelDatabase
PayrollFile
BenefitsFile
Network Server
ExternalDatabases onthe Internet &
Online Services
Client PC or
NCOperational
Databases ofthe Organization
DataMart
End UserDatabases Data
Warehouse
DistributedDatabases on
Intranets & Other Networks
Major Types of Databases
Data Dictionary File• Data about the database: Metadata
• List of the files in the database• Number of records in each file• Field names and field attributes• Other similar information
– No database data; only bookkeeping information for database management
– Normally hidden from users for security and integrity
Data ModelUser’s View of Data
Database – Entities and Relationships
Database Terms - Record
NAME
ADDRCITYSTATE
PHONE
ZIP
( ) -
Record – A collection of interrelated fields
Fixed length recordsVariable length records
Database Terms - Field
NAME
ADDRCITYSTATE
PHONE
ZIP
( ) -
Field – A grouping of characters of data
(There are nine fields in this example.)
Database Terms - Field Attributes
Attributes of a FieldAlphabetic, numeric, or bothNumber of charactersUppercase, lowercase, 1st letter capital, etc.Number of decimal places, dollar format, etc.Justification, color, and many others
NAME
ADDRCITYSTATE
PHONE
ZIP
( ) -
Database Distribution TypesNetwork Structure
Employee3
Project BProject A
Employee2
Employee1
Dept A Dept B
Employee1
Employee2
Hierarchical Structure
Project A
Dept
Project B
Relational StructureDept Dname Dloc Dmgr
ABCD
BEmpno Ename Etitle Dept
12 B3 A
C4
Database Distribution (cont)
East
WestDenver
FebActual Budget
Margin
Sales TV
VCR
TV
VCR
MultidimensionalDatabase Structure
Attributes•Customer•BalanceOperations•Deposit•Withdraw
Bank Account Object
Attributes• Credit Line• Mthly StatementOperations• Calculate Interest• Print Mthly Statement
Checking AccountObject
Attributes•Credit Line•Mthly StatementOperations•Calculate Interest•Print Mthly Statement
Savings AccountObject
Object-OrientedDatabase Structure
Object-Oriented Databases• Finding increasing use in managing
hypermedia for the Web• Supports complex data types and applets
– Documents– Graphic images– Video clips– Audio segments– Other subsets of Web pages
• Major software vendors are adding object oriented support to their relational data-base offerings
OperatingSystem
DatabaseManagement
System
ApplicationPrograms
Databases
DataDictionary
DatabaseManagement
• Database Development• Database Interrogation• Database Maintenance• Application Development
Database Management Systems
17
Databases
SELECT name, age, salaryFROM employeeWHERE age > 50;
Structured Query Language (SQL)– 1974: Structured
English Query Language (SEQUEL) by IBM; 1979: SQL by Oracle
– “Standard” database query language
– Simple commands generate both on-screen and printed reports
Very simple text-based example:
Databases
Structured Query Language (SQL)
– Graphical queries provide drag and drop and drop-down menus to select options
FIELD OPER VALUE RELAGE GT 30 ANDZIP EQ
GTGELTLENE
Databases
Structured Query Language (SQL)
– Graphical queries provide drag and drop and drop-down menus to select options
FIELD OPER VALUE RELAGE GT 30 ANDZIP GE 98000 ANDZIP LE 98010
Database Development
User NeedsDescription
1. Data Planning
Enterprise Model
2. RequirementsSpecifications
3. Conceptual Design
4. Logical Design
Physical Models
5. Physical Design
Data Models
Logical Models
P&G uses data mining to cut animal testingGary H Anthes. Computerworld. Framingham: Dec 6, 1999. Vol. 33, Iss. 49; pg. 44, 2 pgs•In June 1999, Procter & Gamble Co. announced it was ending immediately the use of animals for testing several hundred beauty, fabric, home-care and paper products. P&G has eliminated some 80% of its animal testing since 1984 while tripling in size. •Some of the reduction is from the substitution of human and animal cell cultures. But most of it comes from the use of data mining, analysis and modeling. •The key is to use huge databases of information about existing chemicals and past tests to predict whether a new product ingredient will be safe- testing it in software instead of on animals.
Data Warehouse and Data Mining
Client PC or
NCAnalyticalData StoreEnterpriseWarehouseData MartData
AcquisitionSubsystem
WarehouseDesignSubsystem
DataManagementSubsystem
Data Accessand DeliverySubsystem
Web Information
System
OperationalDatabases
MetadataDirectory
MetadataRepository
MetadataManagementSubsystem
Web-Based Systems
WebBrowser
Web ServerSoftware
NetworkServerThe Internet
IntranetsExtranets
Client PCsor NCs
HTML pagesGIF image filesVideo files
Web Objects
Database Administration
•Planning•Design•Creation•Maintenance•Analysis of usage•Security
Data Resource Management
DataAdministration
DataPlanning
DatabaseAdministration
Data Management Concepts
•Data Transformation •Data Accreditation •Data Organization •Data Extraction •Data Access •Data Exploitation •Knowledge •Information
Let’s use a tire store to illustrate these concepts!
Data Transformation•Data transformation:
– The process and algorithms used to convert data from one format to another, e.g., the conversion of kilograms to pounds by multiplying kilograms times the constant 2.2046.
•In the tire store: – The owner's manual for a European car
may specify tire pressure in kilograms per square centimeter. To provide the correct tire for the customer, this measurement needs to be converted to pounds per square inch.
Knowledge•Knowledge:
– The analysis of information to learn relationship, discover relationships or derive new relationships.
– The analysis of information to create rules to organize the information and create new information.
•In the tire store: – If we know that 60% of customers
who buy new tires will also buy mud flaps, we can estimate how much stock in mud flaps is needed based on projected tire sales.
Data Accreditation
•Data Accreditation: – The granting of approval to the
definition of data items. – The concept that the owner of the
data being responsible for the data, e.g., the definition of data items, the format of data items, and the organization of data items.
•In the tire store: – The store manager will decide what
type of information should be gathered from customers about their purchases, etc.
Data Organization
•Data Organization: – The process and algorithms used to create physical
or logical structures for data. – Physical structures determine the location of each
data item and its relative location to other data items in the storage media, e.g., on a disk.
– Logical structures use metadata to create and maintain the logical relationships of data, e.g., a person's name typically consists of a first name, a middle name and a last name.
– Each part of the name would be physically stored as a separate data item.
– The metadata would recognize the name as the first name and middle name combined.
•In the tire store: – Using binders, tabs and indexes to store and organize
the various item prices is data organization.
Data Extraction
•Data Extraction: – The process, search algorithms,
and other techniques used to draw out useful information from a very large set of information or data
– The use of the Dewey decimal system or algorithms to find a particular book from a library, or the use of computer index files to locate a record quickly in a file.
•In the tire store: – When the sales clerk uses the
computer to find the price of an item, that is data extraction
Data Access
•Data Access: – The process of locating and
retrieving data in response to some request, or the concern with the ready availability of access to data.
•In the tire store: – When the sales clerk looks up the
price of an item requested by the customer, he is accessing data.
Key Fields
SequentialAccess
SequentialOrganization
IndexedSequential
AccessMethod
KeyTransformation
Direct Access
URLs
Accessing Files and Databases
Data Exploitation•Data Exploitation:
– The concept of using data for strategic advantage.
– Corporations and government agencies (enterprises) have enormous databases, which can be exploited.
– Using the data in them for enterprise advantages in data exploitation, e.g., The answer to the question—how can we exploit the data we have to our advantage..
•In the tire store: – Using the information the customer gave
about her name and address to send her future sale information would be data exploitation
Data Exploitation•Data Exploitation:
– The concept of using data for strategic advantage.
– Corporations and government agencies (enterprises) have enormous databases, which can be exploited.
– Using the data in them for enterprise advantages in data exploitation, e.g., The answer to the question—how can we exploit the data we have to our advantage..
•In the tire store: – Using the information the customer gave
about her name and address to send her future sale information would be data exploitation
Impact on Acquiring Information Technology • System performance
requirements • Program
management and acquisition
• Operation and maintenance of data in systems
System Performance Requirements Impact on Acquiring Information Technology •If the performance requirements are set higher than required to meet the user's requirements, both hardware and software costs increase.
•Learning Team Exercise– If we state that the system
must be able to process 100,000 transactions of a certain type per minute this may be translated into a requirement to buy 10 hardware platforms that must process 10,000 transactions per minute.
– What will happen if the real requirement is 50,000 transactions per minute?
– We really need to buy only 5 platforms — in other words, we have bought twice as much processing capability as we need.
•Key Point– If we require that a
system respond immediately (less than 1 second) when a 10 minute response time is good enough, we are likely to increase both our hardware and software costs.
Response Time System Performance Requirements
•If the requirement is too low, meaning that a one minute response time is requested when a one-tenth of a second response time is needed, then the users do not get the support that they need. •Data management system requirements must be set as high as is needed to meet the users needs but not higher.
•Learning Team– Brain some examples where a
database design is sensitive to response time
Redundancy System Performance Requirements
•Negative effect on system performance. •If each office in an organization keeps its own copy of all the data files, then each office has to update, backup, and otherwise maintain the data. •This duplication of effort is expensive and introduces more errors, which in turn are expensive.
•Learning Team– What are some other examples?
Data Maintenance & Data Refresh RequirementsSystem Performance Requirements
•Data represent facts about the real world. •As facts in the real world change they must be captured and used to update the data in the database.
•For example, if a requirement states that the data in the database be no more than 7 days old, then the data must be refreshed every 7 days.
Now let’s visit www.fetch.com
References• Celano, J. (2004). Personal
Communications
top related