15.04.2018 Views

programming-for-dummies

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

274<br />

Using Database Files<br />

Prospect table<br />

Name:<br />

Address:<br />

Phone:<br />

Customer table<br />

Name:<br />

Address:<br />

Phone:<br />

Products bought:<br />

Sale amount:<br />

Date of purchase:<br />

Non-relational databases store<br />

duplicate data in separate tables.<br />

To update data, you must update<br />

separate tables.<br />

Prospect table<br />

Name:<br />

Address:<br />

Phone:<br />

Customer table<br />

Products bought:<br />

Sale amount:<br />

Date of purchase:<br />

Relational databases store<br />

in<strong>for</strong>mation in separate tables<br />

and then link or “relate” data<br />

together. This physically stores<br />

only one copy of data.<br />

Figure 8-7:<br />

Relational<br />

databases<br />

eliminate<br />

duplication<br />

of data by<br />

letting<br />

tables share<br />

in<strong>for</strong>mation.<br />

Customer table<br />

Name:<br />

Address:<br />

Phone:<br />

Products bought:<br />

Sale amount:<br />

Date of purchase:<br />

“Relating” multiple tables creates<br />

a single table that organizes<br />

related data in one place.<br />

Figure 8-8:<br />

Database<br />

toolkits take<br />

care of the<br />

technical<br />

details of<br />

manipulating<br />

a database<br />

file so you<br />

can focus on<br />

just making<br />

your program<br />

do<br />

something<br />

useful.<br />

Main<br />

program<br />

Commands<br />

Data<br />

Database<br />

toolkit<br />

Commands<br />

Data<br />

Database

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!