Example of a Database
UNIVERSITY Database
To illustrate basic database concepts, consider a simple UNIVERSITY database that stores information about students, courses, sections, grades, and prerequisites. The database consists of five files (or record types), each holding data of a particular kind:
-
STUDENT
-
COURSE
-
SECTION
-
GRADE_REPORT
-
PREREQUISITE
Each file contains multiple records of similar structure. Below are the record formats and sample entries.
Record Structure and Data Types
To define this database, the structure of each record must be specified. For example:
-
A STUDENT record contains:
Name (string), Student_number (integer), Class (coded numeric level), Major (string) -
A COURSE record includes:
Course_name, Course_number, Credit_hours, Department -
The GRADE_REPORT record contains:
Grade, which may be a single character from {A, B, C, D, F, I}
Coding may be used, such as:
-
Class:
-
1 = Freshman
-
2 = Sophomore
-
3 = Junior
-
4 = Senior
-
5 = Graduate student
-
Relationships Among Records
The files are interconnected. For example:
-
The STUDENT record for Smith (17) is linked to several GRADE_REPORT entries showing his grades.
-
PREREQUISITE records connect one COURSE to another COURSE that must be completed beforehand.
Medium to large databases often include many such record types and relationships.
Sample Database Operations
Queries
Examples of questions a user may ask:
-
Retrieve Smith’s full transcript (all courses and grades).
-
List all students who took the Database course in Fall 2008 and show their grades.
-
Retrieve all prerequisites for the Database course.
Updates
Examples of modifications:
-
Change Smith’s Class from 1 to 2 (freshman → sophomore).
-
Add a new section of the Database course for the current semester.
-
Enter a grade of A for Smith in last semester’s Database section.
Such operations must be expressed precisely in the DBMS’s query language.
Database in the Context of an Information System
A university’s information system—handled by the IT department—includes hardware, software, storage, applications, and databases. Designing a database follows several phases:
-
Requirements Analysis
-
Collect and document all data requirements.
-
-
Conceptual Design
-
Create a high-level data model (often using the Entity-Relationship (ER) model).
-
-
Logical Design
-
Map the conceptual schema to a DBMS-supported data model (usually relational).
-
-
Physical Design
-
Specify storage structures, indexing, and access paths.
-
Once implemented, the database is populated with data and maintained continuously to reflect changes in the real-world miniworld.

Comments
Post a Comment