I have an assignment in my introduction to database course. I chose to try and do a database model to represent basic geometric figures and mathematical objects (functions, polynomes, etc). For example, my db should be able to store (partially) what you can make with a software like GeoGebra (https://www.geogebra.org/classic).

I am doing an ERD, but I have some problems representing relations and entities... The base of my model is the entity Point with three attributes label, x and y. I am having troubles representing figures that are solely composed of Point, but that can contain more Point, e.g.. polygons (composed of N > 3 points, and there can be points INSIDE the polygon area), ellipses (characterised by 3 points, but can contain more points on the edge), etc.

For example, how do I represent a polygon? Is it a weak entity? Can it have two relations (one for the characterisation and one for the content) ?

Here's an extract what I have right now :

Extract of what I have now

I added the id identifiers because... Else there would be nothing inside my tables (which is bad I think).

So I am wondering if these entities should be weak, as they are identified by a set of identifiers of another entity? Can they have no attributes? And is it okay to have those two relations like so for each entity?

I guess what I would like to do is something like Ellipse(focalPoint1, focalPoint2, characterPoint) (3-tuple as compound key) and Has (label, focalPoint1, focalPoint2, characterPoint), but I do not know how to represent this.

1 Answer 1


basic geometric figures and mathematical objects

That isn't the clearest design goal.

  • "mathematical objects" as I know them are designated with formulas and permit infinity, and other abstract notions.
  • "geometric figures" are usually just a subclass of Cartesian polygons.

If you need true circles defined with a radius, you're in for a lot of work. Even professional systems like PostGIS struggle with this, reducing them to polygons. If you need simple geometric polygons modeled in the database, it's significantly easier. You can basically look at the geometric primitives that most systems use point/line/polygon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.