Database

Diving into this project felt like having enthusiasm of a hundred neophytes. I was eager to apply the powerful database concepts I had only recently learned in class and Matisse, the post-relational SQL database, seemed like the perfect tool to do just that.

Why Matisse?

Matisse, the post relational sql database. Isn't particually a new kid on the block but rather unfortunately its been discontinued due to lack of mass adoption of Object Oriented Database Management Systems. Which is unfortunate because matisse isn't just a pure OODBMS. According to them:

Designed to benefit both object developers and database administrators, Matisse combines native support for Object, XML and SQL within a single database.

Unlike traditional relational databases or even pure object-oriented database management systems (OODBMS), Matisse provides native support for:

Key Strengths:

These are but a few of the main reasons I decided to use matisse for this project, it allows me to draw up one database schema that in itself maps to application models without having to write boilerplate code two times.

Database Schema

To have a general view of the schema without committing to a single design I started with Database Modeler a tool provided by

Employees & Departments

Employee

The central model representing workers in the organization.

Indexes on EmployeeNumber, Firstname, and Surname help fast retrieval by key identity or name.

Department

Organizational unit with:

Authentication & Access Control

EmployeeLogin

Credentials stored separately with:

Role

Represents the permission level or functional group in the system.

Jobs and Occupations

Occupation

Job titles or duties — e.g., "Technician", "Salesperson".

Clients & Addresses

Client

Represents a customer:

Address

Shared address entity used by both clients and employees:

Loyalty Cards

ClientCard

Optional card associated with a client:

Products and Categories

Category

Used to classify Products. Each has:

Product

Represents a purchasable item in the system:

Indexed on:

Specialized Product: Television

Inherits from Product, and adds:

This inheritance allows reusing common product properties while enriching them with television-specific attributes.