Professional Documents
Culture Documents
INTRODUCTION TO DATABASE
3/24/2012
STID 1103
Learning Objectives
After completing this chapter you will be able to: Introduce the basic concepts of database. Explain database system model. Describe Evolution of database. Explain basic operation in build database systems. Describe the use of table, relationship, query, form and report.
3/24/2012
STID 1103
Chapter Outline
Introduction Creating the database Database Terms Hierarchy of Data Database approach Database Model Tutorial: Microsoft Access
3/24/2012
STID 1103
Introduction
A database consists of an organized collection of data for one or more uses, typically in digital form. Digital databases are managed using database management systems, which store database contents, allowing data creation and maintenance, and search and other access.
Data
Data are raw facts. Raw data refers to a collection of numbers, characters, images or other outputs from devices that collect information to convert physical quantities into symbols, that are unprocessed.
Information
Information is data that is organized and meaningful. Data is typically further processed by a human or input into a computer, stored and processed there, or transmitted (output) to another human or computer in the form on information.
Step 2. The
processing
3/24/2012
STID 1103
Database
Collection of data organized so you can access, retrieve, and use it. Database software also called database management system (DBMS). Database software allows you to
3/24/2012
Create database Add, change, and delete data Sort and retrieve data Create forms and reports
STID 1103 8
To create a database, designers must develop a conceptual design and a physical design. Conceptual design: An abstract model of a database from the user or business perspective. Physical design: Layout that shows how a database is actually arranged on storage devices.
3/24/2012 STID 1103 9
A map of concepts and their relationships. It describes the things of significance to an organization (entity classes), about which it is inclined/influence to collect information, and characteristics of (attributes) and associations between pairs of those things of significance (relationships). Example: Entity-relationship modeling
3/24/2012 STID 1103 10
Database Terms
Entity-relationship modeling: The process of designing a database by organizing data entities to be used and identifying the relationships among them. Entity-relationship (ER) diagram: Document that shows data entities and attributes and relationships among them. Entity classes: A grouping of entities of a given type. Instance: A particular entity within an entity class.
STID 1103 11
3/24/2012
Identifier: An attribute that identifies an entity instance. Relationships: The conceptual linking of entities in a database. The number of entities in a relationship is the degree of the relationship. Relationships between two items are common and are called binary relationships.
3/24/2012 STID 1103 12
Binary Relationships
3/24/2012
STID 1103
13
3/24/2012
STID 1103
14
Normalization ~ A method for analyzing and reducing a relational database to its most streamlined form for minimum redundancy, maximum data integrity, and best processing performance
3/24/2012
STID 1103
15
Normalized relation
3/24/2012
STID 1103
16
Non-normalized relation
3/24/2012
STID 1103
17
Physical view: The plan for the actual, physical arrangement and location of data in the direct access storage devices (DASDs) of a database management system. Logical view: The users view of the data and the software programs that process that data in a database management system.
3/24/2012
STID 1103
18
Refers to the systematic organization of data, often in a hierarchical form. A hierarchy is an arrangement of items (objects, names, values, categories, etc.) in which the items are represented as being "above," "below," or "at the same level as" one another. (the items are represented as being "above," "below," or "at the same level as" one another) Database contains files, file contains records, record contains fields, field contains characters.
3/24/2012 STID 1103 19
Database contains files, file contains records, record contains fields, field contains characters, characters are represented by bytes and bits.
3/24/2012
STID 1103
20
Field
A data field holds a single fact. Combination of one or more characters. Example: October 18, 2010". This can be treated as a single date field (eg birthdate), or 3 fields, namely, month, day of month and year. Smallest unit of data user accesses
Field size defines the maximum number of characters a field can contain Field name uniquely identifies each field Data type specifies kind of data field contains
3/24/2012
STID 1103
21
Data Type
Text (also called alphanumeric) letters, numbers, or special characters Numeric - numbers only AutoNumber - unique number automatically assigned to each new record Currency - dollar and cent amounts or numbers containing decimal values Date - month, day, year, and sometimes time Memo - lengthy textSTID 1103 entries 3/24/2012 22
Record
A record (tuple) is a collection of related fields or a group of related fields. An Employee record may contain a name field(s), address fields, birthdate field and so on. Key field, or primary key is a field or combination of fields that uniquely identifies each record in the table.
3/24/2012 STID 1103 24
File
A file is a collection of related records. If there are 100 employees, then each employee would have a record (e.g. called Employee Personal Details record) and the collection of 100 such records would constitute a file (in this case, called Employee Personal Details file). Files are integrated into a database. This is done using a Database Management System.
3/24/2012 STID 1103 25
Data File
2295
2928 3376 3928 4872
Donna
Shannon Adrian Jonah Marcus
Vandenberg
Murray Valesquez Weinberg Green
Montgomery
Montgomery Prattville Clanton Auburn
AL
AL AL AL AL
records
key field
fields
3/24/2012
STID 1103
26
Each department or area within organization has own set of files. Records in one file may not relate to records in any other file. May have weaknesses
Data redundancysame fields stored in multiple files Isolated datadata stored in separate files so it is difficult to access
3/24/2012 STID 1103 27
Database Approach
Many programs and users can share data in database. Secures data so only authorized users can access certain data
3/24/2012
STID 1103
28
3/24/2012
STID 1103
29
How do a database application and a file processing application differ in the way they store data?
STID 1103 30
3/24/2012
Manufacturer Microsoft Corporation IBM Corporation IBM Corporation Computer Associates International, Inc. Oracle Corporation Microsoft Corporation Sybase Inc.
Computer Type Personal computer, server, PDA Personal computer, midrange server, mainframe Personal computer, midrange server, mainframe Personal computer, midrange server, mainframe Personal computer, midrange server, mainframe, PDA Server Personal computer, midrange server, PDA
STID 1103 31
DBMS Terms
Data dictionary Structured Query Language (SQL) Query Query by Example (QBE) Form Report generator Data model
3/24/2012
STID 1103
32
Data Dictionary
Known as metadata Contains data about each file in repository, a database and each field within "centralized those files. repository of information about data such as meaning, relationships to other data, origin, usage, and format.
3/24/2012
STID 1103
33
A database computer language designed for managing data in relational database management systems (RDBMS). Allows you to manage, update, and retrieve data Has special keywords and rules included in SQL statements
SQL statement results
SQL statement
3/24/2012
STID 1103
34
Query
Request for specific data from a database. Query language consists of simple, English-like statements that allow users to specify data to display, print, or store.
Step 3. View query on the screen.
3/24/2012
STID 1103
35
A database query language for relational databases Program retrieves records that match criteria entered in form fields Has a graphical user interface that assists users with retrieving data
Query by example screen
3/24/2012
Form
Window on screen that provides areas for entering or changing data in database. Used to retrieve and maintain data in a database. Form that sends data across network or Internet is called eform, short for electronic form.
Report Generator
Also called report writer. Allows user to design a report on screen, retrieve data into report design, then display or print reports.
3/24/2012
STID 1103
38
Data Model
Rules and standards that define how database organizes data and how users view organization of data. The three most common data models are hierarchical, network, and relational. Other types of data models include multidimensional, objectrelational, hypermedia, embedded, and virtual.
3/24/2012 STID 1103 39
3/24/2012
STID 1103
40
Relationship
3/24/2012
STID 1103
41
Structures data into an inverted tree in which each record contains two elements, a single root or master field, often called a key, and a variable number of subordinate fields. Advantage is the speed and efficiency with which it can be searched for data. problems:
Access to data in this model is predefined by the database administrator before the programs that access the data are written. Programmers must follow the hierarchy established by the data structure.
3/24/2012 STID 1103 42
3/24/2012
STID 1103
43
Data model that creates relationships among data in which subordinate records can be linked to more than one data element.
3/24/2012
STID 1103
44
3/24/2012
STID 1103
45
Hierarchical database
Access to data is predefined by exclusively hierarchical relationships, predetermined by administrator. Limited search/query flexibility. Not all data are naturally hierarchical. This is the most complicated database model to design, Implement, and maintain. Greater query flexibility than with hierarchical model, but less than with relational model. Processing efficiency and speed are lower. Data redundancy is common, requiring additional maintenance.
Network
Many more relationships can be defined. There is greater speed and efficiency than with relational database models. Conceptual simplicity; there are no predefined relationships among data. High flexibility in ad-hoc querying. New data and records can be added easily.
Relational database
3/24/2012
STID 1103
46
Two emerging data models are the objectrelational and hypermedia models
Object-relational database model: Data model that adds new object storage capabilities to relational databases. Hypermedia database model: Data model that stores chunks of information in nodes that can contain data in a variety of media; users can branch to related data in any kind of relationship.
3/24/2012
STID 1103
47
Geographical information database: Data model that contains locational data for overlaying on maps or images. Knowledge database: Data model that can store decision rules that can be used for expert decision making. Small-footprint database: The subset of a larger database provided for field workers.
3/24/2012
STID 1103
48
Embedded database: A database built into devices or into applications; designed to be self-sufficient and to require little or no administration. Virtual database: A database that consists only of software; manages data that can physically reside anywhere on the network and in a variety of formats.
3/24/2012
STID 1103
49
Can store more types of data. 3/24/2012 STID 1103 Can access data faster
50
Multimedia databases
Store images, audio clips, and/or video clips
Hypertext databases
Contain text links to other documents
Hypermedia databases
Contain text, graphics, video, and sound
3/24/2012
STID 1103
51
Web databases
Link to e-form on Web page
3/24/2012
STID 1103
52
TUTORIAL
MICROSOFT ACCESS 2007 http://www.gcflearnfree.org/computer/topic.aspx? id=146
3/24/2012 STID 1103 53