Relationship in database
In a database, a "relationship" refers to the connection between data in different tables, allowing you to link related information together.
Types of relationship
I. One-to-one relationship:
When one record in a table can only be associated with one record in another table, and vice versa. (Example: A person can only have one passport).
II. One-to-many relationship:
When one record in a table can be associated with multiple records in another table. (Example: A customer can place multiple orders).
III. Many-to-many relationship:
When multiple records in one table can be associated with multiple records in another table. (Example: A student can enroll in multiple courses, and a course can have many students).
Referential integrity
Referential integrity in a RDBMS is a rule that ensures the accuracy and consistency of data relationships between tables.
What do you mean by query?
A query is a request for data or information from a database table or combination of tables. Queries can be used to:
1. Ask specific questions
2. Insert, update, or delete data
3. Perform calculations
4. Combine data from different tables
What is report?
A report is used to display and print your data in an organized manner. It represent the information in your database to display or distribute a summary of data and provide details about individual records.
What do you mean by Form?
Forms provide a quick and efficient way to modify and insert records into your databases. The forms provide an intuitive, graphical environment that is easily navigated by anyone familiar with standard computer techniques.
Database Languages
A database language is a programming language that allows users to interact with a database management system (DBMS) to store, retrieve, and manipulate data.
Types of Database Languages
SQL (Structured Query Language)
Structured Query Language is a standard Database language which is used to create, maintain and retrieve the relational database.- SQL is easy to learn.
- SQL is used to access data from relational database management systems.
- SQL can execute queries against the database.
- SQL is used to describe the data.
- SQL is used to create a view, stored procedure, function in a database.
- SQL allows users to set permissions on tables, procedures, and views.
Some important SQL Commonds
SELECT – selects data from the database.
DELETE – removes data from the database.
UPDATE – change data in the database.
CREATE TABLE – creates a new table.
1. CREATE TABLE table_name(column1 datatype, column2 datatype, column3 datatype, columnN datatype, PRIMARY KEY( one or more columns ) );