Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [schema]

The tag has no usage guidance.

-1
votes
0answers
26 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
0answers
13 views

Design of a schema parser in order to validate files according to that schema?

I am trying to parse files written in the EXPRESS data modeling language. These files are used to define data structures of files used for the exchange of product manufacturing data. In my case, this ...
0
votes
2answers
124 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 ...
3
votes
5answers
573 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 ...
2
votes
1answer
63 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
69 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
212 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
0answers
328 views

Database schema change tracking

We are currently using MySQL for our Back-end and what we do to track database changes on development that will eventually be applied to our production environment is done manually. By manual I mean ...
0
votes
2answers
121 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
51 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, ...
4
votes
2answers
802 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
682 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/...
59
votes
11answers
11k 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
64 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. ...
2
votes
1answer
2k 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
89 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 ...
0
votes
0answers
77 views

Schema design (SQL) for incorporating an alerts system tied to users

I've been working on an app to hone my skills while building something that will be useful to me. It's being built using Ruby on Rails, but this question is mostly language agnostic. I'm currently ...
1
vote
3answers
144 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
57 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 ...
13
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 ...
3
votes
2answers
228 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
96 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
259 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
82 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
73 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
377 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
715 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
13k 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
932 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 ...
3
votes
1answer
19k 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
695 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
203 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
447 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
588 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
167 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
91 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
90 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
454 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
65 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
157 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 ...
6
votes
4answers
979 views

How to handle unexpected schema changes to production database

Is it a common or normal practice to encounter schema changes, especially renamed or removed columns, in a production database, without having been notified of the change? If unexpected schema ...
0
votes
0answers
247 views

Schemaless NoSQL RESTful design?

In a recent project; I used MongoDB with MongoEngine (an ORM/ODM for Python). This allowed me to specify schema in a central "Model". My new project I am hosting on Windows Azure; and there is no ...
1
vote
1answer
227 views

Database Schema Data Independence [closed]

I'm currently reading about database schemas about how the three-level ANSI-SPARC architecture works and i'm a bit confused about a concept it's talking about. My question is what would happen if an ...
2
votes
1answer
794 views

Using a single table for identity and metadata

I'm in the early design phase of a project to provide an e-commerce platform that will require several entities to be modelled, products, customers, orders, CMS pages, etc. They will all have a few ...
0
votes
0answers
196 views

DRY on API specifcations?

When developing a new RESTful application, I generally: Define tests Define routes [ e.g.: RESTful CRUD; namespaced on /api/users ] Define models [ e.g.: "Users" ] Define forms [ e.g.: in ...
4
votes
3answers
2k views

Tracking correct order details in commerce database when modifying 'products'

I am implementing an ecommerce database. This is slightly different than most as the 'products' that are for sale are for services provided. For example a user (vendor) of the system may define a ...
2
votes
1answer
8k views

Practical mysql schema advice for eCommerce store - Products & Attributes

I am currently planning my first eCommerce application (mySQL & Laravel Framework). I have various products, which all have different attributes. Describing products very simply, Some will have a ...
1
vote
1answer
2k views

Working with Multiple XML Schema Classes in C#

I'm working with a data import process in C#, which takes a zip file filled with XML files and saves specific data points into a database. This is accomplished by loading the XML data into classes ...
10
votes
2answers
8k views

Database Schema for Pricing Products (packages, promotions, qty based, limited time offer…)

I'm working on a new point of sale for a company that products for different prices depending on the product mix. All products have a base price. To explain my problem, I will use the following info:...