Questions tagged [relational]

526 questions
3
votes
1 answer

Tuple Relational Calculus or Relational Algebra Syntax verifier?

Does anybody knows of a software package where you can type a formula and it verifies sintactically (it doesn't need to check semantics). Thanks.
Sheldon
  • 2,598
  • 10
  • 27
  • 36
3
votes
1 answer

Relational design scenario: restrict children relations

please consider the following scenario. An pet owner may have multiple cats, and may also have multiple dogs. Some of the dogs are related (ie they fight :-) ) with some of the cats of the same owner. The following relational design does not impose…
3
votes
2 answers

Can one attribute have two foreign keys?

Just doing some Relational Database work. Quick question, can one attribute have two foreign keys? For example, is this legal: PERSONAL_RECORDS.Date_of_birth has a foreign key in CASUAL.Date_of_birth as well as a foreign key in…
Hoops
  • 865
  • 4
  • 15
  • 25
3
votes
2 answers

Is this a textbook design pattern, or did I invent something new?

I'm fresh out of designing a set of tables, in which I came up with an architecture that I was very pleased with! I've never seen it anywhere else before, so I'd love to know if I've just reinvented the wheel (most probable), or if this is a…
Shaul Behr
  • 36,951
  • 69
  • 249
  • 387
3
votes
2 answers

Achieving Fast Lookups for a Large Dataset: MySQL MEMORY(HEAP), Memcached, or something else

Currently working on a project that is centered around a medical nomenclature known as SNOMED. At the heart of snomed is are three relational datasets that are 350,000, 1.1 mil, and 1.3 mil records in length. We want to be able to quickly query this…
nategood
  • 11,807
  • 4
  • 36
  • 44
2
votes
2 answers

Completely arbitrary sort order in MySQL with PHP

I have a table in MySQL that I'm accessing from PHP. For example, let's have a table named THINGS: things.ID - int primary key things.name - varchar things.owner_ID - int for joining with another table My select statement to get what I need might…
Steve
  • 6,334
  • 4
  • 39
  • 67
2
votes
1 answer

How Does Relational Theory Apply in Ways I can Care About while Learning it?

So I'm taking the Discrete Math course from MIT's OpenCourseWare and I'm wondering... I see the connection between relations and graphs but not enough to "own" it. I've implemented a simple state machine in SQL as well so I grok graphs pretty well,…
2
votes
1 answer

MySQL grabbing all posts by a user and all the likes for each post (joining, grouping, counting, etc.)

I'm building a forum software and am trying to grab all the posts by a particular 'profile', grab all of the profiles that have 'liked' each post ("likers"), followed by a third fetch of the profile data of each profile that has liked each post…
Zack Zatkin-Gold
  • 814
  • 9
  • 29
2
votes
1 answer

Graph Edges Rails

I found this recently when trying to do bidirectional relationships in rails (http://www.dweebd.com/sql/modeling-bidirectional-graph-edges-in-rails/) class Befriending < ActiveRecord::Base belongs_to :initiator, :class_name => :User belongs_to…
Cameron
  • 4,181
  • 9
  • 36
  • 40
2
votes
3 answers

Globalization with NHibernate

How would you build your domain objects and create its respective NHibernate mapping files for a multi language application. The UI part is stored in resource files but user data needs to go into the database. I want to do the following: Product p =…
Michal
  • 3,141
  • 5
  • 27
  • 29
2
votes
5 answers

What is the best way of relating relational database tables into Java classes?

I wonder if anyone can advise me here; I have an application which has classes like this: Code: public class Order implements Serializable { private int orderNo; private int customerNo; private date orderDate; public int…
MartinOShea
2
votes
1 answer

What are recent advances in relational databases?

I'm wondering what are recent advances in relational database theory and related domains? I'm interested in new approaches, query languages (alternatives to SQL and/or extensions to it), products (proprietary and open source, though I'm much more…
andreypopp
  • 6,887
  • 5
  • 26
  • 26
2
votes
1 answer

Autofill IDs in a form with a relation

I have created a blog, it will have posts, and the posts are created by the users. I already have a login system in my blog. And I have made the relation between a user and his posts. Now when I want to add a new post I want Rails to autofill the…
arcooverbeek
  • 185
  • 8
2
votes
1 answer

React how to address a key from string name

Ok, so I have a database with data sets in it. the application performs a base API call to retrieve that base data set containing all other data sets. I will receive a string variable with the name of the key I need to access so let's say const…
Alex K
  • 43
  • 11
2
votes
1 answer

How do you post a many-to-many-to-many relation in a REST API?

Using EF Core We are trying to obtain all information of an assessment, which includes its groups and all assigned users. See the Database Diagram What is working in following order; HttpPost (api/Assessment/aID/groups) of an empty group to an…