1.
CREATE
Used to create a new database or table. Example:
sql
CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
Name VARCHAR(50),
Position VARCHAR(50),
Salary DECIMAL(10, 2)
);
2. INSERT
Adds new data to a table. Example:
sql
INSERT INTO Employees (EmployeeID, Name, Position, Salary)
VALUES (1, 'Alice', 'Manager', 55000.00);
3. SELECT
Retrieves data from a table. Example:
sql
SELECT Name, Position FROM Employees WHERE Salary > 50000;
4. UPDATE
Modifies existing data in a table. Example:
sql
UPDATE Employees
SET Salary = 60000.00
WHERE EmployeeID = 1;
5. DELETE
Removes data from a table. Example:
sql
DELETE FROM Employees
WHERE EmployeeID = 1;
6. ALTER
Modifies the structure of a table. Example:
sql
ALTER TABLE Employees
ADD HireDate DATE;
7. DROP
Deletes a table or database permanently. Example:
sql
DROP TABLE Employees;
8. JOIN
Combines rows from two Nor more tables based on a related column. Example:
sql
SELECT Employees.Name, Departments.DepartmentName
FROM Employees
JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID;
9. CREATE INDEX
Creates an index to speed up data retrieval. Example:
sql
CREATE INDEX idx_salary ON Employees(Salary);
10. GROUP BY
Groups rows that have the same values in specified columns. Example:
sql
SELECT Position, AVG(Salary) AS AverageSalary
FROM Employees
GROUP BY Position;
11. ORDER BY
Sorts the data in ascending or descending order. Example:
sql
SELECT Name, Salary
FROM Employees
ORDER BY Salary DESC;
SQL main commands with table example
Here’s a list of SQL main commands with a table example to demonstrate each one:
1. CREATE
Used to create a new table. Example: Create a table for storing employee data.
sql
CREATE TABLE Employee (
EmployeeID INT PRIMARY KEY,
Name VARCHAR(50),
Position VARCHAR(50),
Salary DECIMAL(10, 2)
);
2. INSERT
Adds new data to the table. Example: Insert a new employee record.
sql
INSERT INTO Employee (EmployeeID, Name, Position, Salary)
VALUES (1, 'Alice', 'Manager', 55000.00);
3. SELECT
Retrieves data from the table. Example: Retrieve all employees with a salary above 50000.
sql
SELECT Name, Position, Salary
FROM Employee
WHERE Salary > 50000;
4. UPDATE
Modifies existing data in the table. Example: Update Alice’s salary.
sql
UPDATE Employee
SET Salary = 60000.00
WHERE EmployeeID = 1;
5. DELETE
Removes data from the table. Example: Delete an employee record.
sql
DELETE FROM Employee
WHERE EmployeeID = 1;
6. ALTER
Modifies the structure of the table. Example: Add a new column for hire date.
sql
ALTER TABLE Employee
ADD HireDate DATE;
7. DROP
Deletes the table permanently. Example: Remove the Employee table.
sql
DROP TABLE Employee;
8. JOIN
Combines data from two tables based on a common column. Example: Combine Employee data with Department data.
sql
SELECT Employee.Name, Department.DepartmentName
FROM Employee
JOIN Department ON Employee.DepartmentID = Department.DepartmentID;
Employee Table Example Data
EmployeeID Name Position Salary HireDate
1 Alice Manager 60000.00 2023-01-15
2 Bob Developer 45000.00 2023-05-10
Exercise 1: SELECT
Question: Retrieve the names and salaries of employees from a table called employees where the salary is greater than 50,000.
Answer:
sql
SELECT name, salary
FROM employees
WHERE salary > 50000;
Exercise 2: INSERT INTO
Question: Add a new employee to the employees table with the following details: Name: "Alice", Age: 28, Position: "Engineer".
Answer:
sql
INSERT INTO employees (name, age, position)
VALUES ('Alice', 28, 'Engineer');
Exercise 3: UPDATE
Question: Update the position of an employee named "John" to "Team Lead".
Answer:
sql
UPDATE employees
SET position = 'Team Lead'
WHERE name = 'John';
Exercise 4: DELETE
Question: Delete the records of employees who are older than 60.
Answer:
sql
DELETE FROM employees
WHERE age > 60;
Exercise 5: CREATE TABLE
Question: Create a new table called departments with the following columns: id (integer, primary key), name (string), and location (string).
Answer:
sql
CREATE TABLE departments (
id INT PRIMARY KEY,
name VARCHAR(100),
location VARCHAR(100)
);
Exercise 6: JOIN
Question: Combine data from the employees table and the departments table to display the employee name and their department name. Assume
employees.dept_id matches departments.id.
Answer:
sql
SELECT employees.name, departments.name AS department_name
FROM employees
INNER JOIN departments
ON employees.dept_id = departments.id;
Exercise 7: GROUP BY
Question: Find the total number of employees in each department from the employees table. Assume the column dept_id represents the department.
Answer:
sql
SELECT dept_id, COUNT(*) AS total_employees
FROM employees
GROUP BY dept_id;
Karoora Guyyaa
Mata Duree: Firaakshinoota Ida'uu
Yeroon: Daqiiqaa 40
Kaayyoo: Barattoonni firaakshinoota ida’uun hubannoo horatanii fi shaakala irratti ogummaa horachuu danda’an.
1. Meeshaalee Deeggarsaa Barnoota
Gabatee fi qalamaa (chalkboard/whiteboard).
Kaardiiwwan firaakshinoota fakkeenyota salphaa irratti mul’isan.
Shaakala maxxansaa fi meeshaa hojii dhuunfaa barattootaa.
2. Qindoomina Gochaa Barsiisaa
a) Seensa (Daqiiqaa 5)
Barsiisaan firaakshinoota jechuun maal akka ta’e ibsa kennuu.
Fakkeenya salphaa kaa’anii:
o “1/2” jechuun maali akka ta’e ibsu.
o Firaakshinoota ida’uun maaliif barbaachisoo akka ta’e barattoota hubachiisuu.
b) Dhiyeessi (Daqiiqaa 10)
Fakkeenya salphaa agarsiisu:
o “1/4 + 1/4 = 2/4 = 1/2” jechuun barattootaaf ibsuu.
Barattoonni agarsiisa barsiisaa hordofuun akka sirna isaa hubatan gochuu.
Haala ida’amuu fi waliin wal-qixxeessuu irratti barsiisuu.
c) Cimsaa (Daqiiqaa 10)
Shaakala gareedhaan hojjachuu: Gareewwan barattootaa firaakshinoota adda addaatiin shaakala gochuu:
o Fakkeenya: “2/5 + 1/5 = ?” fi “3/8 + 1/4 = ?”.
Gareen barattootaa kan dogoggoroota sirreessu fi deebii sirrii dhiyeessu.
d) Madaalli (Daqiiqaa 5)
Gareewwan hojii isaanii dareetti dhiyeessu fi sirna isaanii waliin mari’achuun madaallii gochuu.
Deebii gaaffilee qorannoo:
o Fakkeenya gaaffii: “1/6 + 2/6 = ?”
3. Gochaa Barataa (Daqiiqaa 5)
Barattoonni fakkeenya dhuunfaa irratti hojii dhuunfaa hojjachuu eegalu.
o Fakkeenya: “1/3 + 1/6” wal-qixxee wal-qixxessu fi sirreessuu.
4. Mala Baruu fi Barsiisuu (Daqiiqaa 5)
Barattoonni waliin mari’achuun firaakshinoota ida’uu irratti yaada isaanii faayidaa itti godhan.
Hojii idilee irraa wantoota baratan hubannoo cimsachuuf dhimma itti bahuu.
5. Madaallii (Daqiiqaa 5)
Barattootaaf gaaffilee qorannoo salphaa dhiyeessu:
o “3/7 + 2/7 = ?”
o “1/5 + 3/10 = ?”
Dogoggora keessaa hubachuun barreeffamaan sirrii ibsuu.
Karoora Guyyaa: Firaakshinoota Ida'uu
Guyyaa: [Guyyaa galmee galchaa]
Sa’aatii Hojii Ibsa
8:00–8:30 Barnoota Firaakshinoota Hubannoo bu’uuraa firaakshinoota irratti horachuu.
8:30–9:00 Shaakala Firaakshinoota Firaakshinoota salphaa ida’uun shaakala gochuu.
9:00–9:30 Hojii Shaakala Firaakshinoota walxaxaa irratti hojjechuu.
9:30–10:00 Qorannoo fi Deebii Hojiiwwan hojjetaman ilaaluu fi dogoggora sirreessuu.
Here’s a suggestion to complete your daily lesson plan on "Database Manipulation Using SQL" for Grade 12, Sections E and F:
Daily Lesson Plan Date: 13/7/2017 Name of School: Kombolcha Secondary School Teacher's Name: Ahmednur Hassan Grade & Section: 12 (E and
F) Topic: Database Manipulation Using SQL Rationale of the Topic / Key Competency in Focus: To equip students with essential SQL skills to
manipulate databases effectively, enabling them to manage, query, and maintain data systematically.
Competency/Competencies:
Describe the purpose and features of SQL.
Write basic SQL commands to retrieve and manipulate data.
Measurable Learning Competencies (MLCs): By the end of the lesson, students will be able to:
Define SQL and explain its uses.
Write and execute basic SQL commands such as SELECT, INSERT, UPDATE, and DELETE.
Teaching Teaching
Date Period Content Teacher Activity Time Students Activities Assessment
Methodology Material
Introduction to SQL and Explain the purpose and 10 Listen attentively and Lecture, Textbook,
13/7/2017 40 min Oral questioning
Basic Commands key commands of SQL min take notes Demonstration projector
Demonstration: Database
Demonstrate examples 15 Observe and ask Demonstration with Participation in
Running Basic SQL software,
of basic SQL queries min questions real examples discussion
Queries computer
Write and execute
Guided Practice: Guide students through 10 Computers, SQL Review of group
queries in pairs or Hands-on activities
Writing SQL Queries exercises min exercises exercises
small groups
Administer a short quiz Answer quiz questions
Assessment and Wrap- Class discussion and Pre-prepared Quiz
and summarize key 5 min and participate in
Up assessment quiz materials performance
points summary
Daily Lesson Plan
Date: 13/7/2017 Name of School: Kombolcha Secondary School Teacher's Name: Ahmednur Hassan Grade & Section: 12 (E and F) Topic: 3.2.2 Data
Definition Language (DDL)
Rationale of the Topic / Key Competency in Focus: Developing foundational knowledge in Data Definition Language is crucial for students to
understand how databases are structured and manipulated. This skill is highly relevant in computer science and critical for managing data in real-world
applications.
Competency/Competencies:
Define and explain Data Definition Language (DDL).
Understand the syntax and function of common SQL commands like CREATE, ALTER, and DROP.
Measurable Learning Competencies (MLCs): By the end of the lesson, students will be able to:
1. Define DDL and describe its importance in database systems.
2. Construct and execute basic SQL commands for creating, modifying, and deleting tables.
3. Identify and correct errors in simple SQL queries.
Lesson Schedule:
Teaching
Date Period Content Teacher Activity Time Student Activities Teaching Material Assessment
Methodology
Lecture on DDL
80 Introduction to DDL 10 Listen, take notes, Presentation slides,
7/7/2017 concepts, with examples Direct instruction Oral Q&A
mins and Commands min ask questions handouts
in SQL
Show SQL commands
Command 20 Observe, take Guided Computer, projector, Spot questions
(e.g., CREATE, ALTER,
Demonstrations min notes demonstration SQL editor during the demo
DROP)
Assist students in
30 Write and execute Hands-on Laptops/computers, Group evaluation
Practical Exercises creating and modifying
min SQL commands practice worksheets of SQL exercises
tables
Summarize the lesson, Reflect on key Homework
Recap and Homework 10 Summary notes,
assign take-home points, note Open discussion submission
Assignment min assignment sheet
exercises homework evaluation
Daily Lesson Plan
Date: 15/7/2017 Name of School: Kombolcha Secondary School Teacher's Name: Ahmednur Hassan Grade & Section: 12 (E and F) Topic: ALTER
TABLE Command
Topic / Key Competency in Focus: Understanding and applying the ALTER TABLE command to modify existing database tables.
Competency/Competencies:
Learn the syntax and purpose of the ALTER TABLE command.
Use ALTER TABLE to add, modify, or delete table columns.
Measurable Learning Competencies (MLCs): By the end of the lesson, students will be able to:
1. Explain the role of ALTER TABLE in managing databases.
2. Write SQL statements to add, modify, or delete columns in existing tables.
3. Test and debug ALTER TABLE queries for correctness.
Lesson Schedule:
Teaching Teaching
Date Period Content Teacher Activity Time Student Activities Assessment
Methodology Material
80 Introduction to Explain ALTER TABLE 10 Listen, take notes, Slides or Oral Q&A to check
15/7/2017 Direct instruction
mins ALTER TABLE concepts and examples min ask questions whiteboard understanding
Demonstrating Show commands to add, 20 Observe and note Guided SQL editor,
Spot questions
Commands modify, or delete columns min down examples demonstration projector
Guide students in writing 30 Write queries and Collaborative Computers, Review written SQL
Hands-on Practice
and testing commands min test in groups activity worksheets queries
Summarize concepts and 10 Share reflections Summary Participation in
Recap and Discussion Open discussion
clarify doubts min and feedback handout discussion
Homework Explain take-home 10 Note homework Assignment Evaluate submitted
Direct instruction
Assignment exercise instructions min details sheet homework
Daily Lesson Plan
Date: 15/7/2017 Name of School: Kombolcha Secondary School Teacher's Name: Ahmednur Hassan Grade & Section: 12 (E and F) Topic: DROP
TABLE Command
Topic / Key Competency in Focus: Developing the ability to use the DROP TABLE command to delete database tables and understand its consequences.
Competency/Competencies:
Understand the purpose and syntax of the DROP TABLE command.
Recognize the implications of dropping a table, including loss of data and structure.
Measurable Learning Competencies (MLCs): By the end of the lesson, students will be able to:
1. Explain the function and significance of the DROP TABLE command.
2. Write and execute SQL queries using the DROP TABLE command.
3. Analyze scenarios where the DROP TABLE command is appropriate and safe to use.
Lesson Schedule:
Teaching
Date Period Content Teacher Activity Time Student Activities Teaching Material Assessment
Methodology
Introduce the DROP Oral Q&A on
1 DROP TABLE 10 Listen, take notes, Slides, whiteboard, SQL
15/7/2017 TABLE syntax and use Direct instruction concept
Period Command min ask questions examples
cases understanding
Show DROP TABLE 10 Observe and take Spot questions during
Demonstration Demonstration SQL editor, projector
queries with examples min notes demo
Guide students in
15 Write queries and Laptops/computers, Evaluate correctness
Hands-on Practice writing and executing Practical activity
min test commands worksheets of queries
queries
Summarize key points, Reflect on key Homework
Recap and Summary handout,
explain homework 5 min points, ask Open discussion submission
Homework assignment sheet
tasks questions evaluation
Daily Lesson Plan
Date: 15/7/2017 Name of School: Kombolcha Secondary School Teacher's Name: Ahmednur Hassan Grade & Section: 12 (E and F) Topic: 3.2.3 Data
Manipulation Language (DML)
Topic / Key Competency in Focus: Gaining the ability to use DML commands (INSERT, UPDATE, DELETE) to manage and manipulate data in
relational database systems.
Competency/Competencies:
Understand the role and importance of DML in database operations.
Develop SQL queries for data manipulation.
Measurable Learning Competencies (MLCs): By the end of the lesson, students will be able to:
1. Define Data Manipulation Language (DML).
2. Write and execute SQL statements using INSERT, UPDATE, and DELETE commands.
3. Assess and debug common errors in DML queries.
Lesson Schedule:
Teaching Teaching
Date Period Content Teacher Activity Time Student Activities Assessment
Methodology Material
Explain DML concepts and Slides or
40 Introduction to 10 Listen, take notes, Oral Q&A on basic
15/7/2017 provide real-world Direct instruction whiteboard
mins DML min ask questions concepts
examples examples
Show SQL commands for
Demonstration of 10 Observe and note SQL editor, Spot-check
INSERT, UPDATE, Demonstration
Commands min down queries projector understanding
DELETE
Computers,
Guide students in using 15 Write and test SQL Review executed
Hands-on Practice Hands-on activity exercises
DML commands min queries SQL queries
worksheet
Reflect on key
Recap and Summarize and assign take- Evaluate homework
5 min points, ask Open discussion Homework sheet
Homework home exercises submission
questions
Daily Lesson Plan
Date: 15/7/2017 Name of School: Kombolcha Secondary School Teacher's Name: Ahmednur Hassan Grade & Section: 12 (E and F) Topic:
3.2.4 Data Query Language – SELECT Command
Topic / Key Competency in Focus: Mastering the SELECT command to query and retrieve data from relational databases effectively.
Competency/Competencies:
Understand the structure and purpose of the SELECT command.
Write SQL queries to retrieve specific data from a database table.
Measurable Learning Competencies (MLCs): By the end of the lesson, students will be able to:
1. Explain the purpose and functionality of the SELECT command.
2. Construct SQL queries to retrieve data based on conditions and criteria.
3. Analyze and debug SELECT statements for accuracy and efficiency.
Lesson Schedule:
Teaching Teaching
Date Period Content Teacher Activity Time Student Activities Assessment
Methodology Material
Introduce the structure, Oral Q&A to
1 Introduction to 10 Listen, take notes, Direct Slides, whiteboard
15/7/2017 syntax, and examples of reinforce
Period SELECT Command min and ask questions instruction examples
SELECT queries understanding
Show examples of SELECT
queries with WHERE, 10 Observe and note Guided SQL editor, Spot-check during
Demonstration
ORDER BY, and LIMIT min down the examples demonstration projector demonstration
clauses
Computers,
Guide students in writing 15 Write and test SQL Hands-on Review and
Practice worksheet
SELECT queries min queries activity feedback on queries
exercises
Recap and Reflect on the Summary
Summarize the lesson and Homework
Homework 5 min lesson, ask Open discussion handout,
outline homework tasks submission review
Assignment clarifying questions assignment sheet
1. Creating the Tables
Student Table:
sql
CREATE TABLE Student (
student_id CHAR(10) PRIMARY KEY,
name CHAR(20),
sex CHAR(1),
age INTEGER,
grade_level INTEGER
);
Teacher Table:
sql
CREATE TABLE Teacher (
teacher_id CHAR(10) PRIMARY KEY,
name CHAR(20),
sex CHAR(1),
age INTEGER,
specialization CHAR(15)
);
Grade Table:
sql
CREATE TABLE Grade (
student_id CHAR(10),
teacher_id CHAR(10),
course_code CHAR(20) REFERENCES Course(course_code),
mark INTEGER,
PRIMARY KEY (student_id, teacher_id, course_code)
);
2. Running the SQL Commands
Once you’ve created the tables, run these commands in your SQL environment (e.g., Access or SQL Server) to see the resulting tables. Verify their
structure using DESCRIBE TableName or SELECT * queries.
3. Fixing Errors in the Provided CREATE Statements
Here are corrected versions of the problematic SQL statements:
Patient Table:
The error is missing commas and incorrect syntax for attributes:
sql
CREATE TABLE Patient (
pid INTEGER,
P_Name TEXT,
P_Age INTEGER
);
Physician Table:
The original statement is missing a size specification for CHAR. Corrected version:
sql
CREATE TABLE Physician (
id CHAR(10),
name TEXT,
DoB DATETIME,
PRIMARY KEY (id)
);
Treatment Table:
Errors include missing commas, incorrect REFERENCES syntax, and table name not properly referenced. Corrected version:
sql
CREATE TABLE Treatment (
ptid INTEGER REFERENCES Patient(pid),
drId CHAR(10) REFERENCES Physician(id)
);
4. Writing the CREATE Table SQL Statement for the Physician Table
Based on the hint provided (using maximum character sizes), here’s how the Physician table can be defined:
sql
CREATE TABLE Physician (
id CHAR(10),
name CHAR(50),
specialization CHAR(30),
age INTEGER,
DoB DATETIME,
PRIMARY KEY (id)
);
Based on the provided records, here's a possible SQL statement. I'll make assumptions about the data types and sizes according to the data provided:
SQL
CREATE TABLE Physician (
employee_id INT NOT NULL, -- Assuming the employee ID is an integer
Name VARCHAR(20) NOT NULL, -- Maximum name length is "Selamawit Kassu" (16 characters)
position VARCHAR(25) NOT NULL, -- Maximum position length is "Surgical Physician" (19 characters)
bank_account BIGINT NOT NULL, -- Longest bank account number is "1080880880880" (13 digits)
bank VARCHAR(10) NOT NULL, -- Maximum bank name length is "Abyssinia" (9 characters)
PRIMARY KEY (employee_id) -- Assuming employee_id is the unique identifier
);
Explanation:
1. Data types:
:INT Chosen for the EMPLOYEE_ID field since it represents numerical data
:VARCHAR: Used for Name,Position , and bank because they are text fields of varying lengths. Sizes are based on the longest string in each
column.
BIGINT : Selected for bank_acount since account numbers can go beyond the range of a standard INT.
2. Sizes:
VARCHAR:sizes are determined by the longest value in each column, allowing room for additional entries if needed.
3. Constraints:
NOT NULL: Indicates fields cannot be empty.
PRIMARY KEY: Ensures uniqueness of employee_ID.
1. Modifying the Physician Table:
a. Modify employee id datatype to CHAR(7):
sql
ALTER TABLE Physician
ALTER COLUMN id CHAR(7);
b. Modify employee id as PRIMARY KEY:
sql
ALTER TABLE Physician
ADD CONSTRAINT pk_employee_id PRIMARY KEY (id);
c. Add a new column for the date of hire:
sql
ALTER TABLE Physician
ADD date_of_hire DATETIME;
2. Modifying the Student and Teacher Tables:
a. Add student_id from the Student table as a foreign key in the Grade table:
sql
ALTER TABLE Grade
ADD CONSTRAINT fk_student_id FOREIGN KEY (student_id) REFERENCES Student(student_id);
b. Add teacher_id from the Teacher table as a foreign key in the Grade table:
sql
ALTER TABLE Grade
ADD CONSTRAINT fk_teacher_id FOREIGN KEY (teacher_id) REFERENCES Teacher(teacher_id);
Steps to Create Relationships:
1. Open the Database File:
o Launch Microsoft Access and open the database that contains the tables you want to relate.
2. Navigate to the Relationships Window:
o Go to the "DATABASE TOOLS" tab on the ribbon.
o Click on the "Relationships" button. This opens the Relationships window.
3. Add Tables to the Relationships Window:
o In the Relationships window, click on "Show Table" (usually a small dialog box pops up automatically).
o Select the tables you want to relate (e.g., Student, Teacher, Grade, etc.), and click "Add."
o Once added, close the "Show Table" dialog box.
4. Define Relationships:
o Drag the primary key field (e.g., student_id from the Student table) and drop it onto the corresponding foreign key field in another table
(e.g., student_id in the Grade table).
o Repeat this process for all related fields (e.g., linking teacher_id in the Teacher table to teacher_id in the Grade table).
5. Edit Relationship Properties:
o Once the connection line (relationship) appears, double-click it to open the Edit Relationships dialog box.
o Choose options like "Enforce Referential Integrity" to ensure data consistency.
o Click "OK" to save the relationship.
6. Save the Relationship Layout:
o Close the Relationships window, and Access will prompt you to save the layout. Confirm to save your visual relationships.
Step 1: Open the Database
1. Launch Microsoft Access and open the database you created in Activity 3.5 (with the Student, Teacher, and Grade tables).
Step 2: View Relationships
1. Go to the "DATABASE TOOLS" tab on the ribbon.
2. Click on "Relationships" to open the Relationships window.
3. Check for Existing Relationships:
o If relationships were previously created, you should see lines connecting the tables.
o Relationships Diagram:
Student table connected to Grade table via the student_id.
Teacher table connected to Grade table via the teacher_id.
Discuss the Relationships:
The relationships visually display how the tables are linked:
o Primary Key to Foreign Key:
student_id from the Student table is the primary key, related to the student_id in the Grade table as a foreign key.
teacher_id from the Teacher table is the primary key, related to the teacher_id in the Grade table as a foreign key.
Step 3: Delete Relationships
1. In the Relationships window:
o Select the line connecting the Student table to the Grade table.
o Press Delete on your keyboard, or right-click and choose Delete.
2. Similarly, delete the line connecting the Teacher table to the Grade table.
3. Click Save (if prompted) to save changes.
Step 4: Recreate Relationships
1. Add Relationships Back:
o Drag the student_id from the Student table and drop it onto the student_id in the Grade table.
o Drag the teacher_id from the Teacher table and drop it onto the teacher_id in the Grade table.
2. Edit Relationships:
o In the Edit Relationships dialog box:
Check the box for "Enforce Referential Integrity" to ensure consistency.
Click OK.
3. Save the changes and verify the relationship diagram is updated.