Click here to Skip to main content
15,914,943 members
Everything / Relationship

Relationship

relationship

Great Reads

by Bo Li (KAFFEECKO)
using Angular `$http` and Parse REST API to process the relations
by santosh poojari
This is most general collection operation that we come across daily. Its set based operation using LINQ Except Operator.
by IAmJoshChang
Graphs are one of the most common questions that might show up in a technical interview, especially in these days where many real-world applications can be represented by nodes and edges such as the social networks!
by DiponRoy
Some queries to find generation of each row, all possible children, all possible parents, managing recursion

Latest Articles

by IAmJoshChang
Graphs are one of the most common questions that might show up in a technical interview, especially in these days where many real-world applications can be represented by nodes and edges such as the social networks!
by Bo Li (KAFFEECKO)
using Angular `$http` and Parse REST API to process the relations
by DiponRoy
Some queries to find generation of each row, all possible children, all possible parents, managing recursion
by santosh poojari
This is most general collection operation that we come across daily. Its set based operation using LINQ Except Operator.

All Articles

Sort by Score

Relationship 

19 May 2015 by Bo Li (KAFFEECKO)
using Angular `$http` and Parse REST API to process the relations
17 Dec 2012 by santosh poojari
This is most general collection operation that we come across daily. Its set based operation using LINQ Except Operator.
11 Apr 2013 by Sergey Alexandrovich Kryukov
Attributes in .NET is something completely different: please read on attributes to understand it: http://msdn.microsoft.com/en-us/library/z0w1kczw%28v=vs.110%29.aspx[^].What you call "attributes" are more like the UML meaning of this word (do you know UML?). In .NET, the attributes in UML...
11 Jun 2013 by Aydin Homay
HiDear Ernest you should study about Database Normalization for get the answer about your question. a really good database should be normal at 3NF however some times we need a BCNF but more times 3NF normalization is really good normalization for working with database. you can read about...
11 Jun 2013 by Ronnie Peoples
It really depends on your specific needs. If I were you I would try to figure out what will be changed in the future ( new fields, new relations ...). I would expect a lot of empty fields if all data are in one table. Don’t forget to optimize database for faster search queries. Also don’t ...
21 Aug 2013 by thatraja
Don't delete record from employee table. Update Flag on particular employee.DELETE FROM Employee WHERE Employee_ID='EMP001'Employee-----------Employee_IDEmployee_NameActiveEmployee_Job-----------Assigned_PersonJob_IDJob_NameStatusWhen you want to delete an...
21 Aug 2013 by OriginalGriff
You can't. That's the whole idea of a foreign key relationship: it enforces database integrity by not allowing "orphaned" references.Besides, you may well want to know in six months time which projects "Old Joe" worked on - because the ones you have looked at so far all have the same fault,...
11 May 2015 by F-ES Sitecore
Have a Buyer table[PK] Buyer_IDRest_Of_Buyer_Fieldsa sponsor table[PK] Sponsor_IDRest_Of_Sponsor_Fieldsand a table that joins the two called Buyer_Sponsor[PK] Buyer_ID[PK] Sponsor_IDThis allows you to set up a many-to-many relationship between buyers and sponsors. ...
28 Apr 2017 by CHill60
BebeSaiyan said: I just want to ask if it's okay to create a database table, where there are a total of 17 fields. Yes.BebeSaiyan said: And instead, should I create a separate table for it? or is it better as it is? It's better as it is. A separate table for "it" (whatever "it" is) is unlikely...
4 Dec 2020 by IAmJoshChang
Graphs are one of the most common questions that might show up in a technical interview, especially in these days where many real-world applications can be represented by nodes and edges such as the social networks!
7 Dec 2021 by Afzaal Ahmad Zeeshan
Quote: create relationships between entities in a project that is being written from scratch, or specify what relationships to have between them? That's the best part about an ORM. You don't need to think about it yourself (apart from some index,...
7 Apr 2022 by CHill60
I'm with @Richard-Deeming - the nullable foreign key seems like the best option Quote: it would be possible to create an event linked to a session and give it a timestamp that is not between the start and end timestamps of the associated...
31 Jul 2022 by CHill60
I have no idea what you are trying to do (hint: you should improve your question to make it clearer) but when I am trying to compare worksheets I do the following - Add a new column in each sheet - Formula in column is = CONCAT(A1:E1) (adjust...
18 Oct 2023 by M Imran Ansari
The error you are encountering is likely because the MovieCinema property is a collection in the Movie class, not a direct navigation property. You should include the MovieCinemas.Cinema property instead. Additionally, ensure that your context is...
12 Feb 2012 by no_-_namee
Hi all,There are two tables which named myTable(id,name,description,type) and myTable2(id,name).When I add a record to myTable2, I want sql add the new record to table myTable also. How can I relate these two table for this purpose.Thanks for the replies in advance..
12 Feb 2012 by CRDave1988
use Triggersee thishttp://www.datasprings.com/resources/articles-information/creating-email-triggers-in-sql-server-2005[^]http://www.go4expert.com/forums/showthread.php?t=15510[^]
12 Feb 2012 by kaushikjoshi
INSERT INTO myTable (id,name)SELECT id,nameFROM myTable2
15 Feb 2012 by Saeid.Babaei86
Hi dear experts.i want to build a simple social network .I'm currently working on the architectureNow I've created the users table . but i can't understand relation between users table and profile table . ! Whether their relationship is 1 to 1?
15 Feb 2012 by OriginalGriff
How many profiles do you expect your users to have?Is it one user, one profile?Or one user, many profiles?Or many users, one profile?The answer to that question is the answer to yours...
15 Feb 2012 by Sarvesh Kumar Gupta
Hi, you have one user table and one profile table.one user has one profile and reference of user id into profile tableadd Userid as primary key in user table - auto increamented fielduse this field make foreign key in profile table and using join queries you can fetch all fields from...
26 May 2012 by Wendelius
Not sure if I understood the question correctly, but can you simply join the tables and then apply proper conditions. Something likeSELECT *FROM Teachers t, TeacherClass tc, Classes c, TeacherSubject ts, Subjects s, ClassSubject ...
27 May 2012 by Razor4tx
Yeah, I've solved it myself, the code...SELECT Classes.ClassId, Classes.ClassName, Subjects.SubjectId, Subjects.SubjectName, Teachers.TeacherId, Teachers.TeacherNameFROM (Teachers INNER JOIN (Classes INNER JOIN TeacherClass ON Classes.ClassId = TeacherClass.ClassId) ON Teachers.TeacherId =...
21 Sep 2012 by r. salehi
HiI have a DGV banded to a DataTable and users can populate rows in DGV with AutoComplete mode. All that I want to do is, refreshing the source of AutoComplete for each new row according to my base table (TableB) and also previous data that user entered in same column before current row in...
3 Oct 2012 by skydger
Try to use DataSource property for your names combobox. kmt = new System.Data.OleDb.OleDbCommand("SELECT ProductID, Productname FROM Products"); kmt.Connection = bag; tablo = new DataTable("Products"); System.Data.OleDb.OleDbDataAdapter oda = new...
6 Dec 2012 by dipak2002n
Hi All,I have developed one C++ application on Windows. It is crashing in release mode if I launch the application just after restarting the machine.Steps to reproduce :1. Start the machine2. quickly launch the application3. CrashhhhhFrom second launch everything works fine. If...
17 Jan 2013 by Nasser Abu Farah
hiI have a three tables representing a many to many relation as follows"-------------------------------1:visitors ------------------------------- visitorID (primary key,AutoNumber) visitorName-------------------------------2:Subjects ...
17 Jan 2013 by Zafar Sultan
Create a stored procedure as:Create Procedure AddDetails(@visitorname varchar(50),@subjectdescription varchar(500),@date datetime,@time datetime)ASBEGINdeclare @visitorid int, @subjecid intBEGIN TRANinsert into visitorsvalues(@visitorname)set @visitorid =...
18 Jan 2013 by Pallavi Waikar
check out this link....answers no. 7http://stackoverflow.com/questions/5228780/how-to-get-last-inserted-id[^]INSERT INTO aspnet_GameProfiles(UserId,GameId)VALUES(@UserId, @GameId);SELECT SCOPE_IDENTITY()And then Int32 newId = (Int32) myCommand.ExecuteScalar();try this it for...
9 Mar 2013 by Haredi
HiI Am Using SQL And ASp.Net my problem is that i have Items Table Item_ID BigIntitem_name nvParent_id BigIntis_product Bitis_material Bitfor_sale Bitthe item May Be a Product Or material i Need To relate the item With Its material "Note that may...
10 Mar 2013 by Tharaka MTR
check thishttp://stackoverflow.com/questions/4116416/parent-child-in-same-table[^]http://stackoverflow.com/questions/2763860/how-to-query-with-child-relations-to-same-table-and-order-this-correctly[^]
11 Apr 2013 by TOMT12345
If I have 3 classes:1. Team2. Player3. balland each have a few types:backetball team, football team, hokcey team.basketball player, football player, hockey player.basketball, football, hockey puck.would i inlcuded these types as attributes in a class or would they have a...
11 Apr 2013 by CPallini
In my opinion both the alternatives are viable. You should investigate the usage scenarios to discover what is the cleanest implementation.
19 Apr 2013 by Haakon Bruusgaard
Dear all. I am coding my fist console application for Sharepoint in C#. As this is an console application I cannot use the SPList, SPWeb and other SP objects. I get the lists that I want from my WebService.GetLists function.And I get all the columns from the selected list. But -...
11 Jun 2013 by Ernest M Parker
I am developing a website. I plan to add many features for users and that requires many fields for each user to store data. My problem is I don’t know if I should store all user activities in one table (questions, answers, votes, personal data ... ) or make separate tables (one for questions ,...
21 Aug 2013 by Ashish sharma
Table employee { employeename //employeename is unique } Table job { jobid,job,assignedPerson,status }assignedPerson is a foreign key that references to employeename(employee)What I want is to know how to delete an employee record without...
12 Nov 2013 by radals
i work sql serveri want to appear data from 2 table (Have relationship)but i have problem the first table ID Name Date Adress1 Ahmed 3223 232 Rone 45 dsdthe Second tableID ID Booking Place Period Mobile1 1 Madi 12 5465461 2 Dar 10 5465461 3 ...
18 Nov 2013 by radals
I Want handle Delete from Grid view 2 tables that have relationship with another table when i want to delete row from the first tablean error accrued The DELETE statement conflicted with the REFERENCE constraint "FK_TryIt_GuestsTable". The conflict occurred in database "Tourist", table...
18 Nov 2013 by Tom Marvolo Riddle
Put this code in catch block: Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Script", "alert('Cannot be Deleted because it is used in other Pages!!!');", true);
18 Nov 2013 by thatraja
----------------------------...
10 Feb 2014 by Sergey Alexandrovich Kryukov
This is not a good question we would answer; it does not contain any description of any problem.—SA
26 Feb 2014 by Jorge J. Martins
Hallo fellow codersI have this strange behavior on my Silverlight project working with RIA Services and ADO.NET Entity Data Model.On my Data Model I have a master table (PRT_NEWS) with two foreign keys to two related tables (PRT_EXT_NEWS_ESTADOS and...
26 Feb 2014 by Jorge J. Martins
I've solved it myself.Here's the thing:One combination I didn’t try before was to decorate the member with the [Include] AND complement the get method with the .Include(“PRT_EXT_NEWS_IMAGENS”).It seems to be working...
26 Nov 2014 by User 9174741
I am working on some project ( VB.Net & SQL Server ) where I havePatient & Appointment scenario like this:This is the public declarations Dim DS As New DataSet Dim SqlAdap, SqlAdapAppointment As SqlDataAdapter Dim BindSrc, BindSrcAppointment As New BindingSourceand I set the...
11 May 2015 by bernova
Hi all.In the our database , we have two Existence(table) :1- Buyer2- sponsoreach Buyer have one or two sponsor and each sponsor can be sponsor many buyer.How do we design tables and relation between on it ???thanks a lot.
23 Aug 2015 by Avenger1
I'm using Entity Framework for my database in asp.net but when my database is on localhost it automatically add the tables and relationships but after I uploaded my database to host and I tried to use it in model.edmx it add tables without relationships.I tried to add relationships with the...
4 Nov 2015 by vini vasundharan
I have 2 classes `ConfigurationCollection` and `OptionValues` which has a many to many relationship. I have tried solutions on the net to get it working. I tried adding another class to create two one to many relationship. But I am not understanding it the right way I suppose. And I also tried...
5 Nov 2015 by Nathan Minier
In order to create a M->M relationship in entity Framework you'll need to use a mapping class, as you did with Config_OptionVal. Now it's important that that mapping class is the one that the classes on either side of the relationship operate through, you can't ignore that entity in the...
10 May 2016 by ionMEMBER
Private Sub TextBox12_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox12.KeyDown Select Case e.KeyCode Case Keys.Enter Dim sqlQRY As String = "SELECT * FROM Items_&_MultiBarcode WHERE Barcode = '" &...
10 May 2016 by OriginalGriff
'&' is a special character and needs special handling for use in names.Try:SELECT * FROM [Items_&_MultiBarcode] WHERE Barcode = ...OrSELECT * FROM `Items_&_MultiBarcode` WHERE Barcode = ...But...Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or...
4 Dec 2017 by Charlie Andrews
Hello , I have to create a quiz in my web application, that's easy . Issue comes when there are 3 different types of quiz. Quiz 1 ) -> Objective type. Quiz 2 ) -> Images and Answer by selecting a lable from Image. Quiz 3 ) -> Plain text question with answer linked to an existing table. ...
28 Nov 2019 by AleLo2014
hallo, I am new in mvc and linq. I've 2 table in relation many to many: 1)employe 2)device Selecting an employe I'd like to see his devices: -Marco -Franco Selecting Marco should appear the devices associated to him. In sql I'd like this: select Devices.nome from Devices where Devices.id...
28 Nov 2019 by phil.o
I'm quite confused since, for a many to many relationship, you need a third table. -- SQL pseudocode TABLE Employee ( EmployeeId int PRIMARY KEY IDENTITY, EmployeeName nvarchar ) TABLE Device ( DevideId int PRIMARY KEY IDENTITY, DeviceName nvarchar ) TABLE EmployeeDevice ( ...
28 Nov 2019 by AleLo2014
Phil found the solution (thank you so mutch!!!): ListDevice = db.Devices.Where(u => u.ImpiegatiDevices.Any(m => m.impiegatiID == id)).ToList();
13 Jun 2020 by Richard MacCutchan
You already posted this question at how to create relationship between tables based on field - Database Discussion Boards[^]. Please do not crosspost.
15 Jun 2020 by Maciej Los
Quote: each Tool (...) relates to its specific "Data Table" which contains Calibration data results with specific fields. You don't! All what you need to do is to create Calibration table with several fields: CREATE TABLE Calibration ( ...
7 Dec 2021 by Member 15435322
I was wondering, what is the best way to create relationships between entities in a project that is being written from scratch, or specify what relationships to have between them? For example, as we can directly understand the relationship...
30 Jan 2022 by salam_verdim_alana_panyatkasi_olana
I have to Entity and relationship type between them ManyToMany. @SuppressWarnings("JpaDataSourceORMInspection") @Data @Entity public class Student { @Id private Long id; private Integer anotherId; @ToString.Exclude ...
7 Apr 2022 by Gianluca Locri
I have a question is about good database design. In my current project I have a SQL database with two tables. A sessions table containing: - session id: the primary key - login timestamp: the unix timestamp of the start of the session - logout...
28 Jul 2022 by Ajeet S 2021
I have two excel sheets with million records and they have missing value and type with one to many mapping in rows. Below is table for reference: Table heading: item, item#, method, value. Additional columns "type match" and "value match" to...
19 Oct 2023 by Member 16118565
How to implement many to many relation with include in generic repository by params in EF Core. I have these models: public class Movie:IEntityBase { public int Id { get; set; } public string Name { get; set; } public string...
15 Sep 2014 by DiponRoy
Some queries to find generation of each row, all possible children, all possible parents, managing recursion
30 Mar 2012 by OriginalGriff
All your need is a Groups table, with an ID and a description.You then add a GroupID field to the student table and set it as a foreign key.You can then have multiple students in any one group.If you also need students to be in multiple groups, then you need an extra table instead of the...
3 Oct 2012 by mcrbne
Hi ; first i am new about c# , Second i have a access database , inside this db i have 2 form , first one Products (productid , productname) and second one ProductData(id, Productid , Model , width , height , price ) , when i select productname , i want to see that selected products model...
26 May 2012 by Razor4tx
I have 3 tables (actually many, but for this example we need 3).1. teachers table with columns teacherid, teachername, other columns (DOB etc)...2. classes table with columns classid, classname, other columns (students in class etc)3. subjects table with struct subjectid, subjectname,...
29 Sep 2014 by CPallini
Creating a designer is not a simple task, the effort, in my opinion is comparable to the one used in developing an IDE. You might have a look at source code of an existing (open source) designer, like, for instance DBDesigner 4[^].
29 Sep 2014 by Mansurjon Kurtov
Hi, i need to create visual database designer in C# Windows Forms or .Net WPF Application as Sql Server's Database Diagram creator(graphic display of the tables, relationships,...).i have data tables collection only.
28 Apr 2017 by BebeSaiyan
Hi! I'm learning all about databases now. I just want to ask if it's okay to create a database table, where there are a total of 17 fields. And instead, should I create a separate table for it? or is it better as it is? Kindly advice a better design for this or if i should try implementing...
30 Mar 2012 by nagiub2007
i have table courses and students in my analysis every course has multiple groups that determine by user and every group has multiple students determine also by userhow can i do this in sqlserver database analyses i created course table and students table and tabl5 as junction table...
24 Sep 2012 by joshrduncan2012
Can someone point me to where you can create a foreign-key relationship between 2 tables using Visual Studio 2012 and SQL Server CE 4.0? I am trying to do it graphically and not have that in my code at all. I am unable to locate where the UI for that is in Visual Studio.
24 Sep 2012 by joshrduncan2012
Nevermind, I found the issue myself. I was trying to do relations between 2 databases and it wasn't given me the option to do so. It has to be same databases between 2 tables.
14 Sep 2022 by Member 7797447
Hi, I am trying to create relations by using script in my transform map but I am getting below error. Operation against file 'cmdb_rel_ci' was aborted by Business Rule 'Prevent Recursion in CI Relationships^91eb95ab87bd119850d2eca73cbb352a'....