entity-relationship

How to define structure in a tag-based organization?

心已入冬 提交于 2019-12-03 08:29:11
[former title: Is there a way to force a relationship structure on a tag-based organizational methodology?] I have some entities, and they have a series of attributes. Some of the attributes affect what other attributes the entity can have, many of the attributes are organized into groups, and occasionally entities are requited to have certain numbers of attributes from certain groups, or possibly a range of attributes from certain groups. Is there a way to model these sorts of tag-to-tag relationships, such as requirement, grouping, exclusion, etc. using a database, or is this only possible

Single line with an arrow mark in Entity Relattionship diagram

人走茶凉 提交于 2019-12-03 07:33:37
What do single line with an arrow mark in ER diagram represent? As per Bachman Notation which you are using , "For every relation a rectangle has to be drawn and every coupling is illustrated by a line that connects the relations. On the edge of each line arrows indicate the cardinality. We have 1-to-n, 1-to-1 and n-to-m" And "Cardinality use to represent the relationship between two entities." For more on cardinality Notations E.R diagrams represent entities as boxes, and relationships as lines between the boxes. The ends of these lines are shaped to represent the cardinality of the

How to generate Entity Relationship (ER) Diagram of a database using Microsoft SQL Server Management Studio?

半城伤御伤魂 提交于 2019-12-03 04:52:51
问题 I want to generate ER diagram of SQL database using Microsoft SQL Server Management Studio however, I dont know how to. I found this technique online http://forums.asp.net/t/1790223.aspx?Making+ER+Diagram+from+SQL+Server+2008+Database However, I am not able to see "Database Node" or "Database Diagrams" nodes as mentioned in the 1st and 2nd steps. Hence, please let me know how can I generate ER diagram from an existing DB. UPDATE: From the comments below, I realize that I was right in my

Delete child objects in Entity Framework

丶灬走出姿态 提交于 2019-12-03 04:22:29
I'm using EF and when I do this: foreach (var reg in detail.Regs) { this.db.Regs.DeleteObject(reg); } I get this: Collection was modified; enumeration operation may not execute. What I'm I doing wrong here??? The reason for that is because as you delete the objects from the context, EF is actively update the Regs navigation property count which means the detail.Regs collection is being changed during the foreach loop which always cause the exception you are getting. You can create a new collection object and keep deleting from it like this: foreach (var reg in detail.Regs.ToList()) { this.db

Recommendation for a good entity relationship diagram building tool for occasional usage? [closed]

拥有回忆 提交于 2019-12-03 02:56:56
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Freeware is a plus. Could you also describe with one sentence why it should be good enough for occasional usage? Edit: You might check this cool link , providing more info about entity relationship diagrams and tools Edit: For the chosen answer couple of tips - click on entity even it looks like circle and type the name and Enter - it will give you the Entity box - Click on association , Ctrl + L would give you the nice

Entity Framework Code First Class with parent and children of same type as it's own class

那年仲夏 提交于 2019-12-03 01:28:29
I have a class of Content which should be able to have a parentId for inheritance but also I want it to have a list of child content which is nothing to do with this inheritance tree. I basically wanted a link table as ChildContentRelationship with Id's for parentContent and childContent in it and the Content class would have a list of ChildContentRelationship. This has caused a lot of errors. Here's waht I sort of want to do public class Content { public int Id { get; set; } public int? ParentContentId { get; set; } public virtual Content ParentContent { get; set; } public string Name { get;

How can i split an ArrayList of Shapes into partitions/lists in Java (Just advice)

百般思念 提交于 2019-12-02 21:05:15
问题 I just want an advice or suggestions of how i can do it. i've been thinking about it for hours now and can't find a solution. My aim is to convert this ER Diagram to tables. So i have a Rectangle(Entity) that is linked to an ellipse(Attribute). I've already worked out on the collisions of the shapes where the line will retrieve the object that is linked to it. See the picture below: the result will be as follows when the above diagram is drawn: LINE(1) COLLIDES WITH RECTANGLE OF INDEX(0) LINE

Code First Mapping for Entity Framework Hierarchy

匆匆过客 提交于 2019-12-02 20:17:37
问题 I have a model that looks like this: public class Category { public string Id { get; set; } public string Description { get; set; } public Category Parent { get; set; } public ICollection<Category> Children { get; set; } public ICollection<Product> Products { get; set; } } With a database table that looks like Categories Id (PK varchar(5)) Description (nvarchar(50)) ParentId (FK varchar(5)) But Im stumped when it comes to setting up the mapping modelBuilder.Entity<Category>() .HasMany(x => x

How to generate Entity Relationship (ER) Diagram of a database using Microsoft SQL Server Management Studio?

心不动则不痛 提交于 2019-12-02 17:24:43
I want to generate ER diagram of SQL database using Microsoft SQL Server Management Studio however, I dont know how to. I found this technique online http://forums.asp.net/t/1790223.aspx?Making+ER+Diagram+from+SQL+Server+2008+Database However, I am not able to see "Database Node" or "Database Diagrams" nodes as mentioned in the 1st and 2nd steps. Hence, please let me know how can I generate ER diagram from an existing DB. UPDATE: From the comments below, I realize that I was right in my understanding that Database node means the node with my database name. But then my problem is I am not able

Difference between ER diagram and EER diagram

一笑奈何 提交于 2019-12-02 17:10:16
What is the difference between ERD (Entity relationship diagram) and EERD (enhanced entity relationship diagram)? Martin Thoma Entity-Relationship model You have relationships ( image source ) and attributes ( image source ) that can also be primary keys ( image source ) Enhanced entity–relationship model You have the same as with the ER model plus specialisation partitioning (which are multiple specialisations) generalisation aggregation keys are annotated differently: I would add that ER model is basic model which has all you need for relational algebra as it is (including ISA hierarchy -