Questions tagged [schema]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
51 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
2answers
133 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
1answer
54 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
2answers
448 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
2answers
73 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
1answer
177 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
8answers
709 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
1answer
96 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
1answer
227 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
2answers
170 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
1answer
80 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
1answer
265 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
1answer
47 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
5answers
354 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 ...
8
votes
5answers
5k 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 ...
3
votes
2answers
106 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
1answer
82 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 ...
2
votes
1answer
336 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
2answers
151 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
1answer
60 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, ...
6
votes
2answers
2k 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
5answers
918 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/...
61
votes
11answers
13k 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
1answer
74 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
1answer
4k 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
0answers
104 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
3answers
149 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
2answers
61 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 ...
14
votes
2answers
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
2answers
557 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
1answer
104 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
3answers
297 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
0answers
102 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
2answers
78 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
1answer
511 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
2answers
864 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. ...
4
votes
2answers
18k 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
1answer
1k 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 ...
4
votes
1answer
27k 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
3answers
833 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
1answer
246 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 ...
3
votes
1answer
586 views

Fixing bad data in a database - redo or incremental

I have pseudo-ownership of a fairly old db (original data from 30 years ago; current design is >15 years old). In my opinion, the schema is pretty broken, and one of the implications of this is that ...
2
votes
5answers
747 views

Using DDL commands in programming language [duplicate]

Hello I am a student with no industry experience. My question may sound dumb, but, me and my friends were having discussions on use of DDL directly in programming language (any language may be Java, ...
1
vote
1answer
190 views

is there anything called logical schema and the conceptual schema of a database table?

i want to know whether there is anything called logical schema and the conceptual schema of database table. if so what is it.i searched lot of places for this specific two words, but did not find ...
2
votes
1answer
2k views

MongoDB Embedded vs Reference Private info

I have searched extensively for a similar Mongo schema design and can't find relevant examples. I have a store (with public info), each store has an account (with private account info). // store ...
0
votes
2answers
92 views

Changing an int to be a string in PHP / MySQL Schema

Background I'm trying to decide the best way to manage a change in requirements. Currently when an admin is assigned to a ticket, the ticket header record is given an owner and the ownerID field is ...
0
votes
2answers
92 views

Managing unique data correctly in SQL

Here in Brazil we have a personal identifier called CPF. This identifier has a sequence of 11 digits and is unique for each Brazilian citizen. Possibly in other countries there is something like that ...
1
vote
1answer
577 views

Ticket/Raffle DB schema

I'm working on a project that, when all boiled down, is essentially a raffle. The twist is that due to the way we've set the ticket value, a user may be casting 10,000+ tickets. Essentially, a user ...
3
votes
1answer
70 views

versioning data schema in android internal storage

I am using Android's internal storage to hold data for my application and I am trying to find a good way to handle reading data of an older schema. For example, let's say I have serialized and written ...
3
votes
1answer
161 views

What's best for a client library: userland code or schema files?

I'm building a client library that consumes a collection of OpenStack API services. I know that as time goes on more services will be added - so I want to come up with a clean and neat way of ...