A schema of a database system is its structure described in a formal language supported by the database management system (DBMS) and refers to the organization of data to create a blueprint of how a database will be constructed (divided into database tables).

learn more… | top users | synonyms

0
votes
1answer
29 views

How can I automatically add a foreign key to a table on select which is stored in an associated other? [on hold]

I have a database with some tables among wich these 3 : organizations organization_id PK teams team_id PK team_organization_id FK users user_id PK teams_users tu_id PK ...
0
votes
1answer
44 views

Convert multiple databases into schemas SQL Server

Due to a high amount of databases being created on my project and the rising cost per databases I had the following question: Is there a way to convert multiple databases in SQL Server into one ...
0
votes
0answers
25 views

Schema Comparison [closed]

DBAs, I'm in the market for a schema comparison and synchronization tool. I've personally never purchased one and have started looking at the various tools. I'd like to know if anyone has a suite ...
-1
votes
0answers
21 views

Is schema always in 1st normal form?

So if schema is not in 1st NF, so does that mean I do not check for other greater forms? Also what is the example of schema which is not in 1st NF?
2
votes
2answers
28 views

Schema for storing historical data on shared identifiers

When user account is assigned an IP address, I create a table entry for the account/IP mapping. This data in the table is updated every 5 minutes. Right now I'm only keeping real-time data but I need ...
4
votes
2answers
36 views

How to enforce the structural constraints of rectangularly arrayed data?

(I'm particularly interested in answers that view the question below as a special case of the question: how should a RDBMS enforce structural constraints that are more specific than "one-to-many" and ...
1
vote
1answer
48 views

Does a Key-Value type table still needs a auto increment key?

Suppose that I have a very simple table to store variable-like data, like this: +-----------+-----------------+ | key | value | +-----------+-----------------+ | site_url | ...
0
votes
1answer
36 views

Schema for multi-account database

I'm building an app which will have accounts for organisations leading to organisation.myapp.com subdomains for their account access. I'm putting together the schema for it and I have a few ...
0
votes
1answer
33 views

modelling warehouse picking

What's the best way to approach modelling a warehouse picking system? To be precise, customers place orders which are processed by warehouse staff. A simple products and orders database isn't an ...
2
votes
0answers
38 views

Which is the better schema design for a voting system?

Imagine a q/a site or forum similar to stackoverflow. I'm trying to determine which of these two methods would be the better design for a voting system: (note: I would also like to keep record of all ...
1
vote
0answers
20 views

Can I include extra columns in a m->m mapping table? [duplicate]

I guess this is sort of an odd question, but consider this scenario. table classes (id_pk) table students (id_pk) table students_classes_map (students_id_fk_pk, classes_id_fk_pk, finalExamScore ...
1
vote
1answer
39 views

select query on unique column AND alternate column of “aliases”

I have a MySQL table (~10,000 rows) with a pk id (int) column and a name (varchar) column (as well as a few other unimportant columns for this question). The name column contains unique values that ...
1
vote
1answer
43 views

PostgreSQL: schema diff/patch tool

Consider the following setting: A production DB A dev db, on which schema changes are made to enable new features When the development of a new feature is complete, I have to manually update the ...
1
vote
2answers
47 views

Why WordPress use a column prefix? [closed]

I'm trying to learn some basic database design through open source projects. And look into the WordPress database schema, the posts table for example, you'll find something like this post_author ...
1
vote
1answer
19 views

How to put this particular constraint on this link table in MySQL? [duplicate]

I have the following three tables in MySQL: Store, Groups, StoreGroup. A store can belong to several groups. StoreGroup is the link table that records the groups a store belongs to. The Groups table ...
5
votes
2answers
86 views

Creating a table with many optional fields

I am a developer (student) looking for some advice on what best approach should I follow while creating a table to model an entity that has a number of optional fields. There exists a need to model ...
1
vote
2answers
24 views

What's the best design for a logical structure that contains different properties of various types for different entity categories? (MySQL or NoSQL)

I'm designing a MySQL database that needs to contain a list of products. Those products, based on their category, will need to have a list of various properties. Let's say all products in category ...
0
votes
2answers
64 views

How to count all relationships in a database?

I am developing a web application, which stores data in a Microsoft SQL Server database. My project manager has to deliver a report to non-tecnhical higher-ups, and thinks that it will read impressive ...
1
vote
1answer
41 views

Schema design - Reference slightly different data in different tables

I'm trying to design a schema for a MySQL database and got stuck on the following. My database stores documents which should have relations with blocks of content. create table document ( `id` ...
0
votes
1answer
28 views

Trigger on a Schema

Is it possible to create a Trigger on a Schema? I have to audit the changes on my tables. But I have a lot of tables and I don't one to create a trigger on them one by one. --Database level trigger. ...
0
votes
2answers
64 views

How to change schema so that account_id reference is unique among 3 tables

Original image: Updated to have more-correct terminology and an 'is_debit' column: I am designing a (PostgreSQL) schema for a lottery website that uses double-entry accounting. 'jackpots', ...
0
votes
0answers
15 views

Export sql server table connections schema

i am using RazorSQL to connect to a Microsoft SQL Server database. I am looking for a way to visualize the tables connections schema. Do you have any idea how I can export such a view?
0
votes
0answers
32 views

Cassandra: unstructured document storage?

I'm fairly new to NoSQL, but fairly experienced with SQL-based relational databases. We are evaluating Cassandra for one of our applications. I've seen where Cassandra is claimed to be able to store ...
0
votes
0answers
7 views

Managing schema migrations in Mondrian

Managing schema changes across dev, stg, prd is something we do well in our home-grown solution today. Specifically, at least one downstream team consumes our star schema. They're considering ...
0
votes
1answer
47 views

Postgres 9.3 changes the standard_conforming_strings value

I'm migrating a legacy application's database from Postgres 8.1 to Postgres 9.3 In order to avoid compatibility issues, I'd like to keep the standard_conforming_strings parameter to it's default ...
0
votes
0answers
60 views

How to share Users table between Clients and Customers?

I have a rental system where the system admin can add clients and their users. Each client's user can manage products, categories, orders etc., as well as their own customers. However, while ...
0
votes
3answers
45 views

What is the EXPORT privilege on ORACLE

I have created a user say A. I want to export some of my schemas using A user. For example, I have B and C users. I want to export B schemas using A user. Which grant do I have to use? I am using ...
0
votes
2answers
28 views

Design for table with multiple links to other table

I am designing a database to keep track of our network equipment. My db has 2 tables: sites & circuits (circuit = cable) & (site = property location) Each circuit runs between two sites, so ...
1
vote
0answers
23 views

To implement a facade DB table or not? [pics]

Does it make sense to normalize a schema with tables that only serve the purpose of logically separating parts of a system? Below are 2 example schema with what I am talking about. (sorry about the ...
1
vote
1answer
60 views

Data modeling with many attributes where few apply to each record [closed]

I'm pretty new to data modeling, so please excuse me if I've missed something obvious. I'm trying to decide on a schema (or possibly a DBMS) to work with some data where there are quite a few possible ...
0
votes
2answers
58 views

Transfer all tables from a schema to other schema

I have two schema. Schema1 and Schema2 How would I transfer all the tables from schema1 to schema2?
-1
votes
2answers
24 views

query multiple unrelated tables

Just learning mysql and db so guess this is a general schema design question. Say i have 10 different types of widgets and each widget transaction has a date, amount and 8 other unique columns to that ...
2
votes
2answers
47 views

Is there a good way to select a row where the key represents the lower bound of a range?

I am designing some tables and a number of the tables have as the key a lower and upper bound which never overlap. I want to query by a value that can fall withing any of those ranges. If I keep both ...
2
votes
1answer
67 views

SQL Server many-to-many relationship, row reuse?

Below is your typical many-to-many relationship. Pretend there are 2 tasks that have the exact same Tags. because of foreign key/primary key relationship constraints, there is no way for the rows in ...
0
votes
1answer
92 views

Duplicate Relationships in Rails/MySQL Healthcare Application

Overview of the Application I am building a Ruby on Rails application to organize medications, using MySQL. The goal of this application is to provide dosage specific treatment recommendations, and ...
1
vote
1answer
39 views

What will GRANT <privilege> ON ALL TABLES IN SCHEMA <scheme> TO <role> do?

It seems obvious that PostgreSQL will GRANT some privileges ON ALL TABLES IN some schema TO some role when I'll command. But, will it make it permanent for the schema that on all tables within it, ...
1
vote
0answers
93 views

How do you think in NoSQL? [closed]

I'm from the pre-nosql era and am rather comfortable with SQL. However, I cringe whenever someone suggests using a NoSQL database for the "upcoming" project. There are some major problems that I'm ...
0
votes
1answer
61 views

Database design Problem for the web-app

Hello I am in a problem of designing a web-app database schema. Suppose I have 10 shops and every shop gives deals on every different day Sunday, Monday and so on and for limited time period like ...
2
votes
1answer
61 views

Review database schema / thought process

Please review my thoughts below. It is written in an authoritative style because it is the most succinct, not because I am competent. Please poke as many holes as possible. I am trying to create a ...
0
votes
1answer
59 views

Need some expert eyes to look at my schema

I am trying to make an online site for local movies. Will be written in PHP and will be using MySQL as the database. What I want is to create a mini IMDB type site, with movies, people(casts/crew), ...
1
vote
0answers
140 views

Neo4j vs mongodb [closed]

I want to store data of parents,teachers,students,subjects and the respective marks. All these entities are highly interlinked. Different schools have different type of data and each student will have ...
2
votes
0answers
93 views

Database Design - Multiple Dbs or Single - Security & Data

I've hit a brick wall with this and just cannot make a decision so want to throw this out there and see if there are any issues I have'n't considered. Basic Topography I have a system that currently ...
0
votes
1answer
98 views

Split MySql table into two tables with One to many Relationship

I have an old database table in MySql. It is used to store the orders from online ecommerce. Simplified diagram looks like this: +----+------+-----------------------+-------+--------------+ | id | ...
0
votes
1answer
42 views

Unable to check is schema is present first

I've created a SQL script that will release a process to numerous SQL Server instances so I want to check if a paticular schema is present before creating the schema. I'm using the below and it ...
2
votes
0answers
37 views

Proper design of routes in Database MySQL

I'am trying to find out the best database design and try to stick with data integrity by using Foreign Keys. But I'm stuck right at the beginning because of limit relations between tables with FK to ...
2
votes
1answer
231 views

Database deployment script for SQL Server 2008 has different behaviors

Using Visual Studio 2008, I have compared schemas between remote SQL Server database with scripts hosted in a TFS server. The goal was to generate a migration script that would update the remote ...
1
vote
1answer
224 views

Script not allowed to create schema objects when generating tables despite db_owner role

I am looking to make a "schema only" (no data) copy of a database on my local server. I used Tasks -> Generate scripts to script the tables from my existing database and then after creating the new ...
0
votes
1answer
62 views

date dimension OLAP cube design

I have a sales reporting system with incoming data like this date,editionID,outletId,Measure1,Measure2 2013-01-01,2,532,11,24 etc... I am new to designing data cubes (for the pentaho BI suite) and ...
0
votes
1answer
37 views

Create menu from multiple meals relationship

I have the following relations: Meals(meal_id, name, cuisine, ingredient) Users(user_id, name, username, password, email) Chefs(chef_id, name, username, password, email) I want to create the ...
0
votes
1answer
103 views

Airport Database Design guidance required

I am trying to make a generic database for airport management and DBMS would be oracle 11g xe. Since, i am amateur and still learning so i have tried to kept the problem statement simple with limited ...