25
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Chapter 11A Database Management Systems

Database (IT) Lecture Slide

Embed Size (px)

Citation preview

Page 1: Database (IT) Lecture Slide

Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved.

McGraw-Hill Technology Education

Chapter 11A

Database Management Systems

Database Management Systems

Page 2: Database (IT) Lecture Slide

Data

• Information in raw or unorganized form (such as alphabets, numbers, or symbols) that represent, conditions, ideas, or objects.

• In computing, data is information that has been translated into a form that is more convenient to process.

11A-2

Page 3: Database (IT) Lecture Slide

Data Representation

1. Bits– A bit is the fundamental unit of computer

storage– A bit can be 0 (off) or 1 (on)– Related bits are grouped to represent

different types of information such as numbers, characters, pictures, sound, instructions

11A-3

Page 4: Database (IT) Lecture Slide

4

Nibbles

• Nibbles– A nibble is a group of

4 bits

– A nibble is used to represent a digit in Hex (from 0-15) and BCD (from 0-9) numbers

BCD Hex

0000 0 0

0001 1 1

0010 2 2

0011 3 3

0100 4 4

0101 5 5

0110 6 6

0111 7 7

1000 8 8

1001 9 9

1010 A

1011 B

1100 C

1101 D

1110 E

1111 F

Page 5: Database (IT) Lecture Slide

Data Representation in Data Representation in Computer SystemsComputer Systems

5

Bytes

Bytes– A byte is a group of 8 bits that is used to

represent numbers and characters

– A standard code for representing numbers and characters is ASCII (American Standard Code for Information Interchange )

Page 6: Database (IT) Lecture Slide

Data Representation in Data Representation in Computer SystemsComputer Systems

6

Byte Size

Bytes– How many different combinations of 0’s and

1’s with 8 bits can be formed?– In general, how many different

combinations of 0’s and 1’s with N bits can be formed?

– How many different characters can be represented with a byte (8 bits)?

Page 7: Database (IT) Lecture Slide

Data Representation in Data Representation in Computer SystemsComputer Systems

7

Words

Words– A word is a group of 16 bits or 2 bytes

– UNICODE is an international standard code for representing characters including non-Latin characters like Asian, Greek, etc.

Page 8: Database (IT) Lecture Slide

Data Representation in Data Representation in Computer SystemsComputer Systems

8

Double Words

Double Words– A double word is a group of 32 bits or 4

bytes or 2 words

Page 9: Database (IT) Lecture Slide

Related Bytes

– A nibble is a half-byte (4-bit) - hex representation– A word is a 2-byte (16-bit) data item– A doubleword is a 4-byte (32-bit) data item– A quadword is an 8-byte (64-bit) data item– A paragraph is a 16-byte (128-bit) area– A kilobyte (KB) is 210 = 1,024 bytes 1,000 bytes)– A megabyte (MB) is 220 = 1,048,576 1 Million Bytes– A Gigabyte (GB) is 230 = 1,073,741,824 1 Billion

Page 10: Database (IT) Lecture Slide

Database approach

• The database approach is a way in which data is stored within a computer.

• It is organized into various charts that are accessed by a variety of computer applications from different locations.

• Databases are composed of a variety of information that is relevant to the organization that is using the database.

11A-10

Page 11: Database (IT) Lecture Slide

11A-11

Database Management Systems

• Database management system (DBMS)

• Store large collections of data

• Organize the data

• Becomes a data storage system

Page 12: Database (IT) Lecture Slide

11A-12

The Database

• A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.

• Stores a collection of related items

• Collection is arranged in a structure– Organizes and describes the data

• Examples:

• Library database, Police database, medical store database etc

Page 13: Database (IT) Lecture Slide

11A-13

Database Structure

Field NameField Name

RecordRecord

FieldField

Page 14: Database (IT) Lecture Slide

11A-14

Components of Database

• 1. Fields– Hold an individual piece of data– Are named descriptively– Often called a column– Phone book examples

• Name, address, e-mail, phone number

– Fields may contain no data

Page 15: Database (IT) Lecture Slide

11A-15

Components of Database

• 2. Records– One full set of fields– Often called a row– Phone book example

• Smith, Joe, 123 Some Street, 412-555-7777

– Databases may have unlimited rows

Page 16: Database (IT) Lecture Slide

11A-16

Database Helper Documents

• 4. Forms– forms are designed to ease the data entry process.

For example, you can create a data entry form that looks exactly like a paper form . People generally prefer to enter data into a well-designed form, rather than a table.

Page 17: Database (IT) Lecture Slide

11A-17

Components of Database

• 5. TablesTables are where the actual data is defined

and entered. Tables consist of records (rows) and fields (columns).

• 6. Reports– Produce printed results from the database– Includes tools to summarize data

Page 18: Database (IT) Lecture Slide

11A-18

Database Helper Documents

• 7. Pages: a data access page is a special type of Web page designed for viewing and working with data from the Internet or an intranet. This data is stored in a Microsoft Access database or a Microsoft SQL Server database.

Page 19: Database (IT) Lecture Slide

Database types

1. Flat file database

2. Relational database

11A-19

Page 20: Database (IT) Lecture Slide

11A-20

Flat-file Databases

• Typically has only one table– If multiple, each has a separate file

• Useful for simple data storage needs

• Hard to manage large data needs

• Can waste disk space

Page 21: Database (IT) Lecture Slide

11A-21

Relational Databases

• Made of two or more tables

• Tables are related by a common field– Called a relationship or join– Can help organize data

• Most common form of database

• Maintaining data is easier than flat-file

• No wasted disk space

Page 22: Database (IT) Lecture Slide

11A-22

Database Management System

• Programs that control the database

• Allows– Entering data– Querying data– Printing reports

• Supports thousands of users

• Includes tools to protect the data

Page 23: Database (IT) Lecture Slide

11A-23

Working with a Database

• Querying a database– Statement that describes desired data– List of fields can be modified– Uses of querying

• Find data• Calculate values per record• Delete records

– Most important DBMS skill

Page 24: Database (IT) Lecture Slide

11A-24

Working with a Database

• Query languages– All DBMS use a query language

• Most DBMS modify the language

– Structured Query Language (SQL)• Most common query language

– xBase• Query language for dBase systems

– Query by example (QBE)• Interface to SQL or xBase• Interactive query design

Page 25: Database (IT) Lecture Slide

Data Dictionary

• A data dictionary is a file or a set of files that contains a database's metadata. The data dictionary contains records about other objects in the database, such as data ownership, data relationships to other objects, and other data.

11A-25