590d ago

Chapter 18 - Databases



Create a database structure

What is a database?

  • A database is an organised collection of data which stores and retrieves data.

  • Flat-file databases

  • Relational databases

Field

  • Single item of data

  • Each field has a field name 

  • Each field contains one type of data

Record

  • A collection of fields

File

  • Organised collection of records

  • Can have one or more tables within



Flat-file databases

  • Data is stored in one table

  • Organised by rows and columns



Relational databases

  • Data is stored in more than one linked table, stored in a file

  • Tables within relational databases are linked with relationships



Key fields

  • The relationships linking the tables



Primary and foreign key fields

  • Primary key field that holds unique data and is the field used to identify that record

  • Foreign key fields store values from a primary key field in another table



Data types and sub-types

  • Alphanumeric

- text

  • Numeric

- integer

- decimal

- currency

  • Boolean

- Yes/No

- True/False



knowt logo

Chapter 18 - Databases


Create a database structure

What is a database?

  • A database is an organised collection of data which stores and retrieves data.

  • Flat-file databases

  • Relational databases

Field

  • Single item of data

  • Each field has a field name 

  • Each field contains one type of data

Record

  • A collection of fields

File

  • Organised collection of records

  • Can have one or more tables within


Flat-file databases

  • Data is stored in one table

  • Organised by rows and columns


Relational databases

  • Data is stored in more than one linked table, stored in a file

  • Tables within relational databases are linked with relationships


Key fields

  • The relationships linking the tables


Primary and foreign key fields

  • Primary key field that holds unique data and is the field used to identify that record

  • Foreign key fields store values from a primary key field in another table


Data types and sub-types

  • Alphanumeric

- text

  • Numeric

- integer

- decimal

- currency

  • Boolean

- Yes/No

- True/False