Sie sind auf Seite 1von 34

Data & Information

Data
Data is the name given to basic facts and entities such as names and numbers. Good examples of data are date, weights, price, costs employee names , tax codes, addresses etc. Data consists of a series of facts or statements that may have been collected, stored , processed and or manipulated but have not been organised or placed into context. When data is organised, its becomes Information.
3/18/12

11

What is Knowledge
Knowledge is defined variously as Expertise, and skills acquired by
a person through experience or education; the theoretical or practical understanding of a subject. Knowledge is of two types: a) Facts based or information based: Knowledge gained from fundamentals and through experiments. The knowledge like the information contained in fundamental sciences which has been derived from experiments, rules, regulations that are commonly agreed by experts. b) Heuristic Knowledge : It is knowledge of good practice experience and good judgment like hypothesis.
3/18/12 22

Other Concepts
Entity Entity Set Attribute Record / Tuple File Schema Instance Data Dictionary

3/18/12

33

3/18/12

44

Database
p

It is defines as the collection of logically interrelated data and a description of this data, designed to meet the information needs of an organization. For example, a dictionary, a telephone directory, student record register etc . They all store data in some particular arranged form i.e in some order

3/18/12

55

Features of Database
p

Shared Security Consistency Non-Redundancy Independence

p p p p

3/18/12

66

The Traditional File Approach to Data Management


Data Files Applicatio n Program Reports

p The Traditional File Approach n Separate files are created and stored for each application
program. n Very common from the 50s through the 80s.

3/18/12

77

The Traditional File Approach


Example: Student Data in a University. Student address may be needed for registering, library management, financial office, grade reporting, etc. Each application separately maintains its data files and programs to manipulate those files. Possibly different formats for the same data (Eg: Length of name) Redundant updates (E.g.: to change an address).

3/18/12

88

Purpose of Database Systems


p

In the early days, database applications were built directly on top of file systems Drawbacks of using file systems to store data:
n n n n n n n

Data redundancy and inconsistency Poor Data manipulation capabilities Data Isolation Integrity problem Security problems Concurrent Access to data Program-Data dependence
3/18/12 99

Database systems offer solutions to all the above problems

The Database Approach


p

The Database Management System Approach n A pool of related data is shared by multiple application programs. Rather than having separate data files, each application uses a collection of data that is either joined or related in the database.

Rep orts Rep orts Rep orts

Chec king Progr Savin ams gs Progr Loan ams Progr

Databa se Manag ement System


3/18/12 DBMS

All Data

10

Database Management System


p

DBMS is a collection of programs that enables you to store , modify and extract information from a database. There are many different types of DBMS , ranging from small systems that run on personal computers to huge systems that run on mainframes. The following are examples of database applications: - Computerised Library Systems - Flight Reservation Systems

A DBMS is a software package for defining and managing a database

3/18/12

11

Features & Abilities of DBMS


Query Ability Backup & Replication Security Computation Change & Access Logging Rule Enforcement

3/18/12

12

Advantages of DBMS
p p p p p p p

Reduced data redundancy Improved data integrity Conflicting requirements can be balance Inconsistency can be avoided. Monitoring database performance. Centralisation for multi-users Security

3/18/12

13

Disadvantages to the DBMS


Greater impact of failure More difficult recovery Increased cost of specialized staff. Substantial hardware and software start-up costs . Extensive conversion costs in moving form a filebased system to a database system

3/18/12

14

Components of DBMS
Structure Storage Manager - File Manager - Buffer Manager Disk Manager Query Processor Data Dictionary Facilities Data Definition Users End Users - Nave Users - Stand Alone Language - Sophisticated (DDL) - Casual Data Database Manipulation Administrators Language Database (DML) Designers Data Control
3/18/12

15

Structure of a DBMS

The cylindrical component contains not only data, but also metadata, i.e. info about the structure of data. If DBMS is relational, metadata includes: names of relations, names of attributes of those relations, and data types for those attributes (e.g., integer or character string). A database also maintains indexes for the data.

3/18/12

16

Storage Manager

The job of the Storage Manager is to obtain data from the data storage, and modify the data to the data storage when requested. Storage Manager has two components: File Manager handles files. Keeps track of the location of files Obtains block(s) of a file on request from the buffer manager. Buffer Manager handles main memory. 3/18/12

17

Query Processor

Query Processor handles: queries and modifications to the data. Finds the best way to carry out a requested operation and Issues commands to the storage manager which will carry them out. E.g. A bank has a DB with two relat.: Customers (name, SIN, address), Accounts (accountNo, balance, SIN) Query: Find the balances of all accounts of which Sally is the 3/18/12

18

Transaction Manager is responsible for the integrity of the system. It must assure that: several queries running simultaneously do not interfere with each other and that, the system will not lose data even if there is a power failure.

Transaction Manager

Transaction Manager interacts with: Query Manager, Because it may need to delay certain query operations to avoid conflicts.

3/18/12

19

Disk Manager
p p

Data files, which store the database itself. Data Dictionary, which stores metadata about the structure of the database. Statistical data, which store statistical information about the data in the database. This information is used by the query processor to select efficient ways to execute a query.

Disk Manager
2020

Components of DBMS
DBMS Facilities Data Definition Language (DDL) Data Manipulation Language (DML) Data Control Language (DCL)

3/18/12

21

Classification of DBMS Users


n n n

Database administrators Database Designers End Users : Casual Nave or Parametric Sophisticated Stand-alone

3/18/12

22

DATA WAREHOUSE
Data Warehouse, defines the term as an Integrated, subject oriented, time-variant, nonvolatile collection of data that provides support for decision making .

3/18/12

23

DATA MINING
It has been described as "the non-trivial extraction of implicit, previously unknown or hidden, and potentially useful information from data. Data Mining is the principle of sorting through large amounts of data and picking out relevant information. It is usually used by business intelligence organizations, and financial analysts, but it is increasingly used in the sciences to extract information from the enormous data sets generated by modern experimental and observational methods.
3/18/12 24

SQL
p

SQL stands for Structured Query Language. SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, etc. However, the standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that one needs to do with a database.
3/18/12

25

SQL
p p p p p p

SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL). The query and update commands form the DML part of SQL: SELECT - extracts data from a database UPDATE - updates data in a database DELETE - deletes data from a database INSERT INTO - inserts new data into a database The DDL part of SQL permits database tables to be created or deleted. The most important DDL statements in SQL are: CREATE DATABASE - creates a new database ALTER DATABASE - modifies a database CREATE TABLE - creates a new table ALTER TABLE - modifies a table DROP TABLE - deletes a table
3/18/12

p p p p p

26

Few Basic Operations of DBMS


The create table statement is used to create a new table. Here is the format of a simple create table statement: Syntax: create table "tablename" ("column1" "data type", "column2" "data type", "column3" "data type");
p

Example:

create table employee (first char(15), last char(20), age number(3), address char(30), city char(20), state char(20)); 3/18/12

27

Inserting into a Table


The insert statement is used to insert or add a row of data into the table. Syntax: p insert into "tablename" (first_column,...last_column) values (first_value,...last_value);
p p

Example: insert into employee (first, last, age, address, city, state) values ('Luke', 'Duke', 45, '2130 Boars Nest', 'Hazard Co', 'Georgia');
3/18/12 28

Updating Records
p

The update statement is used to update or change records that match a specified criteria.

Syntax : update "tablename" set "columnname" = "newvalue" [,"nextcolumn" = "newvalue2"...] where "columnname" OPERATOR "value" [and|or "column" OPERATOR "value"]; [] = optional

3/18/12

29

Updating Records
Examples: update phone_book set area_code = 623 where prefix = 979; update phone_book set last_name = 'Smith', prefix=555, suffix=9292 where last_name = 'Jones';

3/18/12

30

Deleting Records
The delete statement is used to delete records or rows from the table. Syntax: delete from "tablename" where "columnname" OPERATOR "value" [and|or "column" OPERATOR "value"]; [ ] = optional
p

Examples: delete from employee where lastname = 'May'; delete from employee where firstname = 'Mike' or firstname = 'Eric';

3/18/12

31

Drop a Table
The drop table command is used to delete a table and all rows in the table. Syntax: drop table "tablename"
p

Example: p drop table myemployees_ts0211;

3/18/12

32

Alter Table
The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. Syntax: To add a column in a table ALTER TABLE table_name ADD column_name datatype
p

To delete a column in a table ALTER TABLE table_name DROP COLUMN column_name To change the data type of a column in a table ALTER TABLE table_name ALTER COLUMN column_name datatype
3/18/12 33

Alter Table
Syntax: To change the data type of an existing column ALTER TABLE table_name CHANGE COLUMN LAST TO CHAR(20)

3/18/12

34

Das könnte Ihnen auch gefallen