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

0
votes
1answer
32 views

Setting up a new database

I'm setting up a new basic database and wanted some on advice on the best approach to do this with. This would be a database in SQL Server 2012 and would be a reservation system for a customer. I have ...
1
vote
2answers
32 views

How to insert values into a table from two different tables?

I have three tables students table ------------------------------------ id(PK, A_I) | student_name | nationality teachers table ------------------------------------ id(PK, A_I) | teacher_name ...
0
votes
1answer
55 views
+100

Heterogeneous ordered list of value

I have the following object model: class A { List<Thing> orderedListOfThings; } interface Thing { } class X implements Thing { int attr; } class Y implements Thing { String ...
0
votes
1answer
21 views

Database relationship refresher

All, After several years of programming applications, I'm looking to refresh my understanding of databases. What I knew to begin with was fairly basic, and honestly, it's disappeared over time. I ...
0
votes
2answers
26 views

Design for table with multiple links to other table

I am designing a database to keep track of our network equipment. My db has 2 tables: sites & circuits (circuit = cable) & (site = property location) Each circuit runs between two sites, so ...
0
votes
1answer
34 views

Is using a relational DB for storing votes and (accessed resources) overkill?

I am writing a forum component for a site and would like to keep track of what topics/questions a user accesses so that other topics/questions can be recommended based on said users previous choices. ...
0
votes
2answers
108 views

Parent/child relationship or not if the name of the field implies the relationship?

I am working with the harmonized system and try to catalog this in a MySQL database. This works for example like this: 01 LIVE ANIMALS 0101 horses, asses, mules and hinnies, live 0102 bovine ...
0
votes
0answers
69 views

How to know the correct indexes for mysql?

I tried to find out with explain where I must set the correct index. A current select takes about 20 seconds. Can someone tell me which would be the correct index for my tables? SELECT trade.*, ...
0
votes
0answers
8 views

MySQL Associative Weak Entity

I'm working on a project in MySQL that has a table of users who have favorite foods. Favorites is an associative entity between Users and Foods. I want the Favorites table to be a week entity of the ...
1
vote
1answer
25 views

Understanding how relationship sides works

So, I have this relations on my tables (see image) and I need to understand some things. I'll enumerate what I understand and what I need from yours is to say if I'm right or not and in case I'm not ...
0
votes
1answer
26 views

How to relate to information_schema

Is it possible to create a foreign key that relates to information_schema? For an application implementation, I would like to store extra column information in another table, but I want to ensure ...
0
votes
1answer
37 views

Difference between Relational database and time series database?

I have a bit stupid question maybe. I recently came across a term "time-series database". I would like to ask what is time series database and is it same as relational database? Thanks,
1
vote
0answers
73 views

How do you think in NoSQL? [closed]

I'm from the pre-nosql era and am rather comfortable with SQL. However, I cringe whenever someone suggests using a NoSQL database for the "upcoming" project. There are some major problems that I'm ...
0
votes
2answers
52 views

Help required to design a database [closed]

Firstly I would like to apologies if this is not the correct place to ask this question but I know how good community spirit is around here from my time in Stack Overflow. I am very new to the world ...
1
vote
3answers
73 views

Many one-to-many relationships between two tables

In the process of creating a small database for a therapeutic boarding school with Access 2013, I have a problem when designing the relational database model. Two times at least, I ran into a ...
2
votes
1answer
22 views

Save different account types in a database

I have the following issue. In one application (imagine a messaging/e-mail app on your smartphone), the user enters its accounts and gets information from the server displayed. I need to store the ...
0
votes
0answers
15 views

Would an INNER JOIN query in a sharded relational database hit the same shard when using a compound primary key?

In this question I have asked about modulus calculation in sharded tables, this design is used: CREATE TABLE Orders (order_id INT PRIMARY KEY, ...); CREATE TABLE LineItems (order_id INT, lineitem_id ...
0
votes
1answer
153 views

Cannot add foreign key constraint while creating table

My Error Code is 1215 which finds problem with the foreign key constraint. I know all fields are the same data types. I can't see where the problem is. Any help would be much appreciated! Thanks! ...
0
votes
0answers
39 views

What would be the most efficient way to store a text messaging (SMS) database

I'm creating a database to store incoming and outgoing text messages for a program that will be responding to text messages. The app has multiple potential responses depending on the message it ...
0
votes
0answers
11 views

Transforming table to third normal form

I have a table like this: L(A, B, C, D, E) and functional dependencies are: AB -> CDE , C -> D, D-> B, D -> E. I need to transform this table into 3NF. I think it's not even in 2NF. I found 3 ...
0
votes
1answer
50 views

Split MySql table into two tables with One to many Relationship

I have an old database table in MySql. It is used to store the orders from online ecommerce. Simplified diagram looks like this: +----+------+-----------------------+-------+--------------+ | id | ...
1
vote
2answers
52 views

compound primary key with separate id field for reference

I am trying to build locations into a database like so: Country -> Region -> Town Countries will be populated with a list of pre-defined worldwide countries, regions & towns are input by users. ...
1
vote
0answers
17 views

Storing generated documents that can not be updated by changes in relationships

I have a system running with PostgreSQL and Yii Framework, which generates a few medical documents that, once ready, can't be changed. For example: If my full name comes out on this document today, ...
0
votes
0answers
30 views

Spotting foreign key relations in a database that doesn't define all relationships as constraints?

At work I use a rather old MS Access database which defines some relations between tables, but does not outright define all of them. If the database application used an ORM, I would think that this ...
1
vote
2answers
115 views

When normalizing a relational database, should multiple “type” tables be combined into one?

Before making substantial changes to the content, functionality and design of my website (I'll be refactoring everything, almost a complete rewrite), I'm setting up a new PostgreSQL database to hold ...
2
votes
2answers
76 views

Algebra of joins, is there ever a need to repeat a table in a series of joins?

First, I'm just asking about inner joins. And, I'm thinking self joins or reflexive joins through a join table are special cases which depend on how the data is structured (e.g. city - state - ...
0
votes
1answer
36 views

Relational Model Design - Entity with one attribute

I am trying to desing a database relational model for an assignment. At first, I design the ER diagram and next the relational model with tables(Schemas). So here's my question : Is it possible for an ...
0
votes
1answer
84 views

Airport Database Design guidance required

I am trying to make a generic database for airport management and DBMS would be oracle 11g xe. Since, i am amateur and still learning so i have tried to kept the problem statement simple with limited ...
0
votes
1answer
62 views

Which one is correct and optimized in sql?

Imagine that I have three entities (EntityA, EntityB, EntityC) that can have some images. So there are two ways: Make an image table for each entity. It means that EntityA has a image table named ...
1
vote
0answers
129 views

Database design: Normalizing a “(many-to-many)-to-many” relationship

Short version I have to add a fixed number of additional properties to each pair in an existing many-to-many join. Skipping to the diagrams below, which of Options 1-4 is the best way, in terms of ...
0
votes
1answer
53 views

Create one-to-many to two fields in different table

I have a database where I am trying to figure out how to join a table that contains an object called ModelType. The calibration table contains two fields (EffModel and BkgModel) that are based on a ...
0
votes
1answer
55 views

Table with multiple lookups

I bet this may be a duplicate and I'm not forming the question correctly, so feel free to point me in the right direction. Background We have a SQL Server with some legacy data. They're all ...
0
votes
1answer
48 views

Attempting to identify transitive dependency

Hello I am attempting to identify a transitive dependency in the following diagram. I think that possibly the determinate of "Subtotal" is "Quantity" and "Price Charged" but I'm not sure if "subtotal" ...
1
vote
1answer
47 views

one to one relationship

This is my database structure: Users {user_id, username} Profiles {profile_id, user_id, user_views} My question is: If I do it the way mentioned above, should I to set user_id as primary key or ...
2
votes
1answer
86 views

Two relations to same table in SQL Server

I've got two tables. When I delete a row in Table1, I want to set the ID of that row in all the rows of Table2 to NULL. I've got two relationships on Table1. The problem is: I can only set one delete ...
1
vote
2answers
55 views

Oracle tables partition related

Here is my doubt. Is it possible to apply a partition to one table depending in the partitions values of another one? Why I am asking? I have one table where information headers are persisted, and ...
-1
votes
2answers
74 views

What are the possible risks involved in partitioning large database tables? [closed]

There has been much talk about the benefits of table partitioning in Relational DBMS. I would like to know: Are there any risks to table partitioning ? What measures are there to take to minimize ...
0
votes
1answer
223 views

MySQL Workbench - Creating a one-to-one relationship using existing columns?

How do I create a one-to-one relationship using existing columns in MySQL Workbench? I have an EER diagram tab open and I am selecting from the toolbar on the left hand side. Unfortunately it seems ...
2
votes
1answer
60 views

What Happens when Cartesian Product is applied to Relations with same attribute name

I understand that the Cartesian product(X) operation on two databases does not need to be UNION compatible.So,if there is a same attribute called name in the two relations R and S where name in R is ...
1
vote
0answers
59 views

How to join the tables in mysql to get wall messages and comments with name of person ? Only user and his friends messages

I have four tables in my mysql database as shown in the image url provided. I want to select data from the tables without duplication. I want to show messages and comments on wall according to the ...
1
vote
1answer
25 views

Normal form for a relation where the number of tuples having the same value in a column is the same for all the possible values in that column

Is there a normal form for a relation that would permit the following table : id | alpha ---------- 1 | a 1 | b 1 | c 2 | g 2 | u 2 | k . . . n | x n | y n | z But not this table : id | ...
0
votes
1answer
64 views

Database Designing Issue

I have a database having Millions of records in three tables. Now i want to split these three tables in multiple tables to reduce redundancy and data duplication. A lot of records(Persons) have ...
0
votes
0answers
18 views

Junction table for peer entities and uniqueness for a link [duplicate]

In my database I have two tables: for peer entities (e.g. Persons) and for links between them (e.g. Friendship). Obviously, the latter table contains at least two references to the former table (e.g. ...
0
votes
1answer
273 views

tables for different sources of payments

Selling software products. I have a table "licences". Each software licences is created due to a payment. I am creating tables to accept payments from different sources (e.g. manual or PayPal.) I'm ...
0
votes
1answer
26 views

Effectively modelling extended classes

I have 3 different types of content for a website, 'Article', 'Video', 'Review'. Each of those three types of content contain common fields and type specific fields. For this, I have created the ...
0
votes
0answers
47 views

How to represent group by in relational algebra

I have to plan a plan tree based on relational algebra.My question is that at some point I have a SORT ORDER BY the output of a join, so how do you represent group by in relational algebra.
1
vote
0answers
55 views

Why NOSql should be more performant than RDBMS under structured data loads?

The main reason NoSQL dbms have become so common is the need of storing unstructured data where a Relational database instead would require carefully designing a database schema and fitting data into ...
2
votes
1answer
226 views

Relationships between subtypes of an entity

I have a very big (hundred of milions rows) table which represent an entity (event) having many subtypes (different kind of recorded events). Each row is identified by an id (obj_id) and has an ...
0
votes
1answer
46 views

is-a relation(ERM) to tables

i try to design a database with an is-a relation: Vehicles have some general attributes and the SubVehiclesX have some specialized Attributes. SubvehicleX is a Vehicle And a Person has a Vehicle ...
2
votes
2answers
139 views

How to establish a Two-to-One table relationship (PK-FK-CK)?

My question is about DB design and its principles. I am working on a Python application where objects are mapped to database tables. I have Projects and People objects, mapped to their respective ...