Any value stored in a primary key field is unique to that record. No other record in that column contains that value. The value is a unique identifier.
In relational database management systems, a relationship defines a relationship between two or more tables. That is, the data in one table is related to the data in the other. One table contains the primary key and the other table contains the foreign key.
When we establish a relationship between the tables, we link the foreign key with the primary key. From that point on, any value in the foreign key field should match a value from the primary key field in the other table.
In the world of databases, a view is a query that’s stored on a database.
The term can also be used to refer to the result set of a stored query.
To create a view, you write a query, then save it as a view.
To run a view, you query it, just like you’d query a table. The difference is that, the view itself is a query. So when you query the view, you’re effectively querying a query. This enables you to save complex queries as views, then run simple queries against those views.
A stored procedure is a series of SQL statements compiled and saved to the database.
Stored procedures can be as simple or as complex as you like. However, one of the benefits of stored procedures is that they allow you to store complex scripts on the server.
Stored procedures typically contain conditional programming such as
IF... ELSE statements for example. Stored procedures can also accept parameters.
RDBMS stands for Relational Database Management System.
Relational database management systems have become the most popular type of database system. Most major database management systems are relational. Popular examples include Microsoft Access, SQL Server, Oracle Database, MySQL, FileMaker, PostgreSQL, and more below.
There are 3 types of relationships in relational database design. They are:
- One-to-Many (or Many-to-One)