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.
Questions tagged [schema-design]
142 questions
0
votes
3 answers
How would I calculate timespans from a list of check in and check outs?
I'm writing a simple time tracking program to manage my own projects. I'm a big fan of keeping reporting code in the database, so I've been attempting to create a few sprocs that generate the invoices and timesheets etc.
I have a table that contains…

FlySwat
- 172,459
- 74
- 246
- 311
0
votes
3 answers
Cassandra schema design sorted by time
I'm new on cassandra data modeling, I realy need same advice, here is my problem:
I need to create a new column family that will allow me to store and retrieve last inserted scores :
CREATE TABLE average_score(
audit_time timestamp PRIMARY…

Mehdi TAZI
- 575
- 2
- 5
- 23
0
votes
2 answers
HBase - What are the pros and cons of using one column with a list of values vs using one column family with a list of columns?
Say we were modeling Users and Friends, and Friends have a type.
We could model it in Oracle like:
User: id, name, sex, age
Friendship: user_id, friend_id, type
So in HBase, we could do:
(this first model is from here, which is recommended by the…

Matthew Moisen
- 16,701
- 27
- 128
- 231
0
votes
1 answer
MongoDB schema embedding and nested unique keys
I have a relational SQL DB that's being changed to MongoDB. In SQL there are 3 tables that are relevant: Farm, Division, Wombat (names and purpose changed for this question). There's also a Farmer table which is the equivalent of a users…

Guy
- 65,082
- 97
- 254
- 325
0
votes
1 answer
Grouping information in Mongodb
A simple question. Suppose I have 4 numbers that describe a box. Should I add them in the form of: box:{top, bottom, left, right} or keep them as 4 separate fields of the document?
I would appreciate a reason to, or not to, choose or not choose a…

Discipol
- 3,137
- 4
- 22
- 41
0
votes
1 answer
General design principle for performance of OneToMany relations in relational model
I notice a pattern which seems pretty obvious now.
Need to get your opinion on this.
Suppose have a One To Many relationship from table 1 to table 2 in a relational model.
For example table 1 could be a User table and table 2 could be a Login table…

Rohit Banga
- 18,458
- 31
- 113
- 191
0
votes
0 answers
MongoDB Schema to track transformations and log process
I am redesigning a very normalized database using the much more flexible MongoDB. The current problem is that the existing structure doesn't support the new processes being implemented without changing the MySQL schema extensively. Rather than…

chipadmin
- 79
- 9
0
votes
1 answer
BizTalk schema development issue with element Occurrences
Please find the below XML format, for which I'm trying to build a Schema.
…

Software Enginner
- 675
- 2
- 14
- 43
0
votes
1 answer
Which Schema change scenario?
My current schema looks like the following:
ID | DisplayVal
-- ----------
1 1-H-3
2 2-H-3
3 3-J-4
In the above, the ID field is an IDENTITY INT field which is also used as and end user account Id. The DisplayVal is what they see…

Xaisoft
- 45,655
- 87
- 279
- 432
0
votes
1 answer
rails assocations using column other than primary key
i am fairly new to rails and want to take advantage of the associations ActiveRecord provides in trying to set up a new project and schema. i have two models, users and questions. when a user is being set up by an administrative user, i have a form…

Austin
- 1,129
- 2
- 11
- 18
0
votes
3 answers
Mongodb Schema design suitable one suggestion
Hi I am newbie to mongodb.I am using java.
I have 2 tables system, system_properties in my relational table.
Something like this.
Table Fields values
System System_ID(PK),…

Ramya
- 1,067
- 6
- 16
- 29
0
votes
1 answer
Hbase schema design - Suggestion Required
I have recently started experimenting Hbase and hadoop stack. I am trying to build an application from scratch. I am designing my schema for my application which will be using google n-gram data set.
I realize that the data set can be made into a…

Dwarakanath Jagadeesan
- 109
- 2
- 14
0
votes
1 answer
mongodb vs. postgres: modeling conditions
We are now choosing a database for a project. The candidates are mongodb and postgres. Our users need to define conditional logic, e.g. user defines conditions (as strings) "x happens", "y leaves" etc, and can then concatenate them to conditions "if…

Yaron Naveh
- 23,560
- 32
- 103
- 158
0
votes
1 answer
Put table in a table
I have a schema design that looks like this:
Table: User
Row Column Family
User
u1 User:name
User:mail
Table: Tags
…

Leander
- 330
- 3
- 11
0
votes
2 answers
design mongodb schema for a specific project: embed documents or use foreign key
In my project, it has 3 models:
City
Plaza
Store
a city has plazas and stores; a plaza has stores.
My initial design is to use "foreign keys" for the relationship. (I am from mysql and jsut start to pick up mongodb)
class City(Document):
…

shoujs
- 1,113
- 1
- 11
- 24