When I try to change data modeling of tables in relational database to anchor model, I face some problems. I have three tables in relational table: Orders, Products, and Orders Detail. Order Detail consist of: primary key of both Products and Orders and also Unit_price, Quantity, and Discount attributes. Can we say that Order Detail is a tie as it consist of Products and Orders primary key? (because tie always contains primary key of the table that related together) And if it is a tie, should we say that Unit_price, Quantity, and Discount are knots of the tie? Can a tie consists of many knots? If it is not a tie, should we say that it is an anchor?
I would make a model like the public "retail model" you can see in the online modeler.
Perhaps Purchase is similar to Order and PurchaseDetail is similar to OrderDetail and Item is similar to Product?
Anyway I would prefer OrderDetail as an Anchor because it is very much like a payment transaction, and I prefer transactions as anchors. You could have PhurchaseDetail as a tie but I think the number of items in your knots will be very large and that qualifies for an anchor instead of a tie.
Perhaps you want to store other attributes on PhurchaseDetail like OrderDetailDate and so on, and then it is much easier with an anchor…
Look at the retail model in the online modeler.
Thank you Mr. Olle. :) Actually tables Orders, Products, and OrderDetails were taken from Northwind database.
In the online modeler of anchor modeling (for Northwind case), all of the tables that exist in database Northwind were changed into anchors, although tabel CustomerCustomerDemo and EmployeeTerritories were the tables that created because cardinality of relation many to many (they're not the original tables of Northwind). My question, why didn't you make them as tie? I prefer to make them as tie because they only consist of foreign keys.
Another question, what if we say that OrderDetail is a weak entity because OrderDetail depends on both tables related to it (Products and Orders)? Can we say that every weak entity should be created as anchor in anchor modeling?
I would also argue that a weak entity should always be an anchor. The reasoning behind this is that even if an entity is weak, it is tangible in the sense that you need to be able to separate it from other entities. As such, it warrants having its own identity (in the form of a surrogate key in an anchor). This is also the case even if that particular weak entity have no attributes of its own.