Questions tagged [schema]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2 votes
0 answers

Approach to storing variations in schema in SQL database?

I am working on a simple dictionary app built on PostgreSQL. I have the idea of "lexemes" or what I'm calling "flows", which are basically any word, word fragment (prefix/suffix), ...
Lance's user avatar
  • 2,561
1 vote
3 answers

How do you test whether schema changes will break services?

I maintain a relational database of sorts, and occasionally a feature request requires a schema change (eg. add a new column, etc...). However, a number of "services" consume this data. It's ...
MYK's user avatar
  • 321
1 vote
1 answer

Efficient Schema For Pairing Styling Metadata with Text Fields in JSON Messages

I am trying to design a schema for pairing styling data with text. However, I need it to pair styling metadata to only one part of a larger string. For example: "This is a test string" I ...
CCD's user avatar
  • 143
0 votes
0 answers

API contract design for field attribution based schema

I am currently working on a problem which involves defining the API contract (or DTO/Schema). Note that this will be private API, and non public. The following image shows a possible form of the ...
user1778855's user avatar
0 votes
1 answer

Store UUID Reference vs. storing string in Mongodb

I am trying to store user preference for notifications. One way to do is store types of notification in separate collection and store UUID of that notification type in user table. e.g. notification-...
Anonymous Creator's user avatar
-2 votes
2 answers

Avoid redundant field using JSON type in MySQL [closed]

I have experienc with designing relational dbs but first time attempting to store JSON in a mysql table. I am using mysql 5.7.8 which has the ability to store json data type as a column. When I create ...
simgineer's user avatar
  • 139
-4 votes
1 answer

Create the database using schema migration for the first time? [closed]

what is the best practice when creating a database schema for the first time? Do I need to write schema migrations, or create it from the DBMS tools?
themhz's user avatar
  • 169
0 votes
2 answers

In a database schema, should frequently changed information be isolated from static information?

A contrived example: I have many Thimbles, identified in real-life by their color, that I lend out to friends. I want to know only the most recent friend that is wearing my Thimble. My friends covet ...
etberg's user avatar
  • 31
0 votes
1 answer

Where should schemas be maintained?

When working with big architecture, I experienced high costs when it comes to changes of a data model that is used in multiple applications, servers, databases. So I thought about designing a server ...
telion's user avatar
  • 61
0 votes
1 answer

What is the schema to specify relationships in a flat-document structure?

I have a question about the best database schema to do this. So, we want our database schema to carry out some generic operation <> involving two units of data, x1 and x2 (e.g. a1). // CURRENT ...
tintinthong's user avatar
1 vote
2 answers

Appropriate database schema

I'm currently collecting the data about flat prices. I have size, price, location, price per m2 and date of retrieving the data about flat(sample date). I'm plannig create MySQL database filled with ...
viceriel's user avatar
  • 121
-2 votes
1 answer

Converting a table to an ORM schema

I'm trying to convert this table into an ORM schema: The solution given by the book is this one: It connects all the paramether to the Member one. This is my solution, which I think it's less ...
PorcoDioBastardo's user avatar
1 vote
2 answers

Bidirectional sync between two databases with differing schemas

I'm embarking upon a project where the goal is to create a bidirectional sync mechanism between two database systems with differing schemas. One is a custom CRM app build on MongoDB, the other is ...
Journeyman's user avatar
1 vote
2 answers

Which REST API url structure should I take?

I am wondering which API url scheme should I use. I am designing multi-site project so that the URL can looks like: [GET] /website/1 [GET] /website/1/category [GET] /website/1/product Which is life ...
Bartłomiej Sobieszek's user avatar
3 votes
1 answer

Is it recommended to use schemas on non-relational databases?

I'm trying to figure out if the use of schemas on non-relational schemaless databases like MongoDB is a recommended practice or a bad practice to be avoided. I am doing research work and am looking ...
Javier Scars's user avatar
1 vote
8 answers

Is there a way to prevent developers leaking data while they are developing?

I am working with a startup company for a while now. They have been affected by some reckless developers in the past. One area they want a real and immediate improvement is when they assign a task to ...
sepisoad's user avatar
  • 127
0 votes
1 answer

Database schema for products and their packages

The product is water purifier, and we are selling packages included support for changing filters. Serial is a unique number identifying a single produced item and it's only for water purifiers not ...
Ali's user avatar
  • 113
-2 votes
1 answer

Generate HTTP RESTful server from database schema

Today the job of most Java-based servers is to translate HTTP requests into SQL commands/queries and send a JSON-ed response back to the client. That's a pretty generic (and honestly boring) job. I ...
Evgeniy Gryaznov's user avatar
1 vote
2 answers

Using a Single Collection for the entire application in MongoDB

It strikes me why most of the sites don't talk about this topic. Recently, I've been doing some extensive research when it comes to NoSQL schema design, and evaluating the different NoSQL options (...
Jose A's user avatar
  • 275
1 vote
1 answer

How to safely allow different end users to insert data into a table stored in an Oracle database?

This is a basic question, but I don't have any sense of what other developers do in this scenario. The Situation I am creating an interface to allow end users to insert and update data in a table ...
LetEpsilonBeLessThanZero's user avatar
0 votes
1 answer

Regarding data modeling in a NoSQL use case

I am reading the following link to learn about system designs of various systems. (This is a paid link, I am attaching all explanations below.) In an attempt to explain the system design of Instagram ...
amiageek's user avatar
0 votes
1 answer

Descriptive short term for a field that has been set to read-only in anticipation of removal?

I'm currently writing a design to add the possibility to mark a field or attribute for an entity as read-only in preparation for imminent removal. The idea is that, once the field has been thus marked ...
telotortium's user avatar
0 votes
5 answers

How to create a db schema for "if this then... elseif .... elseif ..." and so on?

I want to create an app where a user will go through a series of steps every day. All the subsequent step will depend on the previous ones, that is, 2 users can have different experiences depending on ...
Jono's user avatar
  • 19
9 votes
5 answers

Use UUID on top of auto increment ID

I am trying to design the DB schema of my new project and I need some suggestions. I am thinking to have one extra column for some tables which is a UUID. I wanted mainly for tables which contain data ...
pik4's user avatar
  • 365
4 votes
2 answers

In a graph database, how do I know whether to use a node, node property or relationship property?

For example, given node types User and Post, and expressing that a user posted something on Twitter, what factors would I need to consider in deciding between: (u:User)-[posted]->(p:Post {platform:...
Isvara's user avatar
  • 620
1 vote
1 answer

Database Schema design of server running status log

I am working with 4 AWS EC2 instances (servers). Each Instance has Instance ID and Instance Name. Instance ID is unique. Each of them having multiple application servers, like on of them is running ...
codeclue's user avatar
  • 113
3 votes
1 answer

How do I create front end test data based on backend model's schema?

I'm really struggling with creating robust tests for my frontend because of the coupling in data schema between my backend and frontend. To clarify, I have a Django rest API and I have a front end ...
Jad S's user avatar
  • 561
0 votes
2 answers

"Expires_at" column: amount of hours or the final value?

Say, I have an entity which has a column "inserted_at". Now I want to add a column "expires_at". It can be in hours, days or months. There're 2 approaches to this: 1) add 2 columns: ...
Kumaro's user avatar
  • 67
0 votes
1 answer

Using schemas for confining data for each customer (or filtering against a customer table)?

I'm planning a database which will contain data for many projects / customers. Data for each customer will be totally independant. However they will all have the same structure. So I'm wondering, ...
Eino Gourdin's user avatar
7 votes
2 answers

How to define and share a JSON schema between the front-end and back-end of an application?

We have a mobile app that accepts input into some fields, formalises them as a JSON document and then sends it to the back-end for processing. We want to agree on a schema for this document that can ...
Nobilis's user avatar
  • 179
1 vote
5 answers

Define a RESTful API for creating/updating other resource definitions?

Let's say I have a users resource, with two properties: name and email as specified by a users JSON Schema document, which right now looks like this: { "$schema": "
user avatar
62 votes
11 answers

Should I define the relations between tables in the database or just in code?

In my experience, many of the projects I have read in the past didn't have relationship definitions in the database, instead they only defined them in the source code. So I'm wondering what are the ...
Yoshi's user avatar
  • 747
0 votes
1 answer

OData - Handling Structural Changes

Working with the Success Factors OData API and encountering issues whenever the schema is modified. For example this morning my code broke because a new column was added to provide new functionality. ...
ServerMonkey's user avatar
3 votes
1 answer

CMS database schema design advice

I am designing a CMS, and would like to start with a simple database schema, with the requirements Two main types of entity,Post and Category For Post, it need to support multilingual and versioning ...
Yoga's user avatar
  • 325
1 vote
0 answers

How to deal with weekly schema updates on database production server? (ASPNet MVC and Entity Framework)

I'm working with scrum methodology. thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...
Daniel Santos's user avatar
1 vote
3 answers

SOLID principles and generating many objects from a file

The "D" in SOLID stands for dependency inversion. If I have for example, a Blacksmith class that depends on Hammer, I should create my Hammer externally and pass it to Blacksmith, rather than having ...
alexw's user avatar
  • 329
0 votes
2 answers

How to model a property with two different formats and ranges

I am designing a JSON based data schema to describe the visual appearance of blocks similar to HTML elements. It should feel familiar for somebody knowledgable in HTML/CSS but is more restrictive due ...
hielsnoppe's user avatar
15 votes
2 answers

Zero Downtime Deployment - Transitional Db Schema

Achieving Zero Downtime Deployment touched on the same issue but I need some advice on a strategy that I am considering. Context A web-based application with Apache/PHP for server-side processing and ...
user avatar
3 votes
2 answers

Where to put the Country Table?

It might sounds like a silly question but here is my problem. We have 100s of databases and in each of those databases, there is a country table. It was ok this way but we ran into minor problems at ...
Gudradain's user avatar
  • 444
4 votes
1 answer

How do I best query for user-owned data when using NoSQL

Say I have a typical website which provides authenticated users access to their stored ('owned') data. Authorised users must be able to perform CRUD operations on their data. If I were using a RDBMS-...
keithl8041's user avatar
2 votes
3 answers

Architecture: Should I schema validate incoming reply messages?

A web service I consume uses XSD to describe its API. Recently, they added a field to a reply message where no xsd:any had been, so when our schema validator tried to validate against the previous xsd,...
kojiro's user avatar
  • 2,105
0 votes
0 answers

Advice on paging tree structured data

I'm in the process of building web based a commenting system, for which the comments are rendered in a reddit / disqus style tree structure. The MySQL schema uses a string of ancestor id's, and the ...
gbro3n's user avatar
  • 481
1 vote
2 answers

SQL - for some attributes specific to different clients' users, how to handle schema?

I have clients, each of whom have an app with a bunch of users. Their user data could be pretty different, but there is also a lot of overlap. Ex: all their users have "gender" and "age" and plenty ...
tscizzle's user avatar
  • 313
3 votes
1 answer

How can I model this scenario in a graph database?

I'm developing an application where users can tag resources and it's also important to know who tagged the resource with a specific tag. A graph database seems like a good fit for this and the rest ...
Phil's user avatar
  • 39
0 votes
2 answers

DB Schema for a questionnaire - Different output from different combinations of responses

A user is required to complete a questionnaire - answering the questions in various categories. Depending on the responses from the user, the user will be presented with a number of recommendations. ...
Gravy's user avatar
  • 1,037
6 votes
2 answers

Best practice to include XSD in C# project

I have an XSD schema I need to include within my program, to validate some user input XML. The schema will need to be regularly updated. (By the programmer.) My current method to include this is hold ...
Chris's user avatar
  • 196
1 vote
1 answer

Laravel relationships and database schema

I am playing around with Laravel and came across something in the documentation for defining 1 to 1 relationships between tables that I would like to get feedback on. The example in the docs is ...
shauno's user avatar
  • 11
5 votes
1 answer

Designing a scalable schema for college database [closed]

I am trying to build back end for college ERP system. The system will be based on LAMP. These is the scenario: Colleges have 5 branches There are 4-6 classes in each branch. There are 80 students ...
geeksal's user avatar
  • 153
3 votes
3 answers

How to track temporal changes in a database?

Imagine a software for theater owners. You can accept reservations for the different cinema halls. Each hall has a different number of seats. Say the owner wants to know how many people visited the ...
LTR's user avatar
  • 227
3 votes
1 answer

Managing Database version controlled migrations using a list/table

I'm not much of an expert in the area but I am aware that solutions already exist to managing database migrations in version control, e.g. sqitch and liquibase. However I'm currently planning a small ...
Dave's user avatar
  • 133