Download Components of a Database System

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Data center wikipedia , lookup

Versant Object Database wikipedia , lookup

Expense and cost recovery system (ECRS) wikipedia , lookup

Data analysis wikipedia , lookup

Information privacy law wikipedia , lookup

Operational transformation wikipedia , lookup

SAP IQ wikipedia , lookup

Data model wikipedia , lookup

Clusterpoint wikipedia , lookup

Database wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Open data in the United Kingdom wikipedia , lookup

Data vault modeling wikipedia , lookup

Business intelligence wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
CH2
Introduction to Database
Development
CH2. Introduction to DB Development
Database

Components of Database Systems (Figure 2-1)
– User data
– Metadata
– Index
– Application Metadata
CH2. Introduction to DB Development
CH2. Introduction to DB Development
1. User Data



User data is represented in relation
Relation: Table containing data
Columns: field or attribute
– Rows: record for particular entities
– Normalization Problem
• R1(StudentName, StudentPhone, AdviserName,
AdviserPhone) : Problem
Therefore, separate R1 into R2 and R3
• R2(StudentName, StudentPhone, AdviserName)
• R3(AdviserName, AdviserPhone)
R2
R1
R3
CH2. Introduction to DB Development
CH2. Introduction to DB Development
2. Metadata


Description of DB structure(System table)
Efficient for DBMS, convenient for users
– user can use the same query tools for metadata as they
do for user data

Ex. (Figure 2-2)
– SysTables Table(Table Name, Number of Columns,
Primary Key)
– SysColumns Table(Column Name, Table Name,
DataType, Length)
CH2. Introduction to DB Development
CH2. Introduction to DB Development
3. Index




Overhead data
Improves the performance and accessibility of
DB
Helpful for sorting and searching, but at a cost
Ex.(Figure2-3): LastName Index, Major Index
4. Application Metadata

Used to store the structure and format of user
forms, reports, queries, and other application
components
CH2. Introduction to DB Development
CH2. Introduction to DB Development
DBMS

3 sub-systems
– The Design Tools Subsystem
• includes tools for creating tables, forms, queries, and reports
• DBMS products provide programming languages and
interfaces to programming languages
– Run-Time Subsystem
• processes the application components that are developed
using the design tools
• Ex.: Access 2000 has a run-time facility that materialize
forms and connects form elements with table data
CH2. Introduction to DB Development
DBMS

3 sub-systems
– DBMS Engine
• Intermediary between the design tools and run-time
subsystems and the data
• Involved with transaction management, locking, and backup
and recovery
CH2. Introduction to DB Development
Creating the DB


DB Schema : defines a DB’s structure, its tables,
relationships, domains, and business rules
An Example of a Schema: Highline College
– Table
• CAPTAIN(CAPTAIN_ID, CaptainName, Phone, Street,
City, State, Zip)
• ITEM(ITEM_ID, Quantity, Description, Date-Out, Date-In)
– Relationship
• CAPTAIN (CAPTAIN_ID, CaptainName, Phone, Street,
City, State, Zip)
• ITEM(ITEM_ID, Quantity, Description, Date-Out, Date-In,
CAPTAIN_ID)
CH2. Introduction to DB Development
– Domain: set of values that a column may have
• ITEM_ID, Quantity & CAPTAIN_ID → Integer,
• Description → Text,
• Data-Out & Date-In → Date
– Business Rule: restrictions on the business’s activities
that need to be reflected in the database and database
applications
• Ex.: No captain may have more than seven soccer balls
checked out at any one time

Creating Tables: after the schema has been
designed, tables are created using the DBMS table
creation tools
– ITEM Table (Figure 2-4, pp.33)
CH2. Introduction to DB Development
CH2. Introduction to DB Development

Defining Relationships: Foreign Key is used
– CAPTAIN Table & ITEM Table(Figure 2-5, pp. 33)
– Foreign Key: CAPTAIN_ID in ITEM table
CH2. Introduction to DB Development
Components of Applications

Forms

Queries

Reports

Menus

Application Programs
CH2. Introduction to DB Development

Forms
– Ex.: presentations of CAPTAIN and ITEM data
(Figure 2-6)
– Ex.: Creating a Form (Figure 2-7)

Queries
– From more than one relations, generate one relation
that satisfies given conditions
1. SQL(Structured Query Language): Data access
language (CH 9)
2. QBE(Query By Example): (Figure 2-8)
3. QBF(Query By Form): user types query constraints on
a data entry form and press search button
CH2. Introduction to DB Development

Reports
– Formatted display of database data (Figure 2-10)
– MS Access report definition (Figure 2-11)

Menus
– used to organize the application components so as to
make them more accessible to the end user and to
provide control over the user’s activities
– create menu suitable for the purposes of users

Application Programs
– written in a language that is specific to the DBMS or
in a standard language that interfaces with the
DBMS
– Ex.: Access Basic (Figure 2-14)
CH2. Introduction to DB Development
DB Development Processes

General Strategies
– Top-down: Entity-Relation Approach
• proceeds from the general to the specific
• Study strategic goal, means, information requirements,
systems → construct abstract data model
• High-level Data Model → Lower-Level Data Model →
Databases and Applications
– Bottom-up: Semantic-Object Approach
• proceeds from the specific to the general
• a particular system is selected → obtain statements
of requirements → build data model → design and
implement database
CH2. Introduction to DB Development

Data Modeling
– Interviewing users → Documenting requirements
→ Building the data model and prototypes
– Data Modeling as Inferencing
• User may not be able to describe exactly what model is
• reverse-engineer: shadows → original shapes (Art)
– Modeling in Multi-User Systems
• many users may envision many different data models
• DB becomes the logical union of the pieces of the workgroup’s or organization’s model → developer must
document that logical union
– Confusion about the Term Model
• Requirement data model or User’s data model
• Entity-Relationship model and Semantic Object data
model (Tools)