|
I know I'm gonna get down votes, but I have to make sure if this is logical or not.
I have three tables A, B, C. B is a table used to make a many-many relationship between A and C. But the thing is that A and C are also related directly in a 1-many relationship...
Started by isc_fausto on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
That said, this schema, so the many_to_....
List" FROM s JOIN many_to_many mtm ON s.id_student = mtm.id_student JOIN c c1 ON s.id_class = c1.id and "hardcoded" classes with all their classes from the many_to_many table.
|
|
I have following table and data:
create table Foo ( id int not null, hid int not null, value int not null ) insert into Foo(id, hid, value) values(1,1,1) -- use this as 1 < 3 insert into Foo(id, hid, value) values(1,2,3) insert into Foo(id, hid, value...
Started by wangzq on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Not sure if you are looking for a query, or instructions on how to modify your schema, but here is a query:
select id, min(hid) as hid, min(value) as value from Foo group by id
SQL 2005:
WITH X AS ( SELECT id, min(value) as minval from Foo group by id... .
|
|
I have 2 database tables: Teams and Games.
For the purpose of this question, we are dealing with football (soccer) teams and games.
Each Game has exactly 2 teams, generally a home team and an away team although occasionally both teams can be neutral.
...
Started by Matt on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
It's not as if this is a sleeping time bomb and suddenly one day you'll discover you need to have a real many to many of normalization....
Probably be treated as many-to-many, otherwise, I should think you'll reduce your query overheads.
|
Ask your Facebook Friends
|
Hello, I am new in asp.net MVC, and in Entity Framework to. I watch on asp.net mvc tutorials, but they are very easy. I need to write little site, and in my database have one-to-many reletionship. if i want to select data from two tables (classic inner...
Started by loviji on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The read is quite good though and while I have never really used it (i am using ADO.net entities) I did learn quickly how to use ASP.... .
It is a very basic application using LINQ to SQL .
You could have a look at the NerdDinner tutorial at scottgu's site .
|
|
Users / \ / \ M-T-O M-T-O / \ / \ Products----M-T-M----Tags
I wonder if there is any documentation on how to create a schema like this with entities. I got stuck at wondering which entity should be responsible for what in the relation.
For example:
Lets...
Started by Pickels on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
A product has many tags, and a tag has many ....
With many-to-many relationships you need in the domain doesn't make sense to me, nor can I see any real benefits.
I would not allow a Product to be added to a Tag .
To a Product.
|
|
I have four tables: Disks, Folders, Files and Links. It is four types of entities, and they can not be merged into one type (e.g. into one table) because they have different number and types of attributes. And there are relationships:
Disks can contain...
Started by Andrew on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
It's actualy one-to-many relationships as:
A Disk has 0 to many Folder and a Folder belongs to exactly 1 Disk A Folder has 0 to many File and a File belongs to exactly 1 Folder A Folder has 0 to many VARCHAR, --eg Folder DisplayOrder....
|
|
Today we faced a quite simple problem that were made even simpler by the dear predicates. We had a kind of event log and wanted to filter it client side (Windows Forms) using a list of criterias. We began by implementing to filter by a number of categories...
Started by Jonas Elfström on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I'm afraid for the main question, I don't fully understand what you are trying to do and what you are trying to avoid - can you clarify at all? But if ... .
Re "so no LINQ" - have you looked at LINQBridge ? Since you are using C# 3.0 this would be ideal.. .
|
|
Possible Duplicate:
How many parameters are too many?
Also, if I have too many for my function, what are some alternatives?
Started by pacman on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Say a method call has 50 params it into part of a instance method and feed... .
Subjective definitely.
For me, 20 is too many.
If you're passing lots of parameters, chances are they're related in some way in a data structure .
Is too many.
|
|
Is that possible? I mean, can both ends of the many to many relationship point to the same table?
Started by suhair on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The standard way to handle a many-to-many relationship between two managed to avoid that as a problem (how, exactly?), to have 'many rows' in the referencing side of the many-to-many relationship....
Enormous, horrible redundancy.
|
|
When defining a database access object for use in cl-postmodern, what should the :col-type be for a Many to Many field?
Started by Mitch on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For a ManyToMany field (as in Django) because a many to many relationship is implemented by creating a new.
|