Questions tagged [relational-database]

A relational database is a database consisting of relation variables (which are also called *relvars*, *R-tables* or just *tables*). The definition, manipulation and integrity rules of relational databases are based on relational operations equivalent to or similar to the Relational Algebra and Calculus. Relational database principles are the basis of a substantial part of data management theory and practice.

A relational database is a database consisting of relation variables (which are also called relvars, R-tables or just tables). The definition, manipulation and integrity rules of relational databases are based on relational operations equivalent to or similar to the Relational Algebra and Calculus. Relational database principles are the basis of a substantial part of data management theory and practice.

Targeted Questions

This tag is appropriate for questions concerning the relational model, relational and relational database implementation.

The SQL language is commonly used to specify relational database-designs and to define and solve relational database problems. However, DBMSs based on SQL are by definition not s and therefore not all SQL questions are relevant to the relational database tag. Questions specific to or its implementations should be tagged accordingly.

6790 questions
1
vote
4 answers

How to join two tables when the ON clause is variable

To simplify the description, I'll use a member table and a mail table. The mail table has the following structure: ------------------------------- FromMember int NOT NULL (FK) ToMember int NOT NULL (FK) ... ------------------------------- I…
1
vote
1 answer

Database design questions, what do you think?

I have the following entities in my system: COMPANY, POSITION, APPLICANTS. There is many to many relationships between POSITION and APPLICANTS, but the current model does not show that there is many to many relationships between COMPANY and…
Teodor Talov
  • 1,933
  • 2
  • 25
  • 39
1
vote
1 answer

Whats the best way to design a database with a product of multiple variations?

This question is related to this one: Best way to store product colors in a database So i have a Product which have the multiple properties. Below is an illustration. Product A Name: Product A v1.0, Product A v2.0 (2 versions of Product A) Color:…
Just a coder
  • 15,480
  • 16
  • 85
  • 138
1
vote
2 answers

Rails: two models with one-to-one relationship, one controller

I've created a simple webapp with user authentication. I've made two models: Users for user authentication and Details for additional user details. They are associated with one-to-one relationship. I'm having problems with updating two models from…
1
vote
1 answer

Defining Zend Framework table relationships with PostgreSQL?

I was used to work with Zend Db Table Relationships with MySQL. I declared $_dependentTables and $_referenceMap in the table classes as described in the manual. Then was able to work with functions findDependentRowset(), findParentRow() etc. Now I…
1
vote
1 answer

iOS - Core Data Relationship. Mapping table/ many-to-many relationship

I am currently working on producing the data model for my application and it is extremely important I get it designed correctly before implementation can begin otherwise it will be a huge problem. My situation is, I have an entity which is a Post. …
Tim
  • 8,932
  • 4
  • 43
  • 64
1
vote
4 answers

What difference does it make adding PKs & FKs when you can still join on a common column?

I completely understand the need to PKs and FKs but when using relational databases. But when using Mysql from the the terminal. what difference does it make adding PKs & FKs when you can you can join on a common column? If I create the table…
stackoverflow
  • 18,348
  • 50
  • 129
  • 196
1
vote
2 answers

Aggregate values from XMLTYPE in database

I have XML data stored in each row of field in XMLTYPE, the first row of the XML field should be: 2009 Jan 1 1180 and the second row of the XML field should…
user1264222
  • 225
  • 2
  • 4
  • 12
1
vote
2 answers

what's the common schema for allowing multiple "types" of data that is of the same parent

What's the standard way of storing ``subtypes'' if you will in relational databases like MySQL? As an example, think of a single user's Facebook feed. All it contains are "entries", but these entries can vary significantly in type and what needs to…
Aaron Yodaiken
  • 19,163
  • 32
  • 103
  • 184
1
vote
2 answers

Reporting on historical data - when to use current or historic data (warn user about changing the meaning of a record?)

This is similar to this question Basically I am writing the database and software for a building monitoring system. The system monitors things like temperature, humidity, pressure of units (such as fridges). When a report is generated for a…
Mark
  • 1,296
  • 13
  • 28
1
vote
1 answer

Normalized, denormalized, or what? A table to store responses in a Survey database

I'm framing this intentionally as a general question, even though I'm using Django's ORM to implement these tables. Here are my Django models if you want to have a peek. The Riddle I have several tables with the following relationships: Survey…
jrhorn424
  • 1,981
  • 2
  • 21
  • 27
1
vote
2 answers

DMS without installation having Entity Framework driver?

I'm looking for a database system to use with c#. I've mostly used SQL for now, but, this is a small applicaiton I'm gonna to create, which: -Runs at max 1-2hours each day(so I don't want to have a SQL Server running all the time) -Will be installed…
J4N
  • 19,480
  • 39
  • 187
  • 340
1
vote
3 answers

Flexibility tradeoff in database schema design

We want to store a user table in the database. For each user, there are a number of attributes, such as age, sex, date of birth, etc. We can of course model these commonly shared attributes as the columns in our user table, however, it would become…
skyork
  • 7,113
  • 18
  • 63
  • 103
1
vote
1 answer

Document-oriented database or Relational database, how could I choose?

I have been using MySQL and MsSQL quite a bit in the past. Now I am using MongoDB also and I see it very flexible in handling document which fields keep changing - very good for agile development. As document-oriented database seems to be a lot more…
hllau
  • 9,879
  • 7
  • 30
  • 35
1
vote
1 answer

Modeling a hierarchical data structure

20120304 - Streamlined question Suppose we have entities R, D and E and this relational cardinalities R < n:m > D D < 1:n > E The mapping of this specification is straight forward, but we have another requirement: R < n:m > E Side condition: E1…
SteAp
  • 11,853
  • 10
  • 53
  • 88