Database Tutorial

Course Tutorial Site

Site Admin

Tables

without comments

A table is a 2-dimensional structure, like a worksheet. One dimension is the columns and the other is the rows. You use a record to define a database table. The members of the record become the columns of the table. You create the rows of the table by inserting data into the table.

There are two ways to view tables:

  • In an object-oriented way of thinking, you can view a table as an object type. The rows are instances the object type.
  • In a traditional programming way of thinking, you can view a table as a list of a record type.

Database management systems (DBMS) organize tables and other object types into collections, which are known as databases. Databases are containers, like directories or folders are containers in operating systems. Directories or folders hold files, which may be program, data, or link files. A database is also a schema.

Like a file system in an operating system, databases control how data is stored and retrieved. File systems maintain metadata, or data about data, and metadata keeps bookkeeping information about its files. The DBMS also keeps metadata or bookkeeping information about their database tables.

File systems store some information in a directory table inside a file, like an the Unix and Linux OS use an inode file. The DBMS also stores metadata information in a specialized database, which is called a system dictionary or catalog. The data dictionary is a separate database from the databases where the DBMS stores data.

Tables differ from traditional programming lists in a couple ways:

  • Tables don’t exist as a collection of data in contiguous memory.
  • Table definitions aren’t defined in a program because their definitions are stored in a data dictionary.
  • Table data is not stored in memory but it is stored on disk drives.
  • Table data storage is managed by the database management system (DBMS); and the DBMS may choose to store the data in contiguous disk space or in non-contiguous disk space.

You should focus your efforts on learning two things this week. You should learn how to create tables and sequences; and how to define constraints that manage behaviors of tables.

Written by michaelmclaughlin

August 6th, 2018 at 9:37 pm

Posted in