Data modelling layers: do you wanna get logical or physical

An introduction to data models

Top three mobile application threats

Interview In the bad old days we used to progress from "current physical" to "current logical" models. We then used to transform the "current logical" to the "new logical" – and about then the deadline cut in and we scurried about hacking the code for the new system which is about as "new physical" as you can get. No wonder the agile people noticed that it made more sense to devote your time and intelligence to the "new physical", which wasn't going to be thrown away soon after you finished.

And yet, I remember that modelling the current physical and logical models of, in particular, the data we were processing was how I convinced my business users that I understood their needs. And I found many potential errors in the process of modelling the new logical, which could be addressed relatively cheaply just by redrawing the model.

So, was the implementation of process back then wrong, rather than the process itself? Do physical and logical models – and, specifically, physical and logical data models – have a place in development today?

Picture of Donna Burbank.

That seemed like a question to ask Donna Burbank (director, Enterprise Modelling and Architecture Solutions at Embarcadero, the data analysis tools vendor).

Reg Developer: So, Donna, what are physical & logical data models?

Donna: The physical model is designed for a particular database platform, such as Oracle, SQL Server, Sybase, etc. A logical model, on the other hand, sits between the conceptual/business layer and the physical/implementation layer. While it can be considered readable by business users, and contains key business definitions, it is structured in a way that can drive the creation of physical database structures.

The logical model would contain a single entity definition of "customer", for example, and this could be mapped to multiple physical implementations: tables on Oracle, SQL Sever, Sybase, DB2, etc.

Reg Developer: Well, why do we need a logical model? Surely, we're unlikely to move off Oracle, say; and the Oracle database contains all we're going to store about customer, so why not simply document our Oracle implementation?

Donna: A logical model provides key semantic and logical information around data. In using the word "logical", in this context I'm referring to the mathematical sense of the word "logic". There are core principles of set theory introduced in the logical model. For example, what information is contained in this set of data that our Oracle database holds and how does this information logically relate together? For example, can a customer have more than one account with the company? Or just one? That difference is subtle, but it affects the way the tables are created on the physical database. The logical model helps flush out these details.

By semantics, I mean the definitions and business meaning of data. Before we build a table on Oracle called CUST, let's understand what data needs to be contained in that table. The definition of something as simple as customer seems straightforward, but there can be key differences in meaning depending on who's defining and using the data.

For example, a customer to accounting may be a person who has purchased a product from the company and has an active account. A customer to the sales organisation may be a prospect who has not yet purchased a product from the company. Mixing these two together can cause incorrect information to be reported to an end user. When the CEO asks "how many customers do we have?" these seemingly nitpicky differences can be important.

Think of a data architect as playing a similar role to an architect building a house. The customer purchasing the house starts with a basic request like "I want a new house in the countryside". The architect then needs to ask questions and build a model of this new house with enough detail for the construction engineer to build a physical design. For example, would you like a single story or multiple levels in your home? Sliding-glass windows, double-hung, bay? Defining these details can be frustrating and time-consuming to the customer, but they are critical to ensuring that the end product meets the customers' needs, and at the same time is structurally solid. A logical data model serves a similar role.

Reg Developer: OK, so now we have two data models. But I'm hearing people talk about a third level, the conceptual data model. What's that, and why would we need it?

Donna: Well, a conceptual data model is a design layer above a logical data model. It is meant to be read and understood by business users and has fewer objects than a logical model

In a way, you could simply use a logical model with fewer objects and/or constraints to show to your business users and many data architects use the same rules (cardinality, supertyping, etc.) in a conceptual model that they do in the logical - but they may have fewer entities and perhaps not display attributes, for example.

However, by having a conceptual model as a distinct design layer, you are able to see the relationship and lineage map from the business needs (conceptual), to the design layer (logical) to the physical layer (database). You can "forward engineer" from the conceptual to the logical and keep this lineage intact. That's a key difference.

And many other data architects and (importantly) business users consider the conceptual model to be more free-form, without the design constraints of a logical model. This allows the business users, in particular, to use "boxes-and-lines" to express their ideas and concepts around the basics subject areas and data objects of the business, without having to be a data modeller. The data modeller can then add the appropriate constraints to the logical model; leaving the business user free to think creatively. The key here is that this helps to get the requirements from the business - which is often a challenge. Don't make the business user be a data modeller...let them think and design in a format more similar to PowerPoint and Visio.

Reg Developer: All right, so which group wins? How do you handle this in Embarcadero's tools?

Donna: After interviews with many customers, the result was split about 50/50 between the two camps.

Embarcadero's tool allows both methods, and both can be forward engineered to a logical data model. The conceptual model with rules transforms more fully, with less work needed from the data architect, but both can be done.

Reg Developer: Do you have an illustration of this?

Donna: The pyramid below shows the various design layers, the audiences for each, the objects in each, and the fact that the number of objects decreases as you go from physical to conceptual (i.e. there may be many physical tables required to support the concept of "sales").

Illustration of the data modelling pyramid.

Combat fraud and increase customer satisfaction

More from The Register

next story
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
prev story


Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
SANS - Survey on application security programs
In this whitepaper learn about the state of application security programs and practices of 488 surveyed respondents, and discover how mature and effective these programs are.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.