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
3
votes
1 answer

HBase: Scan column qualifiers - is it possible?

I have some various IDs related to each row: let's say, 1001, and 1002. Each of these IDs has a similar set of attributes. So my thought is to have one column family ('cf') with column qualifiers as such: cf:1001-attribute1 -> 'value…
David Parks
  • 30,789
  • 47
  • 185
  • 328
3
votes
1 answer

MongoDB data schema performance

I am trying to understand the internal allocation and placement of arrays and hashes (which, from my understanding are implemented through arrays) in MongoDB documents. In our domain we have documents with anywhere between thousands and hundreds of…
Sim
  • 13,147
  • 9
  • 66
  • 95
3
votes
1 answer

Defining a valid mongoose schema for my JSON with nested docs without arrays?

Im pretty new to JavaScript and Mongoose. I ended with a bit weird designed JSON which I want to persist via mongoose. This is an example of this JSON: {name : "a_string", a1 : {something : 'a_number', something_else : 'a_number'}, a2 : {...} } a1,…
Dredok
  • 807
  • 1
  • 9
  • 30
2
votes
1 answer

designing schema for huge tables in oracle

I have a user table, transaction table and user_transaction table. the number of users is around 75,000 number of unique transactions possible in the application is about (rows in transaction table is between 1 and 3 million). user_transaction is…
pri_dev
  • 11,315
  • 15
  • 70
  • 122
2
votes
2 answers

Mongodb map reduce across 2 collection

Let say we have user and post collection. In post collection, vote store the user name as a key. db.user.insert({name:'a', age:12}); db.user.insert({name:'b', age:12}); db.user.insert({name:'c', age:22}); db.user.insert({name:'d',…
Kuroro
  • 1,841
  • 1
  • 19
  • 32
2
votes
1 answer

Star schema modeling - many-to-many

I'm building a data warehouse based on NFL statistics for educational purposes as I learn this paradigm - I have the following modelling problem Players can play for different teams different years and similarly coaches can coach different teams…
2
votes
1 answer

Cassandra schema design: should more columns go into partition vs. cluster?

In my case I have a table structure like this: table_1 { entity_uuid text ,fk1_uuid text ,fk2_uuid text ,int_timestamp bigint ,cnt counter ,primary key (entity_uuid, fk1_uuid, fk2_uuid, int_timestamp) } The text columns are made up of random…
Bing Wu
  • 348
  • 2
  • 15
2
votes
1 answer

Schema design: many to many plus additional one to many

I have this scenario and I'm not sure exactly how it should be modeled in the database. The objects I'm trying to model are: teams, players, the team-player membership, and a list of fees due for each player on a given team. So, the fees depend on…
azymm
  • 312
  • 1
  • 8
2
votes
1 answer

Designing Date-Time schema in Neo4j

I have a question on 'schema' design. To simplify, there are basically 2 entities, Universities and Students. Students can be 'Current' or 'Past'. Each Student has a 'start date' and, possibly, an 'end date'. Now, I can have a relationship from…
2
votes
1 answer

SOLR schema design question: field absence or boolean field?

I need to partition my SOLR index into two halves. As it turns out I already have a STRING field which represents the partitioning info I need. Meaning, one kind of record that would be searched for is where the string field is present in the…
harschware
  • 13,006
  • 17
  • 55
  • 87
2
votes
1 answer

Can I utilize indexes when querying by MongoDB subdocument without known field names?

I have a document structure like follows: { "_id": ..., "name": "Document name", "properties": { "prop1": "something", "2ndprop": "other_prop", "other3": ["tag1", "tag2"], } } I can't know the actual field…
Ville Mattila
  • 1,343
  • 3
  • 15
  • 28
2
votes
2 answers

Are there any open source resources for SQL schema design patterns?

I can barely count the number of times I've created a "users" table, similar for "computers" and "customers". I've tried looking around, but haven't ever seen a resource for modeling these schema that we see over and over again. It seems like some…
nclu
  • 1,057
  • 1
  • 8
  • 19
2
votes
1 answer

which role-permission database design?

I want to manage roles and permissions. Most of designs on web look like this tables: Users Roles UserRoles Permissions RolePermissions Here, what is permissions? I am thinking for such a design instead: Users Roles UserRoles Permissions In this…
sheno
  • 273
  • 1
  • 5
  • 16
2
votes
2 answers

Why, or why not, to use a schema free database?

I've tried using only mongodb in a web application for some time. But I'm wondering why some people say schema-free or dynamic schema is powerful. Now I don't think it so fantastic or wonderful. Would anybody like to talk about the proper case to…
neuront
  • 9,312
  • 5
  • 42
  • 71
2
votes
5 answers

Which of these 2 MySQL DB Schema approaches would be most efficient for retrieval and sorting?

I'm confused as to which of the two db schema approaches I should adopt for the following situation. I need to store multiple attributes for a website, e.g. page size, word count, category, etc. and where the number of attributes may increase in the…