Fundamental Data Storage Concepts CIT 170 Week 1

  • Slides: 56
Download presentation
 Fundamental Data Storage Concepts CIT 170 – Week 1 Adjunct Instructor – Charles

Fundamental Data Storage Concepts CIT 170 – Week 1 Adjunct Instructor – Charles W (Bill) Marshall While Blackboard will be the official site for assignments and to turn in assignments Supplemental information is available at https: //www. cwmclass. com

Third Assignment 1. Provide three examples of a real-world database (e. g. , the

Third Assignment 1. Provide three examples of a real-world database (e. g. , the library contains a database of books). 2. What is data independence and why is it important? 3. What is the purpose of managing information? 4. What is metadata?

Store Date with out Database Management System • Writing (storing) data into a computer

Store Date with out Database Management System • Writing (storing) data into a computer can be thought of as writing onto an paper punch tape. • • Where you write one-character near the end move the tape to the left, then write the next character Repeat until all data is stored

This is an Analogy • Each OS (Operating System) and hardware is different, at

This is an Analogy • Each OS (Operating System) and hardware is different, at the detailed level

This is an Analogy • Each OS (Operating System) and hardware is different, at

This is an Analogy • Each OS (Operating System) and hardware is different, at the detailed level • In technology, it is typical to deal with layers of that technology

This is an Analogy • Each OS (Operating System) and hardware is different, at

This is an Analogy • Each OS (Operating System) and hardware is different, at the detailed level • In technology, it is typical to deal with layers of that technology • For example, drivers of cars do not worry about how the transmission works

This is an Analogy • Each OS (Operating System) and hardware is different, at

This is an Analogy • Each OS (Operating System) and hardware is different, at the detailed level • In technology, it is typical to deal with layers of that technology • For example, drivers of cars do not worry about how the transmission works • Transmission designers use lubricant but do not know how to make lubricant

This is an Analogy • Each OS (Operating System) and hardware is different, at

This is an Analogy • Each OS (Operating System) and hardware is different, at the detailed level • In technology, it is typical to deal with layers of that technology • For example, drivers of cars do not worry about how the transmission works • Transmission designers use lubricant but do not know how to make lubricant • So we are discussing the concepts of data storage, not discussing how to build and access the RAM (Random Access Memory) of a computer

So how to store data • With no system we just have a series

So how to store data • With no system we just have a series of characters on our stoage media

So how to store data • With no system we just have a series

So how to store data • With no system we just have a series of characters on our stoage media • Alternatives • Fixed length

So how to store data • With no system we just have a series

So how to store data • With no system we just have a series of characters on our stoage media • Alternatives • Fixed length • Delimited

So how to store data • With no system we just have a series

So how to store data • With no system we just have a series of characters • Alternatives • Fixed length • Delimited • JSON

So how to store data • With no system we just have a series

So how to store data • With no system we just have a series of characters • Alternatives • • Fixed length Delimited JSON A database system to manage data organization for us

For all these discussions Let's talk about how these Recipe records would be stored

For all these discussions Let's talk about how these Recipe records would be stored • Title stored in column 1 to 15 • Serve stored in column 16 to 17 • Prep Time stored in column 18 to 19 • Cook Time stored in column 20 to 21

For all these discussions Let's talk about how these Recipe records would be stored

For all these discussions Let's talk about how these Recipe records would be stored • Title stored in column 1 to 15 • Serve stored in column 16 to 17 • Prep Time stored in column 18 to 19 • Cook Time stored in column 20 to 21 Assume we only have these fields and that we have three records Title Serves Prep Time (min) Cook Time (Min) Carrot Cake 4 30 45 Apple Cake 6 20 60 Apple Pie 8 25 45

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045 Apple Cake 62060 Apple Pie 82545 E O F

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045 Apple Cake 62060 Apple Pie 82545 E O F Adding a column count helps see data 1 2 3 4 5 6 123456789012345678901234567890123 Carrot Cake 63045 Apple Cake 62060 Apple Pie 82545

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045 Apple Cake 62060 Apple Pie 82545 E O F • Advantages • Simple logic

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045 Apple Cake 62060 Apple Pie 82545 E O F • Advantages • Simple logic • Disadvantages • Each record uses maximum amount of space

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045 Apple Cake 62060 Apple Pie 82545 E O F • Advantages • Simple logic • Disadvantages • Each record uses maximum amount of space • Making any change in data structure requires complete rewrite of file

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045 Apple Cake 62060 Apple Pie 82545 E O F • Advantages • Simple logic • Disadvantages • Each record uses maximum amount of space • Making any change in data structure requires complete rewrite of file • No easy way to random access

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045

Fixed Length Carrot Cake Data stored looks like this at rest on disk 63045 Apple Cake 62060 Apple Pie 82545 E O F • Advantages • Simple logic • Disadvantages • • Each record uses maximum amount of space Making any change in data structure requires complete rewrite of file No easy way to random access Needs external Documentation

Delimited When Delimiter is | Data stored looks like this at rest on disk

Delimited When Delimiter is | Data stored looks like this at rest on disk Carrot Cake|6|30|45| Apple Cake|6|20|60| Apple Pie|8|25|45

Delimited When Delimiter is | Data stored looks like this at rest on disk

Delimited When Delimiter is | Data stored looks like this at rest on disk Carrot Cake|6|30|45| Apple Cake|6|20|60| Apple Pie|8|25|45 CSV Data stored looks like this at rest on disk “title”, ”serves”, ”prep time”, ”cook time” “Carrot Cake”, ” 6”, ” 30”, ” 45” ”Apple Cake ”, ” 6”, ” 20”, ” 60” ”Apple Pie”, ” 8”, ” 25”, ” 45” Comma Separated Values

Delimited • Advantages • Takes less space?

Delimited • Advantages • Takes less space?

Delimited • Advantages • Takes less space? • More portable across hardware

Delimited • Advantages • Takes less space? • More portable across hardware

Delimited • Advantages • Takes less space? • More portable across hardware • Danger

Delimited • Advantages • Takes less space? • More portable across hardware • Danger if delimiter is in data

Delimited • Advantages • Takes less space? • More portable across hardware • Danger

Delimited • Advantages • Takes less space? • More portable across hardware • Danger if delimiter is in data • Disadvantages • Change in data structure may require complete rewrite of file

Delimited • Advantages • Takes less space? • More portable across hardware • Danger

Delimited • Advantages • Takes less space? • More portable across hardware • Danger if delimiter is in data • Disadvantages • Change in data structure may require complete rewrite of file • No easy way to random access

Delimited • Advantages • Takes less space? • More portable across hardware • Danger

Delimited • Advantages • Takes less space? • More portable across hardware • Danger if delimiter is in data • Disadvantages • Change in data structure may require complete rewrite of file • No easy way to random access • May Need external Documentation

JSON {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep Time”: ” 30”, ”Cook

JSON {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep Time”: ” 30”, ”Cook Time”: ” 45”}, {“title”: ”Apple Cake”, ”Serves”: ” 6”, ”Prep Time”: ” 20”, ”Cook Time”: ” 60”}, {“title”: ”Carrot Pie”, ”Serves”: ” 8”, ”Prep Time”: ” 25”, ”Cook Time”: ” 45”} } }

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep Time”: ” 30”, ”Cook Time”: ” 45”}, {“title”: ”Apple Cake”, ”Serves”: ” 6”, ”Prep Time”: ” 20”, ”Cook Time”: ” 60”}, {“title”: ”Carrot Pie”, ”Serves”: ” 8”, ”Prep Time”: ” 25”, ”Cook Time”: ” 45”} } • Advantages } • Self documenting

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep Time”: ” 30”, ”Cook Time”: ” 45”}, {“title”: ”Apple Cake”, ”Serves”: ” 6”, ”Prep Time”: ” 20”, ”Cook Time”: ” 60”}, {“title”: ”Carrot Pie”, ”Serves”: ” 8”, ”Prep Time”: ” 25”, ”Cook Time”: ” 45”} } • Advantages } • Self documenting • More portable across hardware

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep Time”: ” 30”, ”Cook Time”: ” 45”}, {“title”: ”Apple Cake”, ”Serves”: ” 6”, ”Prep Time”: ” 20”, ”Cook Time”: ” 60”}, {“title”: ”Carrot Pie”, ”Serves”: ” 8”, ”Prep Time”: ” 25”, ”Cook Time”: ” 45”} } • Advantages } • Self documenting • More portable across hardware • Disadvantages • Newer so older programs do not support it

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep

JSON (Java. Script Object Notation) {“Recipe”: { {“title”: ”Carrot Cake”, ”Serves”: ” 4”, ”Prep Time”: ” 30”, ”Cook Time”: ” 45”}, {“title”: ”Apple Cake”, ”Serves”: ” 6”, ”Prep Time”: ” 20”, ”Cook Time”: ” 60”}, {“title”: ”Carrot Pie”, ”Serves”: ” 8”, ”Prep Time”: ” 25”, ”Cook Time”: ” 45”} } • Advantages } • Self documenting • More portable across hardware • Disadvantages • Newer so older programs do not support it • No easy way to random access

A Database System • Is a collection of programs that enables users to •

A Database System • Is a collection of programs that enables users to • Create and maintain data

A Database System • Is a collection of programs that enables users to •

A Database System • Is a collection of programs that enables users to • Create and maintain data • control all access to them.

A Database System • Is a collection of programs that enables users to •

A Database System • Is a collection of programs that enables users to • Create and maintain data • control all access to them. • Has a number of tables

A Database System • Is a collection of programs that enables users to •

A Database System • Is a collection of programs that enables users to • Create and maintain data • control all access to them. • Has a number of tables each of which contains fields

A Database System • Is a collection of programs that enables users to •

A Database System • Is a collection of programs that enables users to • Create and maintain data • control all access to them. • Has a number of tables each of which contains fields • Provides ability to modify the characteristics of an existing table or field

Characteristics of a Database • Self-describing nature of a database system

Characteristics of a Database • Self-describing nature of a database system

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints • Control of data redundancy

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints • Control of data redundancy • Data sharing

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints • Control of data redundancy • Data sharing • Some allow sharing of data by support access by a multiusers system

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints • Control of data redundancy • Data sharing • Some allow sharing of data by support access by a multiusers system • Support for multiple views of data

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints • Control of data redundancy • Data sharing • Some allow sharing of data by support access by a multiusers system • Support for multiple views of data • Transaction processing

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints • Control of data redundancy • Data sharing • Some allow sharing of data by support access by a multiusers system • Support for multiple views of data • Transaction processing • Restriction of unauthorized access

Characteristics of a Database • Self-describing nature of a database system • Insulation between

Characteristics of a Database • Self-describing nature of a database system • Insulation between program and data • Data independence • Enforcement of integrity constraints • Control of data redundancy • Data sharing • Some allow sharing of data by support access by a multiusers system • Support for multiple views of data • Transaction processing • Restriction of unauthorized access • Backup and recovery facilities

Key Terms • data type: determines the sort of data permitted in a field,

Key Terms • data type: determines the sort of data permitted in a field, for example numbers only

Key Terms • data type: determines the sort of data permitted in a field,

Key Terms • data type: determines the sort of data permitted in a field, for example numbers only • data uniqueness: ensures that no duplicates are entered

Key Terms • data type: determines the sort of data permitted in a field,

Key Terms • data type: determines the sort of data permitted in a field, for example numbers only • data uniqueness: ensures that no duplicates are entered • metadata: defines and describes the data and relationships between tables in the database

Key Terms • data type: determines the sort of data permitted in a field,

Key Terms • data type: determines the sort of data permitted in a field, for example numbers only • data uniqueness: ensures that no duplicates are entered • metadata: defines and describes the data and relationships between tables in the database • view: a subset of the database

Example of Database Project

Example of Database Project

Example of Database Project

Example of Database Project