Questions tagged [schema-design]

Concerned with design of properties and their hierarchy to represent an entity in a specific format. It can be JSON Schema, XML Schema, SQL Schema etc. Usually used to discuss database schemas.

142 questions
6
votes
2 answers

Forum Model For MongoDB

So I am creating a model for a forum. Think thread and a bunch of comments where. Thread has many comments. In RDBMS world, I would design this as such Thread --has many--> Comment id id user_id thread_id …
denniss
  • 17,229
  • 26
  • 92
  • 141
6
votes
5 answers

Best schema design for table relationship that enforces integrity

Given a table of models 'A', that can have multiple child models 'B', of which 'B' will have one or more child models 'C'.. this sounds simple, however I need to enforce that for each 'A', any 'B' must have a unique collection of 'C'.. for example,…
meandmycode
  • 17,067
  • 9
  • 48
  • 42
6
votes
1 answer

MongoDB: Schema design for stock tick database

I need to store daily stock closing prices as well as tick data in MongoDB. How would you design such a schema? For daily prices I would be tempted to have one document for each stock symbol, e.g. { symbol: "AAPL", quotes: { { …
Morten
  • 1,819
  • 5
  • 28
  • 37
6
votes
1 answer

MongoDB Conversation / Private Message Schema using Mongoid

I'm building a forum system in Rails in order to become more acquainted with Rails and Mongoid. A feature I'd like to add is a private message system forum users can use to message each other. In terms of schema design I can think of two…
CarelZA
  • 1,217
  • 1
  • 10
  • 12
5
votes
1 answer

Is there a prefered way to specify a text column in SQLite?

Since the SQLite engine will not truncate the data you store in a text column, is there any advantage in being specific with column sizes when you define your schema? Would anyone prefer this: CREATE TABLE contact( id INTEGER PRIMARY KEY, name…
Jannie Theunissen
  • 28,256
  • 21
  • 100
  • 127
5
votes
3 answers

Is it possible to change the analyzer specified in the schema in Solr without reindexing from the original source?

In Solr, if we have a field in the schema with stored="true", and we change the analyzer associated with that field, is it possible to update just this field without reindexing all the documents? Could this be done using the "stored" values of the…
Juampa
  • 154
  • 1
  • 7
5
votes
4 answers

In SQL / MySQL, are there reasons not to put one-to-one relationship in the same table?

One-to-one relationship could usually be stored in the same table. Are there reasons not to store them in the same table?
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
5
votes
1 answer

Maintaining Consistency Between JavaScript and C# Object Models

I'm working on an ASP.NET web application that uses a lot of JavaScript on the client side to allow the user to do things like drag-drop reordering of lists, looking up items to add to the list (like the suggestions in the Google search bar),…
Mark Kanof
  • 1,426
  • 1
  • 11
  • 16
5
votes
2 answers

MongoDB schema for dynamic questions and answers

I have a current relational model for a dynamic question and answer. I am trying to see if it is possible to convert the schema into MongoDB for performance and flexibility. We basically have a series of questions and question types. These…
FarscapePROJ
  • 285
  • 3
  • 16
5
votes
1 answer

HBase schema/key for real-time analytics solution

We are looking at using HBase for real-time analytics. Prior to HBase, we will be running a Hadoop Map Reduce job over our log files and aggregating the data, and storing the fine-grained aggregate results in HBase to enable real-time analytics and…
Suman
  • 9,221
  • 5
  • 49
  • 62
4
votes
2 answers

What do people use for CN with inetOrgPerson in LDAP directories

I've been using givenName+" "+surname for the CN field and I woke up screaming last night 'what about John Smith'? I can imagine any large organization employing multiple people with the same name. So of course this isn't going to work. What do…
user207421
  • 305,947
  • 44
  • 307
  • 483
4
votes
1 answer

Whats wrong with Mongo DBRef's?

Coming from a RDMBS background it's hard not to think of thinkgs like joins, especially when working with the schema-less MongoDB environemnt. I read on a blog that DBRefs were only useful when you do know the type of object that you're…
4
votes
1 answer

Table Design for Multiple Login Methods

I'm facing the normalization dilemma. Now that OpenID has been declared a failure, I would like to incorporate it into my web site. I'm also gonna throw in FB Connect while I'm at it. Clearly this means I will have a 1:many relationship between…
slifty
  • 13,062
  • 13
  • 71
  • 109
4
votes
1 answer

Is HBase right for storing and querying log data?

I'm thinking of using HBase to store logs (web log data), each log would have about 20 different values (let's say columns), I want to run queries that filter results based on those columns. My initial idea was to save each log (cell) multiple…
wlk
  • 5,695
  • 6
  • 54
  • 72
4
votes
1 answer

Entity Attribute Value (EAV) vs. XML Column for New Product Atttributes

I have an existing, mature schema to which we need to add some new Product attributes. For example, we have Products.Flavor, and now need to add new attributes such as Weight, Fragrance, etc. Rather than continue to widen the Products table, I am…
Mark Richman
  • 28,948
  • 25
  • 99
  • 159
1
2
3
9 10