Questions tagged [database-schema]

A description of the structure of the database - including the structure of the tables, columns, constraints, views, etc, etc... that make up the database.Normally defined in the text, generally SQL in an RDBMS, the schema describes the complete blueprint for the database, defining everything about the database except that data itself.

2931 questions
9
votes
1 answer

Mongoose behavior and schema

I am learning nodejs along with mongodb currently, and there are two things that confuse me abit. (1), When a new Schema and model name are used (not in db), the name is changed into its plural form. Example: mongoose.model('person',…
MikeNQ
  • 653
  • 2
  • 15
  • 29
9
votes
2 answers

How to support Multi-Languages approach in DataBase Schema?

I want my database to support multi Languages for all text values in its tables. So what is the best approach to do that?. Edit1:: E.G. I've this "Person" table: ID int FirstName nvarchar(20) LastName nvarchar(20) Notes …
9
votes
2 answers

create db2 schema using jdbc

What is the correct syntax or what are the correct steps for creating a schema in DB2 using JDBC? When running create schema test1 or create schema test1 authorization db2admin as db2admin, I consistently get DB2 SQL Error: SQLCODE=-552,…
Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137
9
votes
2 answers

How to create interdependent schemas in Mongoose?

I have two Schemas and I want them to interact with eachother. For instance: // calendar.js var mongoose = require('mongoose'); var Scema = mongoose.Schema; var Day = mongoose.model('Day'); var CalendarSchema = new Schema({ name: { type: String,…
Robert Martin
  • 16,759
  • 15
  • 61
  • 87
9
votes
1 answer

using schemas in postgresql

I have developed an application using postgresql and it works well. Now I need to create several instances of the same application but I have only one database. So I am thinking about using schemas, so that I can group each instance tables in a…
Ottavio Campana
  • 4,088
  • 5
  • 31
  • 58
9
votes
1 answer

What is the Cassandra database schema used in Reddit?

Reddit is currently migrating its database from PosgreSQL to Apache Cassandra. Does anybody know what database schema does Reddit use in Cassandra?
Calin-Andrei Burloiu
  • 1,481
  • 2
  • 13
  • 25
8
votes
5 answers

Retrieve Database Schema

I want to know, how can I retrieve Sql-Database schema informations such as Tables, Columns and Their relation between Tables and etc. I know it's possible if I execute different particular queries on Master Database and the targeted Database. But…
Saber Amani
  • 6,409
  • 12
  • 53
  • 88
8
votes
1 answer

Creating a model in nodejs without an ORM or ODM

I am surprised why this is so hard to find. I am trying to convert my monolith to a 3 layer architecture for my node express app with a propriety sql. Repository BEFORE architecture change 1 file entry.js 1 endpoint with business logic Functions…
codesim
  • 111
  • 7
8
votes
1 answer

What is a good-practice of a schema for a site that accepts logins from multiple sites (e.g. facebook connect, google, flickr, etc..)?

I asked this question at http://dba.stackexchange.com, but it was closed with a note that I should ask it here as it relates to design and not administration. I'm building a site ("The Site") and I'm considering how to design the DB schema for it. I…
Doron
  • 3,176
  • 7
  • 35
  • 60
8
votes
4 answers

How to get columns Primary key constraints using SqlConnection.GetSchema()

I have some code of ADO.NET to dynamically detect the database schema, what I need is how to get unique columns constraints and Primary key constraints using the GetSchema method on SqlConnection. This is the code that I have: conn.Open(); …
shamim
  • 6,640
  • 20
  • 85
  • 151
8
votes
2 answers

choose the mongoose schema on group chat application?

i am going to design a group chat application based on mongodb, there are two schema design choices, one is designed as one document for one group chat message, another is designed as one document for all group messages. In the first option, it can…
user824624
  • 7,077
  • 27
  • 106
  • 183
8
votes
1 answer

Express: The requested module does not provide an export named 'User'

I am using Nodemon and ESM module to use ES6 syntax on a Express + Mongoose project. I am getting this error when compiling: SyntaxError: The requested module 'file:///.../models/User.js' does not provide an export named 'User' My model file…
Maramal
  • 3,145
  • 9
  • 46
  • 90
8
votes
1 answer

reflecting every schema from postgres DB using SQLAlchemy

I have an existing database that has two schemas, named schools and students, contained in an instance of declarative_base and through two different classes that inherit from that instance class DirectorioEstablecimiento(Base): __table_args__ =…
bluesmonk
  • 1,237
  • 13
  • 31
8
votes
3 answers

Storing books in a database

I want to create a system that stores books (and some other documents). Users will be able to log into the system where they can either see a list of all books or enter some search string and get a list of the books containing the search string. My…
Mannsi
  • 111
  • 1
  • 5
8
votes
3 answers

SQL Azure schema upgrade strategy

i'm currently working on a asp.mvc application with entity framework as db backend which will be running on ms azure platform. on my development machine i'm running a sqlexpress instance which hosts my development database (like i said may app…
Matthias
  • 363
  • 3
  • 18