entity-relationship

Generating entity relationship diagram in Visual Studio 2015

牧云@^-^@ 提交于 2019-12-04 06:07:59
Can you tell me how I can generate an ER diagram for my database1 (see below) created with VS 2015 Thanks in advance DB Objects in the editor will be related as in Diagram so Just relate objects in the Db and drag to editor. Ensure you installed either Microsoft SQL Server Data Tools or Microsoft Web Developer Tools in order to get the Entity Data Model Designer. These are the steps to generate entity relationship diagram. It was tested in VS2012 Open Visual Studio Create a project or open an existing project (must be Visual Basic, Visual C# project, or Console Application) Right-click the

how to populate database using procedures

不羁的心 提交于 2019-12-04 05:43:56
问题 I have about 15 different Tables filled with different data and different entity relationships. I need to create a script which will populate my database with the content of those tables. After script is finished, i run it in cmd, using sqlplus and later START path to file i have two different sql files, one named db_spec.sql and another db_body.sql. In my db_body.sql i've created a procedure to store data from two tables which have 1:N relationship. First table CREATE TABLE LOCATION ( ID

Is there data visualisation tool for postgresql which is capable of displaying inter schema relations as well? [closed]

岁酱吖の 提交于 2019-12-03 22:14:31
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. Closed 3 years ago . Operating system used is linux. I have tried Navicat and SQL Power Architect . They did display relations between tables in the same schema. I have some foreign key constraints which reference tables in a different schema. Am I missing something with respect to Navicat and PostgreSQL Maestro? Can they not display the inter schema relations? Is there data visualisation tool for postgresql which is

Symfony and Doctrine: cross database relations

淺唱寂寞╮ 提交于 2019-12-03 21:03:54
I have two entities Entity1 and Entity2 with a OneToMany relation, but they live in two MySQL databases. How can I implement those entities with their relation in Symfony? Is it possible to create two separated bundles where to implement those entities? In Doctrine, joining data across databases is not technically “supported” by a designed feature, but you can make it work by tricking Doctrine a little bit. If you want to build a relationship between entities then they must use the same connection: same database. The key to getting multiple databases to work is within your entity classes, you

Single line with an arrow mark in Entity Relattionship diagram

天涯浪子 提交于 2019-12-03 17:38:59
问题 What do single line with an arrow mark in ER diagram represent? 回答1: 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 回答2: E.R diagrams represent entities as boxes, and

Entity framework POCO

为君一笑 提交于 2019-12-03 16:57:53
What does one loose by creating POCO using T4 templates in entity framework 4.0? Why is the default behavior when using entity framework 4.0 not to create POCO? You lose a number of things. A "pure" POCO is of limited use in an ORM, because it will not do change tracking. In other words, when you mutate the object and then save changes to the context, you would like the changed properties saved to the database. With a "pure" POCO you can do this with snapshot based change tracking, which is fairly inefficient. You can also do it with runtime proxies, which force you to make your track

Design question: Filterable attributes, SQL

五迷三道 提交于 2019-12-03 16:49:51
I have two tables in my database, Operation and Equipment . An operation requires zero or more attributes. However, there's some logic in how the attributes are attributed: Operation Foo requires equipment A and B Operation Bar requires no equipment Operation Baz requires equipment B and either C or D Operation Quux requires equipment ( A or B ) and ( C or D ) What's the best way to represent this in SQL? I'm sure people have done this before, but I have no idea where to start. (FWIW, my application is built with Python and Django.) Update 1: There will be around a thousand Operation rows and

Should I use an index column in a many to many “link” table?

白昼怎懂夜的黑 提交于 2019-12-03 15:51:51
I have two tables, products and categories which have a many to many relationship, so I'm adding a products_categories table which will contain category_id and product_id . Should I add another (auto-incrementing) index column or use the two existing ones as primary key? That depends. Are you seeing your data more as set of objects (and relational database is just a storage medium) or as set of facts represented and analyzed natively by relational algebra. Some ORMs/Frameworks/Tools don't have good support for multicolumn primary keys. If you happen to use one of them, you'll need additional

What is the best way to represent a many-to-many relationship between records in a single SQL table?

怎甘沉沦 提交于 2019-12-03 14:58:49
I have a SQL table like so: Update: I'm changing the example table as the existing hierarchical nature of the original data (State, Cities, Schools) is overshadowing the fact that a simple relationship is needed between the items. entities id name 1 Apple 2 Orange 3 Banana 4 Carrot 5 Mushroom I want to define two-way relationships between these entities so a user viewing one entity can see a list of all related entities. The relationships are defined by an end user. What is the best way to represent these relationships in the database and subsequently query and update them? One way as I see it

Translating relationship attributes from ER diagram into SQL

不羁岁月 提交于 2019-12-03 14:36:18
Currently trying to get to grips with SQL for the first time, so I am working through a few problems. Here is a sample database spec: Students (name, gender, course) do projects(title). Each project has two supervisors (name, gender, department). All students do a project but not all projects get taken. More than one student can do the same project. Students meet one of their supervisors regular and these meetings are recorded (date, time, student, supervisor, notes). So far I've got an ER diagram drawn up which I think is correct: I can get the basics (e.g. creating a Student table etc) but I