data-modeling

qualified relationships in datomic

风流意气都作罢 提交于 2019-12-22 04:37:12
问题 In a relational DB, I could have a table Person and a table Hobby . Every person can have zero, one or more hobbies , and I also want to record, say, the priority of those hobbies for every person . I could create a relationship table with the 2 foreign keys PersonFK and HobbyFK , and one plain column Priority . In datomic, to model a simple n:m relationship (without the priority), I'd probably create an attribute of type Reference with cardinality Many , that I'd use for Person entities. But

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

How to remove an entity class in a Symfony2 project

笑着哭i 提交于 2019-12-21 20:04:38
问题 When we initially designed our project, we had a couple of entities that to date are unused (and we don't plan to implement them in the near future). Ergo I want to remove them from my project. I would proceed like this (all steps manually performed): Remove all relations from my currently used entities. Delete the doctrime ORM file src/Resources/config/doctrine Delete the class PHP file from src/Entity Remove the table from the database What I would like to know: Are there any routines (e.g.

How to remove an entity class in a Symfony2 project

∥☆過路亽.° 提交于 2019-12-21 20:01:03
问题 When we initially designed our project, we had a couple of entities that to date are unused (and we don't plan to implement them in the near future). Ergo I want to remove them from my project. I would proceed like this (all steps manually performed): Remove all relations from my currently used entities. Delete the doctrime ORM file src/Resources/config/doctrine Delete the class PHP file from src/Entity Remove the table from the database What I would like to know: Are there any routines (e.g.

Choosing a partition key for a Cassandra table — how many is too many partitions?

百般思念 提交于 2019-12-21 12:21:44
问题 I have an application where the 'natural' partition key for a Cassandra table seems like it would be 'customer'. This is the primary way we want to query the data, we would get good data distribution, etc. But if there were well over 1 million customers, would that be too many different partitions? Should I choose a partition key that results in a smaller number of partition keys? I've looked at a number of the related questions on this topic but none seem to address this particular point.

What is the best way to store a historical price list in a MySQL table?

我与影子孤独终老i 提交于 2019-12-21 05:11:07
问题 Basically, my question is this - I have a list of prices, some of which are historical (i.e. I want to be able to search that product X was $0.99 on March 11, $1.99 on April 1, etc...). What is the best way to store this information? I assumed I would probably have a Product table that has a foreign key to a price table. I initially thought that storing the current price would probably be the best bet, but I think I want to be able to store historical price data, so would the better route to

When two tables are very similar, when should they be combined?

戏子无情 提交于 2019-12-21 04:52:27
问题 I have events and photos, and then comments for both. Right now, I have two comments tables, one for comments related to the events, and another for photo comments. Schema is similar to this: CREATE TABLE EventComments ( CommentId int, EventId int, Comment NVarChar(250), DateSubmitted datetime ) CREATE TABLE PhotoComments ( CommentId int, PhotoId int, Comment NVarChar(250), DateSubmitted datetime ) My questions is whether or not I should combine them, and add a separate cross reference table,

Variable Substitution with FetchRequests stored in a CoreData Model

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 04:22:06
问题 I've always created my NSFetchRequests entirely in-code. Now I'm looking at the Xcode GUI for building a fetch request and storing it in the model. I'm following an example from the Xcode Documentation. I added a Fetch Request to my model, and the predicate that has been created through the Modelling GUI is: firstName LIKE[c] "*SUBSTRING*" I then retrieve that request with these two lines: NSDictionary *substituionDictionary = [NSDictionary dictionaryWithObject:@"woody" forKey:@"SUBSTRING"];

How to work with type hierarchies in Neo4j?

不羁岁月 提交于 2019-12-20 20:31:07
问题 Is there some way to model type hierarchies in Neo4j? If for example I want to build a class hierarchy of cars, I might have a base type of "Car" and then have sub classes that extend that, like "SportCar", etc. I'd like to be able to create instances of "SportCar", but run a query to get all "Car"s. Is this possible? If so what is the technique? I think what I'm trying to do is create a "label hierarchy" - but I just don't think that's supported in neo4j. 回答1: Paul, First, I'd recommend that

Survey Data Model

荒凉一梦 提交于 2019-12-20 16:47:16
问题 I'm developing a simple survey module for an ASP application I'm working on and I'd like to get some suggestions on the data model. Questions can be one of three types - multiple choice, multiple answer; multiple choice, single answer, and free response. I'm thinking of the following tables: Question - with a question type discriminator ifeld PossibleAnswers- with a questionID and answer text field SurveyQuestionResponse- with a questionID, a clientID, and answer text Am I making this too