What are tables, fields, records and relationships in the database management system? Differentiate between formatting and validating field data in DBMS.
10 marks
Question source
- Exam year
- 2081 BS / 2025 AD
- Level
- Level 4
- Paper
- Subjective
- Section
- Technical & Applied Questions (100 Marks)
Model answer
A database management system (DBMS) stores related data in an organized form and provides facilities to enter, retrieve, update, secure and relate that data. In a relational database, tables, fields, records and relationships work together to represent real-world entities.
Tables, fields and records
-
Table: A table is a named collection of related data arranged in rows and columns. Each table normally represents one type of entity, such as
Students,CoursesorEmployees. Combining unrelated subjects in one table creates duplication and makes maintenance difficult. -
Field: A field is one named attribute or column of a table. Each field has a data type and properties that determine the values it can store or display. A
Studentstable might containStudentID,StudentName,DateOfBirthandEmail.StudentIDmay be the primary key, which uniquely identifies every student. -
Record: A record is one complete row containing the field values for a single entity instance. For example,
S104 | Maya Thapa | 2064-02-15 | [email protected]is one student record. The intersection of one field and one record contains one value.
| StudentID | StudentName | DateOfBirth | |
|---|---|---|---|
| S104 | Maya Thapa | 2064-02-15 | [email protected] |
| S105 | Ramesh Karki | 2063-09-04 | [email protected] |
In this table, the column headings are fields and each horizontal row is a record.
Relationships
A relationship is a logical association between records in two tables, usually established by connecting the primary key of a parent table to a matching foreign key in another table. Relationships reduce repeated data and allow related information to be retrieved through queries.
The principal relationship types are:
- One-to-one (1:1): One record in table A is related to at most one record in table B, and vice versa. For example, one employee may have one separately stored security-profile record.
- One-to-many (1:M): One parent record can relate to many child records, but each child belongs to one parent. One department has many employees;
DepartmentIDis stored as a foreign key in theEmployeestable. This is the most common type. - Many-to-many (M:N): Many records in each table relate to many records in the other. Students can take many courses, and each course can have many students. A junction table such as
Enrollments(StudentID, CourseID, EnrolmentDate)converts this into two one-to-many relationships.
Referential integrity ensures that a foreign-key value refers to an existing primary-key value. It prevents, for example, an enrolment from referring to a student who does not exist.
Formatting and validating field data
Formatting and validation are both field controls, but their purposes are different.
| Basis | Formatting field data | Validating field data |
|---|---|---|
| Purpose | Controls how a stored value is displayed or printed | Controls whether an entered value is acceptable |
| Effect on underlying value | Usually changes appearance, not the stored value | Accepts or rejects input according to a rule |
| Example | Display 1250.5 as Rs. 1,250.50; display a date as dd-mmm-yyyy | Require marks between 0 and 100; reject an empty StudentID |
| When applied | After or while data is displayed in a table, form, query or report | During data entry or update, before invalid data is accepted |
| User response | The same value appears in a standardized presentation | An invalid entry is blocked or an error message is shown |
In MS Access, a field's Format property can display dates, currency, percentages or custom text consistently. Formatting 0.25 as a percentage shows 25% but does not change the underlying numeric value.
Validation protects data quality. A Validation Rule such as Between 0 And 100 restricts marks, while Validation Text explains the error. Setting Required to Yes prevents a null value. An Input Mask guides entries into a pattern such as a telephone number, although a mask mainly controls entry structure and should be combined with an appropriate data type or rule when semantic validity matters.
Therefore, formatting makes valid data easier to read, whereas validation prevents unacceptable data from entering the database. Using suitable data types, keys, relationships and validation rules together improves accuracy and integrity.