Relational Database
A relational database is a digital database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relational database systems have an option of using the SQL (Structured Query Language) for querying and maintaining the database.
source: wikipedia
Relational model
This model organizes data into one or more tables("relations) of columns and rows, with a unique key identifying each row. Row are also called record or tuples. Columns are also called attributes. Habitually, each table(relation) represents one "entity type" (customer or product). The rows represent instances of that type of entity ("Lee" or "char") and columns representing values attributed to that instance("address" or "price").
For example, each row of a class table corresponds to a class, and a class corresponds to multiple students, so the relationship between the class table and the student table is "one to many"
Keys
Each row in a table has its own unique key. Rows in a table can be linked to rows in other tables by adding a column for the unique key of the row (foreign keys).
The primary keys within a database are used to define the relationships among the tables. Most relational database designs resolve many-to-many relationships by creating an additional table that contains the PKs from both of the other entity tables. when the FKs combined together to a PK.
Relationships
Terminology
The table below summarizes some of the most important relational database terms and the corresponding SQL term:SQL term | Relational database term | Description |
---|---|---|
Row | Tuple or record | A data set representing a single item |
Column | Attribute or field | A labeled element of a tuple, e.g. "Address" or "Date of birth" |
Table | Relation or Base relvar | A set of tuples sharing the same attributes; a set of columns and rows |
View or result set | Derived relvar | Any set of tuples; a data report from the RDBMS in response to a query |
source: wikipedia