As mentioned in Section , the purpose of a database is rapid data storage and retrieval. Today, most database systems are relational databases . While the term ``relational database'' has a mathematical foundation, in practice it means that all data stored in the database is arranged in a uniform structure.
Figure shows a database server with access to three databases: demo, finance, and test.
You could issue the command psql finance and be connected to the finance database. You have already dealt with this issue in Chapter . Using psql, you chose to connect to database test with the command psql test. To see a list of databases available at your site, type psql -l. The first column lists the database names. However, you may not have permission to connect to all of them.
You might ask, ``What are those black rectangles in the databases?'' They are tables. Tables are the foundation of a relational database management system (RDBMS) . They hold the data stored in a database. Each table has a name defined by the person who created it.
Let's look at a single table called friend shown in Table .
Each friend appears on a separate row; each column contains the same type of information. This is the type of structure that makes relational databases successful. It allows you to select certain rows of data, certain columns of data, or certain cells. You could select the entire row for Mike, the entire column for City, or a specific cell like Denver.
Some synonyms exist for the terms ``table,'' ``row,'' and ``column.'' ``Table'' is more formally referred to as a relation or class, ``row'' as record or tuple, and ``column'' as field or attribute.