Question

I have recently been asked to draw a Relational Data Model for a flight information database. I came up with the design in the picture below, but I was told that the drawing is not correct because that is not quite what is meant by RDM and also because the data types are not included. Is this true? I have looked into many articles and books and I have not seen yet any RDM with data types in it.

Thanks! enter image description here

Était-ce utile?

La solution

In a nutshell: Your diagram would be more complete if it showed the data types -- and a relational DB design must have data types specified -- but as a brief summary, it is OK to omit types for brevity, especially if your field names are descriptive enough.

Strictly speaking, the relational DB model includes the table and the column where a table is a tuple of columns and each column is of a particular type.

What you are drawing is a relational DB schema or design -- an application of the model for a particular business case. Although, again, strictly speaking, what you have drawn is a hybrid between an entity-relationship diagram (ERD) and a relational schema -- even though it is a very common and useful style of diagram.

An ERD would not have any surrogate (system-generated) keys, as those are not part of the business semantics, but would have the lines -- labelled with 1 or m -- representing logical connections between entities.

On the other hand, a relational schema would not have any connecting lines as these links are not explicitly part of the relational model -- the links are implied by fields having the same data type -- but it would have surrogate keys.

As for the missing data types, yes, ideally both the DB schema and the ERD are much more complete if/when they also specify those, but that is not to say you cannot have diagrams of different levels of detail for economy of communication.

Licencié sous: CC-BY-SA avec attribution
Non affilié à dba.stackexchange
scroll top