erd

relational database design scenario

北城余情 提交于 2019-12-24 10:35:51
问题 Consider we have 2 tables like the following: products: id, name (PK = id) product_group1: product_id (PK = a1_id) (FK = a1_id REFRENCES a1) product_group2: product_id (PK = a1_id) (FK = a1_id REFRENCES a1) product_group3: product_id (PK = a1_id) (FK = a1_id REFRENCES a1) the question is , I want to design a table called approved_products that only accepts products from group1 and group2(not group3). how can I design such table ? (I'm using mysql BTW) 回答1: You cannot solve this problem with

Generate graphical schema representation from CREATE TABLE SQL

£可爱£侵袭症+ 提交于 2019-12-24 00:39:09
问题 I have a .sql file containing many CREATE TABLE statements. There's no referential specification (MyISAM stuff) but I would enjoy to create different table boxes, and then compose the table relationships by hand. I am using a mac. Is there a free program to do this ? 回答1: Yes, the MySQL Workbench can reverse-engineer a diagram from an SQL script that contains a set of CREATE TABLE statements. Use the menu: File > Import > Reverse Engineer MySQL Create Script... 回答2: Go to SchemaBank, open a

Need help designing ERD for food bank

主宰稳场 提交于 2019-12-23 19:25:01
问题 This is my first project outside of school so I'm rusty and lacking practice. I want to create a database but I'm not sure if I'm doing ok so far. I need a little help with the reports table. The situation: The food bank has multiple agencies who hand out food Each agency has to submit a report with how many families/people served from a long list of zip codes. I thought of putting a fk on Report to Zips table. But will that make selecting multiple zips impossible? Maybe I'm way off base.

Why is it necessary to indicate identifying or non-identifying relationships in an ERD?

拈花ヽ惹草 提交于 2019-12-23 12:44:01
问题 In an ERD, a weak/non-identifying relationship is one that connects two strong entities, and is indicated with a dashed line. A strong/identifying relationship is one that connects a strong entity to a weak entity (a weak entity is one that contains the foreign key [FK] from its related entity as a component of its own primary key [PK]), and is indicated by a solid line. My question is, So what? Why is it so important to distinguish between weak/non-identifying relationships versus strong

Why is a specific cardinality not allowed in the ERD?

元气小坏坏 提交于 2019-12-22 18:30:49
问题 In every tutorial on entity relationship diagrams, I read that specifying a fixed cardinality for a relationship is not allowed. Only an informal comment on the ERD may clarify that the number of pilots is exactly 2 . So, for example, a relationship between flights and pilots where each flight has exactly 2 pilots present, would have to be represented as: <flight> 0..N <------> 1..N <pilot> rather than <flight> 0..N <------> 2 <pilot> My notation is 0..N = optional, many; 1..N = mandatory,

Create ERD for Advantage Database Server 10

房东的猫 提交于 2019-12-22 13:56:01
问题 I need to create an ERD for an ADS 10 database. Reverese Engineering would be nice, since the database already exists. Unfortunately, I didn't found a ERD-Tool which supports this database. Does anybody knows a tool which supports this features? 回答1: You can use the Advantage Data Architect to get a model of a database. As far as I know this only works on data dictionaries, but you can easily add free tables to a dictionary if necessary. I don't know of any other ADS compatible modelling

Generate mysql erd with connections [closed]

不羁的心 提交于 2019-12-22 12:13:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I need to generate er diagram from dump of mysql database. I tryed a lot of tools like MySQL WorkBench and they generate only tables, but not connections between them. I need something like this http://www.cacti.net/downloads/docs/sql/database_schema.pdf (last page). Which software could make it? Thanks. 回答1:

ERD - How to model a relation between two entites with a third entity as “attribute”

大兔子大兔子 提交于 2019-12-21 20:44:13
问题 I'm modeling an entity relationship diagram and got stuck. I'm not sure if my considerations are wrong or an ERD can't modell what I want: I have three entities: Employee, Project and Role. There is a relation between Employee and Project: an employee is working on a project. But this employee isn't just working on this project, he/she has a field of operation that is given as a role. But isn't a relation just described by attributes? How can I make something like "An employee works on this

Avoid Circular Dependency

て烟熏妆下的殇ゞ 提交于 2019-12-21 02:28:17
问题 I am developing a travel management application. The design in question is something like following : Each person in a tour is designated as a Traveler. Each Traveler has a Passport. Now, a Traveler can be a MainMember or a SubMember, depending on whether or not he is the head of the family. A MainMember decides stuff like TourPackage, total amount for his travelling family, etc. A SubMember is dependent on the MainMember while travelling. So, if a MainMember is deleted, all its SubMembers

Equivalent of ERD for MongoDB?

安稳与你 提交于 2019-12-18 12:04:41
问题 What would be the equivalent of ERD for a NoSQL database such as MongoDB? 回答1: It looks like you asked a similar question on Quora. As mentioned there, the ERD is simply a mapping of the data you intend to store and the relations amongst that data. You can still make an ERD with MongoDB as you still want to track the data and the relations. The big difference is that MongoDB has no joins, so when you translate the ERD into an actual schema you'll have to make some specific decisions about