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
13
votes
9 answers

Does every table really need an auto-incrementing artificial primary key?

Almost every table in every database I've seen in my 7 years of development experience has an auto-incrementing primary key. Why is this? If I have a table of U.S. states where each state where each state must have a unique name, what's the use of…
Jason Swett
  • 43,526
  • 67
  • 220
  • 351
13
votes
3 answers

Converting large XML file to relational database

I'm trying to figure out the best way to accomplish the following: Download a large XML (1GB) file on daily basis from a third-party website Convert that XML file to relational database on my server Add functionality to search the database For the…
Ken
  • 3,091
  • 12
  • 42
  • 69
13
votes
7 answers

Options for eliminating NULLable columns from a DB model (in order to avoid SQL's three-valued logic)?

Some while ago, I've been reading through the book SQL and Relational Theory by C. J. Date. The author is well-known for criticising SQL's three-valued logic (3VL).1) The author makes some strong points about why 3VL should be avoided in SQL,…
13
votes
4 answers

(Database Design - products attributes): What is better option for product attribute database design?

I new in database design. What is better option for product attribute database design for cms?(Please suggest other options also). option 1: 1…
Ben
  • 25,389
  • 34
  • 109
  • 165
13
votes
3 answers

phpMyAdmin - Error: relational features are disabled

When I want to create a relation between two tables in designer mode with phpMyAdmin 4.3.8, it gives me an error saying: Error: relational features are disabled! When I try it with 4.1.4, it works just fine. I can't seem to find where I should…
user3022069
  • 377
  • 1
  • 4
  • 13
13
votes
2 answers

Database Structure involving dynamic fields

Im working on a project. Its mostly for learning purposes, i find actually trying a complicated project is the best way to learn a language after grasping the basics. Database design is not a strong point, i started reading up on it but its early…
13
votes
1 answer

Database specialized in binary data storage

I'm looking for a database that's specialized in storing binary data (files actually). This is the old discussion of storing files in the database or not. But I'm not looking for pros and cons, I'm looking for a database that is actually designed…
JohnDoDo
  • 4,720
  • 8
  • 31
  • 47
13
votes
2 answers

Core Data : Insertion into One to Many Relationship

I have just started learning how to implement Core Data Model on the iOS. After some basic tutorials on how to store and retrieve data with one to one relationship among entities, I am now trying to implement a one to many relationship. My data…
Kyuubi
  • 1,228
  • 3
  • 18
  • 32
13
votes
5 answers

Generalized way to extract JSON from a relational database?

Ok, maybe this is too broad for StackOverflow, but is there a good, generalized way to assemble data in relational tables into hierarchical JSON? For example, let's say we have a "customers" table and an "orders" table. I want the output to look…
ccleve
  • 15,239
  • 27
  • 91
  • 157
13
votes
1 answer

SQLAlchemy: How to conditionally choose type for column by depending on its backend

I want to use HSTORE type for a column if it uses PostgreSQL as its backend, or PickleType otherwise. The problem is that we cannot determine which backend will be used when schema is being defined (in Python). How can I determine this and…
minhee
  • 5,688
  • 5
  • 43
  • 81
13
votes
2 answers

set null value in a foreign key column?

I have this table CREATE TABLE [dbo].[CityMaster]( [CityID] [int] NOT NULL, [City] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [BranchId] [varchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT…
12
votes
4 answers

Is it OK to execute code when a module imports?

I'm designing a small GUI application to wrap an sqlite DB (simple CRUD operations). I have created three sqlalchemy models (m_person, m_card.py, m_loan.py, all in a /models folder) and had previously had the following code at the top of each…
12
votes
3 answers

How to create multiple one to one's

I have a database set up with many tables and it all looks good apart from one bit... Inventory Table <*-----1> Storage Table <1-----1> Van Table ^ 1 …
12
votes
5 answers

Would relational databases scale as well (or better) than their NoSQL counterparts if we drop the relationships?

Disclaimer: This is a broad question, so it could be moved to a different source (if the admins find it appropriate). All the cool kids seem to be dropping relational databases in favor of their NoSQL counterparts. Everyone will have their reasons,…
Salman Paracha
  • 1,697
  • 2
  • 16
  • 27
12
votes
8 answers

Web Development - Object db vs Relational db

Whats the cons and pros of using a object database or relational database for regular web development which involves a lot of CRUD? UPDATE: I reopened the bounty reward in order to give Neville it.
ebb
  • 9,297
  • 18
  • 72
  • 123