Note that there are some explanatory texts on larger screens.

plurals
  1. POUser-created database structure: non-relational or relational databases?
    primarykey
    data
    text
    <p>I want to have dynamic fields in my database records.</p> <p>For example: I want to build an application for users to create their own forms.</p> <p>A user could create the following forms:</p> <p>Personal profile:</p> <ul> <li>Full Name</li> <li>Street</li> <li>Job</li> <li>Phone <ul> <li>Home</li> <li>Work</li> <li>Mobile</li> </ul></li> <li>Interests <ul> <li>Interest 1</li> <li>Interest 2</li> <li>Interest 3</li> </ul></li> </ul> <p>Work:</p> <ul> <li>First name</li> <li>Last name</li> <li>Work <ul> <li>Department <ul> <li>Specialty 1</li> <li>Specialty 2</li> </ul></li> <li>Department <ul> <li>Specialty 1</li> <li>Specialty 2</li> </ul></li> </ul></li> </ul> <p>Countries:</p> <ul> <li>United states <ul> <li>States <ul> <li>New York <ul> <li>Cities <ul> <li>New York</li> <li>Foo</li> </ul></li> </ul></li> <li>Alabama <ul> <li>Cities <ul> <li>Bar</li> <li>Baz</li> </ul></li> </ul></li> </ul></li> </ul></li> </ul> <p>As you can see this is a very dynamical structure:</p> <ul> <li>No predefined number of fields</li> <li>No predefined field names</li> <li>User creates the structure of the database</li> </ul> <p>So I wonder, what is the best database for this: relational (mysql/postgresql) or non-relational like mongodb/couchdb/cassandra or even xml databases like xindice?</p> <p>And even if I choose non-relational databases for this, would it be smart to store security-critical information on it like customer and billing information?</p> <p>I have heard people say that if your information require uniqueness then use relational database. "We don't want to risk to bill our customers twice". What problems on non-relational databases do they actually mean? Can't you store unique data in non-relational databases?</p> <p>Another thing I was thinking about: Won't saving data in non-relational databases mean that I will have duplicated entries?</p> <p>Consider this example:</p> <p>Categories:</p> <ul> <li><p>Office</p> <ul> <li>Applications <ul> <li>Textmate <ul> <li>Author : Foobar</li> <li>Price : 120</li> </ul></li> <li>Foo <ul> <li>Author : Foobar</li> <li>Price : 120</li> </ul></li> </ul></li> </ul></li> <li><p>Office</p> <ul> <li>Applications <ul> <li>Textmate <ul> <li>Author : Foobar</li> <li>Price : 120</li> </ul></li> <li>Bar <ul> <li>Author : Foobar</li> <li>Price : 120</li> </ul></li> </ul></li> </ul></li> </ul> <p>As you see there are situations for identical entries. How do non-relational databases handle these? Im so used to relational databases.</p> <p>I sum up my questions:</p> <ul> <li>What type of database for user-created database structure?</li> <li>Are non-realtional databases for storing security critical information?</li> <li>How do non-realtional databases handle duplications?</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload