Tagged Questions

Category of database management systems characterised by the ability to join two data sets by matching on common fields, using mathematics-based relational logic.

learn more… | top users | synonyms

6
votes
2answers
764 views

What's a good relational structure for units and complex unit conversions?

My company is in the Energy industry and I need to come up with a good way to represent the conversion of units of measurement. I've done some searching and have yet to find a good article covering ...
2
votes
3answers
384 views

Express union which is dependent on other results

I would like to make a union of two tables that are actually in a hierarchical constellation. How would I write that in relational algebra? Say table A is the parent of B in a 1:n relationship. ...
4
votes
1answer
410 views

Would appreciate some suggestions on how I should model this data

I am setting up a website that will have users. Users can search for songs and (if signed in) save them to a playlist or their library of songs. I want it to be like iTunes in that all the songs on ...
4
votes
1answer
449 views

database design issue

This is my first time on this beautiful content rich site. I have a sql server 2008 database, but am not too experienced with good relational database design. My project is this: I have a school ...
18
votes
4answers
9k views

How should I design a relationship table for friendship?

If A is a friend of B, then should I store both values AB and BA, or one is enough? What are the advantages and disadvantages of both methods. Here is my observation: If I keep both then I have to ...
1
vote
1answer
584 views

Insert bulk Parent and Children rows using SQL Query

We receive bulk data from our customers in a spread sheet. I loaded them in a temporary table as of now. I tried to normalize the data and create a parent table and each parent to have 4 or 5 child ...
4
votes
3answers
238 views

How to design this simple DB?

How to design this simple DB? I need to add some things to a DB I use to keep track of servers. Table looks something like this. Matrix | Name | Description | Etc | Etc | ...
1
vote
1answer
699 views

Relational algebra question

Here is the relational schema given : employee (person-name , street, city) works (person-name, company-name, salary) company (company-name, city) manages (person-name, manager-name) Q: Find the ...
6
votes
2answers
317 views

Definition for “logical difference”?

I'm currently reading "SQL and Relational Theory" by C.J. Date. And although I'm quite far in the book, I've got a few basic questions. I want to know what the term "logical difference" means, The ...
14
votes
3answers
4k views

Proper Use of Lookup Tables

I'm having trouble figuring out exactly how to place good boundaries for when and where to use lookup tables in a database. Most sources I've looked at say that I can never have too many but, at some ...
2
votes
1answer
165 views

How can I best combine “get categories” and “has user access”?

I was wondering if it's possible to create a query for the following problem. I only want to select categories from the (MySQL) database (if the user has access). A user has multiple roles; A ...
1
vote
1answer
727 views

database functional dependency candidate keys

How do you know when you found all the candidate keys in a functional dependency? I know how i would go about finding a candidate key, just don't know how to tell if there are more. Thanks.
2
votes
2answers
326 views

Advanced search engine or server for relational database

In my current project we are storing big volume of data in relational database. One of the recent key requirements is to enrich application by adding some advanced search capabilities. In the Project ...
6
votes
3answers
1k views

How to normalize Time Sheet data?

I am having a terrible time finding an appropriate way to store this data in a database. The current excel (simple) version looks something like this: http://i.stack.imgur.com/BEZOw.png Staff and ...
4
votes
2answers
1k views

Two relationships to same table

i have one transaction table, each transaction has 5-6 contacts involved. each contact has the same fields like name, address, cell, email etc. So the best thing I guess is to use the same contact ...
1
vote
1answer
261 views

How to design relationships for variant data?

Help me define the table relationships for data with multiple structures. I need to track leads. Leads come from multiple sources. Each lead source has its own data structure. I need advice ...
8
votes
2answers
1k views

How do Application Like Yelp Retrieve distance information from data base efficiently

For example, say I have a table: Business(BusinessID, Lattitude, Longitude) All are indexed of course. Also there are 1 million records Say I want to find businesses closest to 106,5, for example, ...
0
votes
1answer
766 views

Database design for head to head sports

I am trying to create a database to store details relating to darts matches. Im relatively new to this so was wondering if the design I've come up with below would work. It seems I have lots of places ...
3
votes
1answer
315 views

What scope(s) is “hasMany” a part of?

I realize, when talking about structures, obviously if you say "post hasMany comments" there are many records about comments relating to each post. What I don't understand is what context these sort ...
5
votes
2answers
9k views

Relational Design - Multiple tables into one foreign key column?

Take a table that tracks meat purchases. It has a "meat_id" foreign key column to indicate what type of meat the purchase was. But, the different types of meat are unique in some way (such as USDA ...
0
votes
1answer
928 views

Entity Relationship Model for linked tables

Certainly a noobish question, but I'll ask it anyway. Perhaps someone else will be thankful. ^^ I am getting warmed up with MySQL and I try to understand the concepts of creating well structured ...
1
vote
0answers
469 views

Which database technology for big structured data? [closed]

Scenario: Think you have got 100TB of text in 200 tables. This is structured related data. compareable to dbpedia only more data. Any really relational and distributed and performant database would do ...
13
votes
5answers
2k views

What standard should I follow when naming tables and views?

What standard should I follow when naming tables and views? For instance, is it a good idea to put something like tbl_ at the beginning of table names? Should I designate code/lookup tables in some ...
7
votes
2answers
902 views

How to structure a model to properly and efficiently represent tree-like data on relational databases?

Based on Traversing tree-like data in a relational database using SQL question, I would like to know how the way regularly used to describe tree-like data on relational databases considering physical ...