A database designer usually builds a database schema to assist developers whose applications communicate with the database. Data modeling refers to the process of developing a database schema. This stage would come after establishing a logical model in the three-schema methodology to database architecture. Conceptual schemas are concerned with the knowledge demands instead of the architecture of a database. There are two types of database schema (Imam et al., 2018):
A database schema describes which columns or relationships comprise the database and the attributes featured on every table. As a result, schema design and entity-relationship diagram are sometimes used interchangeably (Imam et al., 2018). The figure below illustrates the schema (ERD) for the proposed prescription database.
Figure 1: Prescription Database Schema
Processes Associated with the Business Rules
A business rule is a guideline, technique, or practice that governs an institution. It is vital to identify and define the business logic when creating a database. These rules allow the database designer to specify the interaction between the participation limitations and guidelines and the appropriate data design. A database designer should comprehend procedures and the kind, role, and scope of the data to create a database that will be useful to the organization. The prescription database is subject to specific business rules listed below.
Entity Relationship Diagram and Data Dictionary
A Data Dictionary collects labels, descriptions, and properties for data components utilized or recorded in a database, computer system, or research project. It defines the interpretations and goals of data items in the context of a project and gives direction on understanding, accepted meanings, and layout (Buchanan et al., 2021). In addition, a Data Dictionary provides metadata on data items. A Data Dictionary’s metadata can help define the scope and properties of data items and the criteria for their utilization and application. The table below describes the data dictionary for the proposed prescription database.
TABLE NAME | ATTRIBUTE NAME | TYPE | Size | REQUIRED | PK or FK |
PATIENT | PatientID | INTEGER | 10 | Yes | PK |
PatientFirstName | VARCHAR | 30 | Yes | ||
PatientLastName | VARCHAR | 30 | Yes | ||
DoB | DATE/TIME | NA | Yes | ||
Gender | BOOLEAN | 10 | Yes | ||
Address | VARCHAR | 100 | Yes | ||
TelephoneNumber | VARCHAR | 10 | Yes | ||
PHYSICIAN | PhysicianID | INTERGER | 10 | Yes | PK |
PhysicianFirstName | VARCHAR | 30 | Yes | ||
PhysicianLastName | CHAR | 30 | Yes | ||
Specialty | VARCHAR | 50 | Yes | ||
TelephoneNumber | CHAR | 10 | Yes | ||
PRESCRIPTION | PrescriptionID | INTEGER | 10 | Yes | PK |
DrugDosage | VARCHAR | 20 | Yes | ||
IssueDate | DATE/TIME | NA | Yes | ||