What is the database management system (DBMS)? Briefly explain various types of relationships in a database with examples. Why do we need to validate and format field data in a database? Explain.
10 marks
Question source
- Exam year
- 2080 BS / 2023 AD
- Level
- Gazetted First Class (Computer Operator – Prabidhik)
- Paper
- Paper II – Sewa Sambandhit Karya Gyan
- Section
- Section A
Model answer
A DBMS is software that stores, organizes, retrieves and manages databases — e.g. MS-Access, MySQL, Oracle. It lets offices define tables, enter data safely, enforce rules, and get reports via queries/forms.
Types of relationships (link via PK → FK):
1. One-to-Many (1:M) — most common:
One parent row relates to many child rows. Example: One Department has many Employees. Implementation: Department.DeptID (PK) → Employee.DeptID (FK). In Access: Database Tools → Relationships → drag DeptID → enforce referential integrity.
2. Many-to-Many (M:N):
Many on both sides. Example: Students ↔ Courses (one student takes many courses, one course has many students). Implementation: third junction table Enrollment(StudentID, CourseID) splitting into two 1:M links.
3. One-to-One (1:1):
One row to exactly one row. Example: Employee ↔ EmployeeConfidential (passport/medical kept separate for security). Implementation: link PK to PK/unique field.
Why validate and format?
Validation — controls what is allowed (prevents wrong entry at source):
- Required (cannot blank CitizenshipNo), Rule (
Marks >=0 And <=100), Text ("Marks 0–100 only"), Input mask (0000-00-00for date), Lookup list (Gender, 77 districts). Example: Age rule>=18 And <=60blocks 15 with a clear message.
Formatting — controls how it looks (readability, no value change):
- Date
15-Jan-2024, CurrencyRs. 50,000.00, uppercase names, phone mask. Same stored value, consistent display for reports and printing.
Without both, salary, marks and IDs become inconsistent and reports fail — validation saves correction cost later.