Questions tagged [relational]
526 questions
3
votes
2 answers
Using NoSQL and Relational data stores for high volume web site
We are building a large scale e-comm web site to service over 100,000 users, but we expect the number of users to grow rapidly over the first year. In general, the site functions very much like ebay where users can create, update, and remove…

user646584
- 3,621
- 5
- 25
- 27
3
votes
1 answer
PHP Outputting data from 2 tables with 3 joins
hope you can help,
I have 3 tables articlearticle_keywords_linkkeywords
They are joined together, and im wanting to achieve 1 article to display on the page, but show all related keywords which is linked to the article.
I have not yet formatted…

Dean
- 33
- 2
3
votes
2 answers
Relational table - is JSON recommended?
Trying to implement a relational table that links a user to it's favorite books.
So I have a table with book_id and user_id
Sample Table:
user 1 favourite 1
user 1 favourite 2
user 1 favourite 3
Can't I have something like a JSON array?
user 1…

Renato Silva
- 51
- 10
3
votes
4 answers
Table Design For Multiple Different Products On One Order
If I were to have an online shopping website that sold apples and monitors and these were stored in different tables because the distinguishing property of apples is colour and that of monitors is resolution how would I add these both to an invoice…

Rob
- 43
- 4
3
votes
2 answers
String comparisons with relational operators (differing lengths)
I was comparing two strings in C++ as follows:
if(s1 <= s2)
//do stuff
I had forgotten the intricacies of string comparison and quickly learned that in the following case:
s1 = "10.72";
s2 = "8.87";
The statement will evaluate to true and do…

jonnyd42
- 490
- 1
- 9
- 23
3
votes
2 answers
Why is it harder to query for entities with more than every vs less than some?
This is the database, bold primary key.
works (person_name, company_name, salary)
Suppose we have this problem:
Find the names of all employees who earn more than every employee of Small Bank Corporation.
Proposed solution:
We cannot easily…

user3656099
- 155
- 1
- 11
3
votes
2 answers
Moving webshop storage to NoSQL solution
If you had a webshop solution based on SQL Server relational DB what would be the reasons, if any, to move to NoSQL storage ? Does it even make sense to migrate datastores that rely on relations heavily to NoSQL? If starting from scratch, would you…

mare
- 13,033
- 24
- 102
- 191
3
votes
2 answers
Relational Algebra - Finding EXACTLY two values
Below is a Table and simple SQL to find the cities that occur in exactly two states
Name State
---- -----
Paris MO
Paris TX
Paris VA
Austin MA
Austin TX
Burling VT
Result: Only Austin will qualify as it occurs in exactly two…

rubikskube
- 372
- 1
- 5
- 22
3
votes
0 answers
Can someone describe the nested set model from a C#/LINQ perspective?
I know the nested set model doesn't pertain to the C# language or LINQ directly... it's what I'm using to develop my web app.
For hierarchical data (categories with sub-categories in my case), I'm currently using something similar to the Adjacency…

Chaddeus
- 13,134
- 29
- 104
- 162
3
votes
5 answers
Insert 2 rows that are related in both directions in SQL
I have two tables kinda like this:
// Person.Details Table:
PersonID int [PK] | EmployeeCreatorID int [FK] | FirstName varchar | OtherInfo...
// Employee.Details Table:
EmployeeID int [PK] | PersonID int [FK] | IsAdmin bit | OtherInfo...
Each…

David Murdoch
- 87,823
- 39
- 148
- 191
3
votes
1 answer
Why is this verilog relational statement returning true?
I have a 9 bit signed wire called sin_hall2.
This statement returns true. sin_hall2[8:0]>9'd1.
When I look at my simulation, sin_hall2=-169. I am assuming it is the way verilog deals with comparing negative numbers, but what am I doing wrong. I…

ACD
- 151
- 2
- 6
3
votes
1 answer
RDBMS data-relation burden
Our in-house system is built on SQL Server 2008 with a 40-table 6NF schema. Most of the tables FK to 3 others, a key few as many as 7. The system will ultimately support 100s of employees working with 10s of 1000s of customers and store 100s of…

Hardryv
- 755
- 7
- 12
3
votes
1 answer
Can someone explain to me why there is an inequality test with the same operands in the following code from LLVM?
My colleague showed me the following macro from the LLVM source code:
#define IMPLEMENT_UNORDERED(TY, X,Y) \
if (TY->isFloatTy()) { \
if…

w3lcome
- 33
- 3
3
votes
6 answers
Expressing an is-a relationship in a relational database
I was wondering if there is a clean way to represent an is-a relationship as illustrated by this example:
This DB stores recording times for three types of programs: movies, game shows, drama. In an object oriented sense each of these is-a program.…

Fredrick
- 1,210
- 2
- 15
- 24
3
votes
3 answers
Best way to add content (large list) to relational database
I apologize if this may seem like somewhat of a novice question (which it probably is), but I'm just introducing myself to the idea of relational databases and I'm struggling with this concept.
I have a database with roughly 75 fields which…

M. Black
- 353
- 1
- 4
- 20