Questions tagged [schema]
The schema tag has no usage guidance.
88
questions
-2
votes
0
answers
61
views
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), ...
1
vote
3
answers
130
views
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 ...
1
vote
1
answer
57
views
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 ...
0
votes
0
answers
65
views
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 ...
0
votes
1
answer
326
views
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-...
-2
votes
2
answers
183
views
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 ...
-4
votes
1
answer
42
views
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?
0
votes
2
answers
70
views
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 ...
0
votes
1
answer
84
views
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 ...
0
votes
1
answer
55
views
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 ...
1
vote
2
answers
155
views
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 ...
-2
votes
1
answer
437
views
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 ...
1
vote
2
answers
3k
views
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 ...
1
vote
2
answers
95
views
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 ...
3
votes
1
answer
485
views
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 ...
1
vote
8
answers
882
views
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 ...
0
votes
1
answer
179
views
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 ...
-2
votes
1
answer
360
views
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 ...
1
vote
2
answers
818
views
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 (...
1
vote
1
answer
200
views
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 ...
0
votes
1
answer
436
views
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 ...
0
votes
1
answer
50
views
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 ...
0
votes
5
answers
923
views
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 ...
9
votes
5
answers
9k
views
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 ...
4
votes
2
answers
323
views
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:...
1
vote
1
answer
88
views
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 ...
3
votes
1
answer
504
views
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 ...
0
votes
2
answers
318
views
"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: ...
0
votes
1
answer
68
views
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, ...
7
votes
2
answers
4k
views
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 ...
1
vote
5
answers
1k
views
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": "http://json-schema.org/draft-04/...
62
votes
11
answers
15k
views
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 ...
0
votes
1
answer
79
views
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. ...
3
votes
1
answer
5k
views
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
...
1
vote
0
answers
108
views
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 ...
1
vote
3
answers
153
views
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 ...
0
votes
2
answers
63
views
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 ...
15
votes
2
answers
3k
views
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 ...
3
votes
2
answers
928
views
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 ...
4
votes
1
answer
139
views
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-...
2
votes
3
answers
323
views
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,...
0
votes
0
answers
108
views
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 ...
1
vote
2
answers
82
views
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 ...
3
votes
1
answer
616
views
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 ...
0
votes
2
answers
899
views
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.
...
6
votes
2
answers
20k
views
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 ...
1
vote
1
answer
2k
views
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 ...
5
votes
1
answer
32k
views
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 ...
3
votes
3
answers
888
views
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 ...
3
votes
1
answer
320
views
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 ...