data-modeling

Tools to visualize a database and understand the datamodel quickly [closed]

末鹿安然 提交于 2019-12-05 05:29:14
问题 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 5 years ago . I have several SQL Server 2005 databases ranging from 20 – 600 tables in an application and no documentation. I am looking for a database diagramming tool that is smart enough to pick tables that seem to be related to one entity (e.g., tables related to Patient, tables related to Orders) or one functionality (e

Cassandra data modeling for one-to-many lookup

99封情书 提交于 2019-12-04 17:41:34
Consider the problem of storing users and their contacts. There are about a 100 million users, each has a few hundred contacts and on an average contacts are 1kb in size. There may be some users with too many contacts (>5000) and there may be some contacts that are much (say 10x) bigger than the average of 1kb. Users actively add contacts and less often also delete them. Contacts are not pointers to other users but just a bundle of information. There are two kinds of queries - Given a user and a contact name, lookup the contact details Given a user, look up all associated contact names I was

How to model party relationship data in ofbiz?

浪尽此生 提交于 2019-12-04 16:00:50
I'm confused with the ofbiz data model. PARTY RELATIONSHIP is a relationship from one PARTY to a another PARTY corresponding to a pair of PARTY ROLE s. Entity PARTY RELATIONSHIP will have PARTY_ID_FROM , PARTY_ID_TO , ROLE_TYPE_ID_FROM , ROLE_TYPE_ID_TO and PARTY_RELATIONSHIP_TYPE_ID which is stored in PARTY RELATIONSHIP TYPE entity. But in that entity is also stored ROLE_TYPE_ID_VALID_FROM and ROLE_TYPE_ID_VALID_TO . Could have duplicate data in there ? And would PARTY_RELATIONSHIP_TYPE_ID be a part of the key to the PARTY RELATIONSHIP entity? A PARTY RELATIONSHIP joins only two other

Django multi-table inheritance alternatives for basic data model pattern

偶尔善良 提交于 2019-12-04 13:29:41
问题 tl;dr Is there a simple alternative to multi-table inheritance for implementing the basic data-model pattern depicted below, in Django? Premise Please consider the very basic data-model pattern in the image below, based on e.g. Hay, 1996. Simply put: Organizations and Persons are Parties , and all Parties have Address es. A similar pattern may apply to many other situations. The important point here is that the Address has an explicit relation with Party , rather than explicit relations with

Data Model tools for DB2

大城市里の小女人 提交于 2019-12-04 12:59:32
问题 I have created a Database in DB2 and tables with relationships. I would like to create a ER diagram based on my database design in DB2. MS SQL has a facility to create ER diagrams from DB schema, but DB2 doesn't seem to have one, at least to my knowledge. Any one know of any open source tools/facility within DB2 itself for this? 回答1: You could try TOAD for DB2 (freeware and commercial versions). Download here Also IBM Data Studio looks promising. 回答2: DbVisualizer can visualize (and much more

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

萝らか妹 提交于 2019-12-04 12:47:24
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 project as ..."? Of course I got use a roleId as an attribute as I would design it as a database, but

Modelling an equivalent of database NULL in RDF

岁酱吖の 提交于 2019-12-04 12:03:51
问题 I would like to know if there is a standard or generally accepted way of representing an equivalent of NULL used in databases for RDF data. More specifically, I'm interested in a way to distinguish the following cases for a value o of a property p ( p is the predicate, o the object of an RDF triple): The value is not applicable , i.e. property p does not exist or does not make sense in the context. The value is unknown , i.e. it should be there but we don't know it. The value doesn't exist ,

Data modelling draft/quote/order/invoice

走远了吗. 提交于 2019-12-04 09:39:02
问题 Im currently working on a small project in which I need to model the following scenario: Scenario Customer calls, he want an quote on a new car. Sales rep. register customer information. Sales rep. create a quote in the system, and add a item to the quote (the car). Sales rep. send the quote to the customer on email. Customer accept the quote, and the quote is now not longer a quote but an order. Sales rep. check the order, everything is OK and he invoice the order. The order is now not

Can I merge two databases into one in Mysql if they both have the same schema?

眉间皱痕 提交于 2019-12-04 09:35:01
问题 I have two databases in MySQL that already have data. they have exactly the same schema. I would like to merge those two databases into one only. I tried: mysqldump -u root -p --databases database1 database2 database3 > database1_database2_da However, when I try to open database1_database2_da , I only end up with data from one of the database, but not all of them. I also want to mention that the two databases have their records starting at 1, since they are automatically generated. Do you

Modeling Friends and Followers in an RDBMS

橙三吉。 提交于 2019-12-04 08:45:04
问题 I'm trying to decide on the best way to model a relationship of records in a relational database. It's the classic friend/follow model: ~~~~ A User can have zero to many friends. A User can have zero to many followers. Friends and followers are both Users themselves. ~~~~~ What's the best way to model this? Thanks! 回答1: Users (UserId, ...) Subscription (Subscriber, Publisher) Friendship (FirstUser, SecondUser) CREATE TABLE Users ( UserID int not null primary key, ... ) CREATE TABLE