A relational database is a type of database that stores and provides access to data points that are related to one another. Relational databases are based on the relational model, an intuitive, straightforward way of representing data in tables. In a relational database, each row in the table is a record with a unique ID called the key. The columns of the table hold attributes of the data, and each record usually has a value for each attribute, making it easy to establish the relationships among data points.
A relational database stores data in a set of simple relations. A relation is a set of tuples. A tuple is an unordered set of attribute values.
A table is a two-dimensional representation of a relation in the form of rows (tuples) and columns (attributes). Each row in a table has the same set of columns. A relational database is a database that stores data in relations (tables). For example, a relational database could store information about company employees in an employee table, a department table, and a salary table.
Relational Database Management System (RDBMS)
The relational model is the basis for a relational database management system (RDBMS). An RDBMS moves data into a database, stores the data, and retrieves it so that applications can manipulate it.
An RDBMS distinguishes between the following types of operations:
- Logical operations
In this case, an application specifies what content is required. For example, an application requests an employee name or adds an employee record to a table.
- Physical operations
In this case, the RDBMS determines how things should be done and carries out the operation. For example, after an application queries a table, the database may use an index to find the requested rows, read the data into memory, and perform many other steps before returning a result to the user. The RDBMS stores and retrieves data so that physical operations are transparent to database applications.
Connection string:
const conString = “postgres://YourUserName:YourPassword@YourHost:5432/YourDatabase”;
Example, in simplified
private final String url = “jdbc:postgresql://localhost/dvdrental”
private final String user = “postgres”
private final String password = “<add your password>”