data-modeling

Please refer a GUI Modelling tools for a .Net object database?

I am planning to use an object database, say eloquera (http://eloquera.com/page/home.aspx). If I use RDBMS as storage, there are a lot of GUI modelling tools. But I cannot find one for object database. In other words, a GUI modelling tools to generate .Net (C#) code. If you know one, please tell me. Thanks, Ying Actually I have h...

Help with writing a custom CMS in Django

I'm attempting to write my first CMS in Django. So far I have managed to get a system up and running similar to flatpages but a little more flexible. I have two questions about how I'm approaching the structure of the CMS: Firstly, I am storing HTML tags with the text content in a Postgres database. I've seen a lot of post'ers saying th...

Where should I store a foreign key?

If I have a relationship between two tables (both tables have their own primary keys) what should guide my decision as to which table should store the foreign key? I understand that the nature of the relationship probably matters (one-to-one, one-to-many, many-to-many, uni-directional, bi-directional), and probably access patterns matter...

Modeling resource availability over time with exceptions in Rails

I'm struggling with how to model a resource and its availability using the tools, gems or plugins available to us in Rails. Basically each resource will have a typical availability of 0..24 hours for each day (0,1,2,3,4,5,6) of the week. BUT then there will be exceptions that need to be considered for example a holiday or special event ...

Whats the cleanest way to handle many-to-many relationships in ruby on rails?

I have one model say user, that can live in multiple towns (represented as another model). If I create a new user I have to choose (and edit) the different towns that they live in. Due to time constraints, I often end up with a "hackyier than I would like" solution involving something like: http://blog.hasmanythrough.com/2006/4/20/many-...

How to design the relations between USER and FAVORITE(or LIKE) models in DB.

I have these models(tables): USER, PHOTO, BOOK, QUESTION etc. And now I wanna add the favorite or like feature to the site, that is user can 'like' some photos or books or questions, and of course a photo can be liked by many users. So I wanna ask you how to implement this kind of thing. a page to show the books, photos, quesitons etc w...

Modeling products with vastly different sets of needed-to-know information and linking them to lineitems?

I'm currently working on a site that sells products of varying types that are custom manufactured. I've got your general, standard cart schema: Order has many LineItems, LineItems have one Product, but I've run into a bit of a sticking point: Lets say one of our products is a ball, and one of our products is a box of crayons. While peop...

Forward Chaining vs Backward Chaining

What is one good for that the other's not in practice? I understand the theory of what they do, but what are their limitations and capabilities in practical use? I'm considering Drools vs a java prolog for a new AI project, but open to other suggestions. What are some popular approaches for inferencing on a complicated relational data...

How complicated can Rails models be? sample projects?

I'm trying to move past the beginner stage of Rails and into the intermediate but I'm finding it hard to find more advanced examples to learn from. For example, I've read that you need to be careful about "Nested Routes" and shouldn't go more than 2 deep. What happens in a situation like this? Customer can place many Orders Orders c...

performance between varchar(1) vs char(1)

Is there any performance difference between varchar(1) and char(1)? Which RDBMS handle these two datatypes and sizes in different ways? ...

Data model: parent and child 'dual' relationship

I am trying to create a proper parent/child relationship within my data model. I have a typical one to many relationship between the parent and children. I am wondering if I have parents that know about their children, is it 1) ever acceptable and 2) a good idea for each child to specifically know about its parent. (a child can only hav...

LINQ entities used in models. Can I use OnPropertyChanged, and IEditableObject?

Let's say I have an app and a web site using the same database. I wan't to create a Data layer and some model objects. In many cases the model objects uses alot of info from some of the database tables. My idea was to wrap the LINQ to SQL entity class for the table inside the view so I won't have treate the properties again. I was wonde...

Data modeling in Cassandra

Hi, I'm building a data base where some users can put tag in others data. Something like Last.fm. How can I implement a DB in cassandra for this application. The Tag must be associate with the user and the data. Is there any data modeling pattern for cassandra? The Stack overflow tags is a good example of what I want to do! :) tha...

Modeling question about categorization. To subtype or not to?

I need some advice on how to model this simple categorization (?) example: I have a product. A product can be of different types, such as ProductType 1, ProductType 2, and ProductType 3. All products have a part number and a name. Where they differ, is the way their prices are calculated. Products in type 1's price are dependent on how...

How to model a HPC queueing system with Objective-C

I am trying to program an application for the mac to query a high performance computing cluster about its running and queued calculation jobs. The aim is to be able to monitor the submitted jobs if they are still queued and waiting for execution or if they are running and on which node or host in the cluster. On the GUI side I would lik...

What's the Best Way to Simulate an Array Type Attribue in Core Data?

I've got a list of contacts, each having several emails. Should I create a Contact Core Data entity and a Email entity and link several email objects to one contact object? Or should I do it another way e.g concatenate all the emails and store them as one big string? What's the cleanest and most efficient way to deal with such a config...

EF4 many-to-many navigation property is empty

Using the model-first approach, I made 2 entities: Project and User. A project has multiple Users (involved in the project), and a User has (access to) multiple Projects, so following along with the Tekpub video, I made the many-to-many navigation property using the primary keys of the two entities. I made some test data, and the data ...

Mappings between Data Models in n-Tier Systems !

Greetings Overflowers, I'm really tiered of over-thinking this subject Here are typical mappings: Relation DB Model <> Server OO Model <> Serialized Model <> Client OO Model <> stands for bi-directional mapping I'm currently using Java for my backend and ExtJS (JavaScript library) for my frontend. It makes sense to serialize to/from...

ER inheritance modeling

A supply farm can have a transportation document. If present it can be one of two types: internal or external. Both documents share some common data, but have different specialized fields. I though of modeling this in a OO-ish fashion like this: In the document table, one of the two doc_*_id is null, the other is the foreign key with...

App Engine data modeling problem

I'm kinda new to modeling my data model for efficient querying with GAE, but have extensive knowledge with RDBMS. Here's the problem: I got roughly a million terms (strings) and need to query and compare associated numerical values as a time series with weekly data points. Think of it as a graph with time on the X axis and a linear...