What is a table in a database?
a collection of related data in a database.
- it is made up of rows & columns
Example - A “Customers” table might have columns for customer names, IDs, & contact information.
What is a column in a database?
Is a field in a table that stores specific types of data, such as names or dates.
EXAMPLE - In a “Products” table, there might be a column for “Price” & another for “Description.”
What is a row in a database?
What is a primary key?
What is a foreign key?
What are the main SQL commands?
SELECT
- What is the purpose of SQL commands SELECT?
Retrieves data from a database
INSERT
- What is the purpose of SQL commands INSERT?
Adds new data to a table
UPDATE
- What is the purpose of SQL commands UPDATE?
Modifies existing data.
DELETE
- What is the purpose of SQL commands DELETE?
Removes data from a table.
CREATE
- What is the purpose of SQL commands CREATE?
Creates new tables or databases.
DROP
- What is the purpose of SQL commands DROP?
Deletes tables or database.
Example of table in a database
Example - A “Customers” table might have columns for customer names, IDs, & contact information.
Example of column in a database
EXAMPLE - In a “Products” table, there might be a column for “Price” & another for “Description.”
Example of row in a database
*Example** - In a “Customers” table, one row could store the name, ID, & contact information of one customer.
Example of primary key in a database
Example - A customer ID number might be a primary key in a “Customers” table.
Example of foreign key in a database
Examples - In an “Orders” table, a foreign key might link to the “Customers” table using the customer ID.
What is a table in a database? (In More Detail)
- Define:
- Example:
What is a column in a database? (In More Detail)
- Define:
- Example:
What is a row in a database? (In more Detail)
- Define:
- Example:
What is a primary key? (In more Detail)
- Define:
- Example:
What is a foreign key? (In more Detail)
- Define:
- Example: