A relational database is a collection of data items that is organised in terms of tables (or relations) and columns (attributes). The relationships between these tables are defined using primary and foreign keys, which provide links between the various tables. These relationships are defined when data is inserted into individual tables of a relational database, thus maximising query power while minimising redundant data storage. These relationships can be defined when the schema is created or even when the data is queried.