The relational data model is the most used because it is:
- mature (proven and known)
- simple to understand
- widely supported
The structure of a database is that its made up of tables consisting
of rows and columns.
First Name | Last Name | Age | Email
John | Doe | 31 | firstname.lastname@example.org
Mary | Smith | 28 | email@example.com
The relationship can be established by the programmer using a table
join (via SQL).
Take this second table:
Login | SignedUpDate | Email
johndoe | 2002-12-12 | firstname.lastname@example.org
We could now join the two tables by "email", their common column.
The email could serve as a primary key here.
A primary key, which must be unique within individual tables, could
also be the combination of first name and last name. Since names are
not unique, we might want to use a safer, "synthetic" key, that might
be handled by the database using auto-incrementation:
ID | Login | SignedUpDate | Email
1 | johndoe | 2002-12-12 | email@example.com
2 | marysmith | 2002-11-11 | firstname.lastname@example.org
On to the integrity: this is the referential integrity of the
database. It means that data is not redundant or error-prone in the
sense that e.g. if you delete customer data, also the previous
customer orders must be deleted. You can ensure this using foreign
keys and have the database server enforce integrity rules.
For a good overview of all this, please see:
Introduction to Relational Database Design
- Introduction to Data Modeling
- Overview of the Relational Model
Hope that helps!
"database design" relational