I find modeling physical containers using collections very intuitive. I override/delegate add methods with added capacity constraints based on physical attributes such as volume of added elements, sort based on physical attributes, locate elements by using maps of position to element and so on.
However, when I read the documentation of ...
Hi,
How would you store sales ?
I though about storing a serialized array which contains the products ordered vs a sale_product table with a foreign key referencing products ordered.
What are you thoughts about this ? Any experience with one of these ?
Ty
...
By the way - with reference to data modelling I'm referring to logical or conceptual data models - not physical ones.
The question came up during a discussion at work; naturally I leapt to Wikipedia to get some basic definitions in place - hoping that they might clarify the difference - but they didn't...
A conceptual schema or conc...
I'm thinking of the best way to design a database given the following situation.
There are over 1000 hotel room units.
Each hotel room unit has a list of about 100 individual types of items with a qty attached to them. The inventory is standard for each hotel room. But the qty of each item can be changed.
For example 3 coffee mug...
I'm developing a project management application in Django that requires a somewhat linear response process involving different groups of users (as in Django auth Groups). Each step in the response process has several response options (most options unique to the step) and is assigned to a user within a particular group. The next step in...
I'm trying to find a tool where a lot of people can work on a data model collaboratively (doesn't have to be at the same time, a checkout mechanism can work too). Embarcadero has an ER application called ER/studio which apparently comes with a repository system that acts like typical version control software. That sounds great except ER/...
I have a database that contains two tables:
entries
tags
The entries table contains posts that each have one or more tags. The problem is, each post can have any number of tags. In other words, I can't have a 'tag1', 'tag2', etc. column and do a LEFT JOIN.
How should I set up entries so that each post can have any number of tags?
...
hi,
i have a big problem in a simulation model.entities arrrive before and wait until 6.00 am.And entities arrive after 6.00 am dont get any problem and walk inside. How to model this in Rockwell arena????Please help??
Regards,
nilani.
...
I am trying to structure a database for optimal use. But I have no idea how to make that happen. Here is what i will have
A category which will have many products and a count for each on of those products
For example
Restaurants will be the category and the products will be the computer system, cash register and each one of these pro...
I am putting together a DB driven website with kohana and I need to be able to track revisions. So I have the data behind the individual pages in two tables. The first is the generic entity table that I use for keeping track of all the sites content. It contains basic information: resource uid, uri alias, creating user, creation date,...
Choosing good primary keys, candidate keys and the foreign keys that use them is a vitally important database design task -- as much art as science. The design task has very specific design criteria.
What are the criteria?
...
Hi all, I have a question regarding with this database-design. I am a bit unsure of the difference between identifying and non-identifying relationships in a database leading me to some puzzles in my head.
I have this database design: *(kind of like a movie rental stores. "friend" are those who borrow the movie. "studio" is the product...
I have the following locations table:
----------------------------------------------------------
| ID | zoneID | storeID | address | latitude | longitude |
----------------------------------------------------------
and the phones table:
-----------------------
| locationID | number |
-----------------------
Now, keep in mind that f...
Assuming a system similar to Netflix where members create a wish list of movies and, based on their type of plan, one, two, or more of those movies in their list turn into orders, which one of the following schemas makes more sense?
A controls table storing the following columns:
controls(memberid, currentMoviesAtHome, moviesAtHomeLim...
I'm working on an ASP.NET MVC app, designing the domain models, using (testing) the new EF Code First feature.
I have an Activity entity that may or may not have a Deadline, what is the best way to approach it?
1 property:
public DateTime? Deadline {get; set;}
and check vs null before using
or
2 properties:
public DateTime Deadl...
When I was learning in university, they taught us the database fundamentals, basics and rules,
and one of the most important rules is the constraints (primary key, foreign key), and how to make 1-m, 1-1, m-n relationships.
Now when I move to real business environment they tell me: you should forget all you have been taught; no constrain...
I'm battling a potential race condition in my application, which relies on multiple threads accessing a shared object to determine what their next logical operation should be. I certainly don't have a problem just scribbling stuff on a piece of paper or on the whiteboard, and using this to map out access to this shared object. However,...
Consider the following scenario:
Potential customers are presented with a questionnaire where they can select none, one or multiple answers for every question.
An automated algorithm should recommend the optimal solution based on the customers' answers.
Example:
There are 3 possible solutions S1, S2, S3
The questionnaire contains 1...
I have something minor, yet very odd happening in SQL Server Management Studio 2005. I have 2 database catalogs which are essentially identical. There is a Market table with a foreign key to other several other tables for example the "Project" table has a MarketID column with an FK reference from dbo.Market. in both db catalogs the Marke...
I'm having a hard time conceiving an object model that can store time periods like the following:
"Any Wednesday from 2:00PM to 3:00PM"
"April 1, 2010"
"All April for any year"
"Any day in April from 2:00PM to 3:00PM for any year"
"Any day 1:30PM to 2:00PM"
"Any April 1 to Any April 3"
Sometimes the period will be for a specific date,...