Questions tagged [relation]

A relation on sets S1, S2, ..., SN is any subset of S1 x S2 x ... x SN, where 'x' denotes the Cartesian product. In other words, a relation over N sets is any set of ordered N-tuples over the N sets.

A relation on sets S1, S2, ..., SN is any subset of S1 x S2 x ... x SN, where 'x' denotes the Cartesian product. In other words, a relation over N sets is any set of ordered N-tuples over the N sets.

1457 questions
-1
votes
3 answers

Beginner in Java - Relations and other questions about specific code

Okay, so what I need help with is the relations between the classes and the methods. I've heard about association and aggregation, but I don't know how to use them, or even if they fit in this code. Also, I would like to know what super() does and…
-1
votes
2 answers

Rails: belongs_to specific column

I have the following model: class User < ActiveRecord::Base #method that I want to delete and replace with belongs_to def restaurant RemoteRestaurant.find_by_shortRD(self.INFO_SHORT_RD) end end How can I add a belongs_to…
-1
votes
3 answers

symfony2 relation between two entities

i am started to learn symfony2, Here i have some basic doubts on entity relations. Totally i have two entities 1.Admission.php and 2.Mstcity.php , just i wanna make relation between these two entities. mysql Table structure:1.admission= id, name ,…
-1
votes
2 answers

username in table1 and password in table 2 in php code

I have a username in table1 and password in table 2. What is the syntax to login? How can I make a login function if I have two tables: TABLE1 NAME: accounts | COLUMN: acc_id, password, mem_id TABLE2 NAME: members | COLUMN: mem_id, firstname I…
-1
votes
1 answer

caused by "mysql server has gone away" --sqlalchemy

guys.I need some help.Days ago,I deployed my web project on our server,everything worked well.But next morning I loged the page,and I got an error "Mysql server has gone away...",then I checked the reasons.I found it caused by that the conf of Msyql…
jiank
  • 305
  • 1
  • 4
  • 8
-1
votes
1 answer

Name instead of id in mysql+PDO

I have this structure in my db, please check here in fiddle: http://sqlfiddle.com/#!2/a8354/1 I have the problem in the columns pais, departamento and ciudad, in fiddle show me nice the relation but in my page don't...I really tried of many…
asterix_jv
  • 824
  • 1
  • 14
  • 35
-1
votes
1 answer

sphinx filter by relation column

i have 2 tables: apartment building each apartment have building_id apartment has "floor" column, where is stored apartment floor. each building has "totalFloors" column, where is stored total floors(for example, current apartment is 3 of 9 floor) i…
ideea
  • 353
  • 1
  • 3
  • 10
-1
votes
1 answer

Access fields tables relations with LINQ

I have two tables: Post and User. the User has an Id and Name... fields. and the Post has an userId and Title... fields. im using linq, and i want to be able to write something like this: var post = dc.Posts.FirstOrDefault(); var user =…
HasanAboShally
  • 18,459
  • 7
  • 30
  • 34
-1
votes
2 answers

two relations over two tables

I have a problem with a database design I am trying to complete in sql server management in a diagram. I have an process table and an activity table. A process can call multiple activities, however an activity can only be called by one process at a…
-2
votes
2 answers

T-SQL query to fetch all database relations and relation multiplicity type

I need a T-SQL query to fetch all relations in a SQL Server database and understand that each relation is of multiple order like one-to-one, one-to-many and many-to-many relation. I can fetch all relation's but can't know each relation is…
-2
votes
2 answers

guery in bitween 3 table by relation

I have these relations user has many products product has many files I want products that : in user table status field is 1 and in file table status field is 1
-2
votes
1 answer

What will be complexity of reccurance relation : T (n) = 0.5T (n/2) + 1/n

How to calculate the complexity of this case since master method fails for a<1?
-2
votes
1 answer

Django Associations with the user model

How can I associate lists apps Listing model with an user. User has_many lists. What shall I include in my List model for being able to use models.ForeignKey(User)
Cem Baykam
  • 507
  • 1
  • 7
  • 20
-2
votes
1 answer

sql relations, connecting several categories

I want a single valuation to be able to have several categories, (or just one). The category table is one I'm filling pre hand with categories like wine, etc. So my question is how can I make this possible? Will I need another table? Thank you!
VorteXx3
  • 9
  • 7
-2
votes
1 answer

Primary Key vs Candidate Key - Relational DBMS

My understanding is that the primary key is a randomly chosen candidate key from a theoretical perspective. According to this definition ' Candidate Key – A Candidate Key can be any column or a combination of columns that can qualify as unique…
Daniel
  • 379
  • 4
  • 15
1 2 3
96
97