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
0answers
17 views

Need a table schema for general store app [on hold]

I am Developing one application for online general store and stuck some where near making a schema for the products. Here, Every Product has brands and Product can come in multiple varieties like for ...
0
votes
0answers
14 views

master-slave vs masterless architecture [on hold]

As per Riak's doc "Most relational databases leverage a master/slave architecture to replicate data. ... Conversely, Riak uses a masterless system with no single point of failure, meaning any node ...
2
votes
1answer
30 views

How to keep updates (diffs) of some entity in the database

What is the best way to keep updates (diffs) of the some entity in the database? At StackOverflow we can edit questions and answers. And then we can look at any revision of the question or answer we ...
0
votes
0answers
10 views

Translating duplicated data entries into Domain Relational Calculus

Given a following table named BOOKING, which contains three columns, guest_name, room_number and booking_date, how do I find the all the guest_name that have the same room_number and booking_date? I ...
2
votes
1answer
577 views

How to store several lists and their items

The app I'm working on revolves around projects. Each project can contain several lists, and each list is made up of several items. Each list relates to a single project. Is it better to have one ...
0
votes
1answer
110 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 ...
1
vote
1answer
503 views

How to insert values in junction table for many to many relationships?

I have three tables in database: trips(trip_id(pk), trip_name(unique), user_id(fk)) places(place_id(pk), place_name(unique)) trips_places_asc(trip_id(fk), place_id(fk)) Since many trips can ...
1
vote
2answers
194 views

Multiple relationships between the same entities

Is there a name for when 2 entities can have multiple relationships between them?
0
votes
2answers
256 views

MongoDB/MySQL - auto increment vs object ID

I am in the process of evaluating MongoDB and writing some basic PHP applications around it. Typically in my PHP/MySQL applications, I would create an ID field and set it to auto-increment on each row ...
2
votes
1answer
908 views

Number of ISA relationship triangles in an Entity Relationship Diagram

The following two diagrams are nearly identical. However, in one, there are two ISA triangles from the Entity "Movie" and in the other there is just one. What is the difference in meaning?
0
votes
0answers
20 views

Converting Entity Relation(ER) Model to Relational Schema?

I have the following ER Model I am trying to convert this to a relational database schema but I am not sure about several things: PORT_VISIT and PORT are weak entities. How do I figure on which ...
0
votes
0answers
10 views

Is the use of my lookup table efficient?

I'm trying to find the best way to architect the relationship in the scenario that: A team can have multiple players, a player may also have multiple teams My first thought was to use a lookup ...
0
votes
0answers
12 views

Data base design for handling website subscriptions

I have a website where at least 20 posts are posted in a day and each post contains more than 5 categories and each category has further tags. I wanted to build a subscription module that users can ...
0
votes
1answer
59 views

Help writing the following query to relational algebra

Can someone help me in writing the following query to relational algebra, I am studying DBMS and I am stuck on this exercise. Query: SELECT a.name, d.name. d.grade FROM student a, enrolled i, class ...
2
votes
2answers
152 views

Logical problem with a database model

Beforehand the table names and columns are in Spanish, my native language is Spanish. (table names have been now edited to English) I've got a database to manage the tickets sales of a trip that is ...
0
votes
1answer
42 views

Suitable schema to record email sent and response received and invoicing in DB

When a form submission is made on a website: An email with form's details is sent to a set of recipients email addresses stored in a DB. The email contains a link for the recipient to show interest. ...
3
votes
2answers
317 views

Should I use a compound or surrogate PK in a many-to-many table?

I have a database: DROP TABLE IF EXISTS `books`; CREATE TABLE `books` ( `isbn` VARCHAR(255) NOT NULL, `title` VARCHAR(255) NULL DEFAULT NULL, PRIMARY KEY (`isbn`) ) COMMENT 'Books used at this ...
0
votes
1answer
72 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
0answers
15 views

Medical History - Is this DB properly design?

Could you please tell me if this DB is properly design? Are relationships type correct? Is there anything I should delete or add? Thanks you all very much!
1
vote
0answers
40 views

Database schema design for individual configurations

I'm trying to design a database schema that allows me to store customer custom built products. As a simplified example: A user can buy a cupboard, draws, boxes, and dividers. A cupboard has 2 tiers. ...
0
votes
1answer
30 views

Help with relational database design

I have a data model where each user profile belongs to a department. Each job is also available for a specific department. The department names are formatted like this: AAA-BBB-CCC-DDD-EEE, but of ...
4
votes
0answers
85 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 ...
2
votes
1answer
77 views

If A and B are candidate keys, then AB is candidate key or not ?

If R{abc} is a relation, f{ a->b b->a a->c b->c }, then a and b are candidate keys. What about ab ? Is it a candidate key or is it a super key or both ?
1
vote
3answers
1k 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
0answers
40 views

MySQL Query Causing Massive Slowdown Over Time

I've been experiencing massive slowdown on my server after launching a new website. Using MONyog I can see that after an apache/mysql restart, the queries/second starts out nice and low for around 10 ...
0
votes
0answers
22 views

Database systems with users and sub users accessing the data

I am making a database for school student maintenance. Below is the basic description. There are schools. One school has many staff (i.e: Principles,Teachers, Section Head, Office Staff etc) These ...
0
votes
0answers
34 views

Designing a correct table structure

We are trying to save the Family History of a particular foreign job applicant. Below are the details we have to save. Familiy Member: Father|Mother|1st Brother| 2nd Brother| 1st Sister| etc etc ...
0
votes
0answers
21 views

How to have a relation applied only to all entities related to another given entity?

Let's say I'm trying to design an online server for judging a bunch of submissions to several problems. Firstly, each problem has many subtasks (which must go to one problem alone). For each ...
0
votes
1answer
63 views

What's the best database if i want save data temporally? [closed]

I want to create a datalog system so I need to store some int data temporally. What would be the best database (Relational, NO-SQL or some specific) for that purpose? And what would be the best way to ...
1
vote
0answers
30 views

In terms of relational databases is a Relvar the equivalent to a Schema?

I've been reading up on relational databases and the term Relvar and schema keeps coming up. From my understanding: A relvar is a variable holding a relation. A schema is a logical definition of a ...
0
votes
0answers
62 views

How to design a Many to Many relationship table?

I'm new to DB's, so I'm not really sure how to even formulate the question. Please feel free to edit the question itself. Anyways, let's describe! I should advise that I am using MS-ACCESS for this ...
2
votes
0answers
68 views

Storing URLs in a database

I am thinking about storing URL's in my database, but I am not sure whether the way I use is an efficient way to do things or not. Table name : url url_id (Primary Key & Auto Increment) url_value ...
1
vote
0answers
52 views

What are the different types of binary relationship types?

I'm new to databases and while studying questions on it, I've come across one that I can't find the answer to. Define the three different binary relationship types that are common in relational ...
1
vote
1answer
76 views

How to insert values into a junction table?

I add values into my two tables using the code below, but I also have a junction table called book_main_cover and I want to add data into this table to make a connection between book_id and ...
1
vote
1answer
19 views

Relation between tables [closed]

This question may be too easy to ask, but I can't understand how to do it. I am new in SQL. I have two tables. Table I book_id (AI & Primary Key) book_name book_year Table ...
0
votes
1answer
647 views

Create relationship between two tables with composite primary key

I've created a table [t1] with two fields and a composite primary key, show in below: create table t1( id int, name nchar(10), primary key(id,name) ); I want to create a second table ...
0
votes
2answers
74 views

SQL Query: Selecting a person who is a member of all existing groups

I'm tinkering around with my very first SQL queries and am completely baffled by a problem I encountered. Let's say I have the following database: PERSON(PID, Name) MEMBER(PID, GroupID) How would ...
1
vote
0answers
21 views

reports on history table

Assume Trucks which travel between Cityies. I store the Cityies that a Truck has traveled to in TruckLocationHistory table, if the Truck is passing the City, State = Passed and if it gonna stays for ...
1
vote
1answer
315 views

MongoDB Manual References vs DBREF

I've been researching MongoDB and trying to see if it would be a fit for my company's product catalog. I came across database references: http://docs.mongodb.org/manual/reference/database-references/ ...
0
votes
1answer
41 views

Help with preventing double bookings with variable lengths

I'm designing a sample database for a venue where members can create bookings for venues. I'm looking for a method to prevent double bookings (possibly by creating a button on a form that checks ...
0
votes
3answers
96 views

Database Design for Paper Submission System

I am learner of Database design, I want to design a database for a journal paper submission system in which one paper can be submitted by one or more author. I have initially two tables Author and ...
0
votes
0answers
35 views

calculating Canonical covers

Given F = {AB -> C, A -> BC, B-> A}, compute Fc AB-> C is A extra? {B->C, A-> BC, B->A} 1st possible Fc = {A->BC, B->AC} AB-> C is B extra? {A->C, A->BC, B->A) 2nd possible Fc = {A->BC, ...
2
votes
1answer
89 views

Inheritance or lot of relationship?

I have to transpose a class Diagram into a Physical Data Model (more precisely MySQL database structure). In my class diagram, I have a lot of entities (A, B, C, D) which inherit from an other ...
0
votes
2answers
61 views

Need help about giving relationships in database design

I am developing a simple blog application in which users can write posts and others can like, comment, share etc. i am facing difficulty in designing database. What I have tried is: user ...
0
votes
1answer
73 views

Trying to map postal codes to their respective cities, but running into some issues

The Problem I am creating a database of Countries, Regions, Cities and Postal Codes. Here's an example to give an idea of the database structure as it is now: Now, let's take Tuskegee University ...
1
vote
1answer
48 views

Transforming a relation to 3NF

I'm trying to transform the following relation to 3NF but can't figure it out. The relation is (a student can only have 1 major): STUDENT (StuID, StuName, Major), Primary Key = {StuID} I tried the ...
1
vote
3answers
60 views

Study material for Advanced Databases module inc SQL, Relational Model, ERM & TM [closed]

For my next module in my masters, I am planning on studying Advanced Databases. (Long story short, the masters is designed for people with NON-CS degrees, so I have never studied databases, therefore ...
0
votes
1answer
106 views

A question regarding the performance of normalization

I am sorry this is such a newb question, but it is one thing I am having a difficult time wrapping my mind around, and after an evening spent reading I finally just decided to ask for some ...
5
votes
3answers
533 views

Replace relational database with “poor” design in software product with non-relational DB? [closed]

Edit: This question is about how to deal with many issues that arose from a overall system design, which made parts of the system deviate from common standards. For example, managing everything in the ...
0
votes
0answers
50 views

Multi-Tiered Database Design Issue

I am trying to build the multi-level model as demonstrated. When a user creates a campaign they will select some categories and some metros from tables Category and Metro. Those selections will then ...