2. 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
3. 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. 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
5. Data Representation inData 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 )
6. Data Representation inData 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)?
7. Data Representation inData 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.
8. Data Representation inData 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
9. 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
10. 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
11. 11A-11
Database Management Systems
• Database management system (DBMS)
• Store large collections of data
• Organize the data
• Becomes a data storage system
12. 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
14. 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
15. 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
16. 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.
17. 11A-17
Components of Database
• 5. Tables
Tables 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
18. 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.
20. 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
21. 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
22. 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
23. 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
24. 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
25. 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
Notas del editor
Discussion point
Ask your student if anyone knows why sorting by zip code is important. Hopefully, someone knows that the post office provides a discount on presorted mail.
Teaching tip
Figure 11A.2 on page 423 describes the database structure
Teaching tip
Figure 11A.3 on page 423 provides examples of forms and reports.
Teaching tip
Start your students thinking about real databases, with millions of records. Using PA instead of Pennsylvania saves 10 bytes per record. In a database with 1 million records, this saves 10,000,000 bytes. This is roughly equal to a stack of 10 floppy disks
Teaching tip
To demonstrate the power of relationships, setup a flat file database with music, artists, CD and year released. Demonstrate how difficult and wasteful it is to store several songs by the same artist and CD. Be sure to make several typing mistakes. Then build the same structure relationally. Create music, artist and CD tables. Join the artist and CD to the music table. Now show how easy it is to add songs from the same CD. While creating this database, it helps to use music the students know.
Teaching tip
Protecting databases is similar to network administration, covered in chapter 9. Access to read and change data is limited to a list of allowed users.
Teaching tip
Page 432 and 433 show examples of the different querying languages.