🧩 Practice: Create Custom Project Table in SQL
In this task, you’ll design a table to manage software projects in a Bangladeshi IT firm. You will define project names, budgets, deadlines, client info, and statuses using CREATE TABLE
.
📌 Example: Software Projects Table
CREATE TABLE projects (
project_id NUMBER PRIMARY KEY,
project_name VARCHAR2(100) NOT NULL,
client_name VARCHAR2(100),
start_date DATE,
end_date DATE,
budget NUMBER(10, 2),
status VARCHAR2(20) DEFAULT 'Pending',
created_by VARCHAR2(50)
);
🧠 Explanation:
project_id
: Unique numeric ID for each projectproject_name
: Required name of the projectclient_name
: Who requested the project (e.g., BRAC, Grameenphone)start_date
,end_date
: Date range for deliverybudget
: Budget allocated in BDTstatus
: Default set to 'Pending'created_by
: Name of project creator (e.g., Arif, Nasrin)
📋 Sample Projects
project_id | project_name | client_name | start_date | budget | status |
---|---|---|---|---|---|
101 | HR Portal | BRAC | 2023-01-10 | 500000 | In Progress |
102 | Billing System | Grameenphone | 2023-03-01 | 800000 | Pending |
103 | POS Software | Agora | 2023-05-20 | 300000 | Completed |
📝 Practice Tasks
- ✅ Add a new column
project_type
(Web, Mobile, ERP) - ✅ Insert 3 custom projects of your own
- ✅ Change status to 'Completed' for project_id = 101
- ✅ Delete a project where budget is under 400000
📌 Bonus Challenge
Link this table with an employees
table by adding a manager_id
field and a foreign key constraint.
📌 Summary:
Practice designing real-world tables like project tracking systems. Define appropriate data types, constraints, and relationships for efficient project management.
Practice designing real-world tables like project tracking systems. Define appropriate data types, constraints, and relationships for efficient project management.
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন