Upload
muhammad-talha-zaroon
View
84
Download
0
Embed Size (px)
Citation preview
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved.
McGraw-Hill Technology Education
Chapter 11A
Database Management Systems
Database Management Systems
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
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
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
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 )
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)?
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.
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
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
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
11A-11
Database Management Systems
• Database management system (DBMS)
• Store large collections of data
• Organize the data
• Becomes a data storage system
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
11A-13
Database Structure
Field NameField Name
RecordRecord
FieldField
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
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
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.
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
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.
Database types
1. Flat file database
2. Relational database
11A-19
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
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
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
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
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
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