Database Concepts
Who Needs a Database?
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.1
Database Overview
• A database is a set of related data.
• An old-style library catalog, a Rolodex or an address book are all databases.
• Usually we use the term “database” to refer to electronic databases.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.2
Flat File Databases
• The simplest electronic database structures are flat file structure.
• Flat file means that the data is stored in a single file.
• These files can be
– Delimited
– Fixed length
– In a spreadsheet application
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.3
Delimited
• In a delimited file, each piece of data is separated from the others by a delimiter such as a comma or a semicolon.
• Delimited files are commonly used to transfer data from one data source to another. Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.4
Example: Comma Delimited File
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.5
Fixed Length Files
• In fixed length, each piece of data is allotted a particular length in characters.
• All fields have the same length.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.6
Spreadsheets
• Spreadsheets such as Microsoft’s Excel provide a more sophisticated form of flat file database.
• Spreadsheets often contain additional database tools to help sort and filter data.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.7
Spreadsheet Example
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 1.8
Disadvantages of Flat File Databases
• Difficult to query and find information
• Data redundancy – information is repeated and can be inconsistent
• Difficult to compare data across files
Copyright © 2012 Pearson Education,