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
16 views

SET sql_log_bin = 0 in RDS MYSQL 5.6

I have moved into RDS MYSQL 5.6. Now, I have a problem. I have 5 read replicas and a/z master. I am trying to perform an ALTER TABLE and want to change a column value and also on some tables I want ...
0
votes
1answer
29 views

Unexpected SELECT permissions

My user WebApp seems to have SELECT permissions on every table in every schema and I can't figure out why. WebApp is only in the Public role. Public doesn't own any schema. Explicit permissions ...
3
votes
0answers
46 views

Efficiently storing sets of key-value pairs with wildly different keys

I inherited an application that associates many different types of activities with a site. There are roughly 100 different activity types, and each one has differing set of 3-10 fields. However, all ...
2
votes
1answer
35 views

ERROR: no schema has been selected to create in

I am working on an amazon RDS postgresql database where I know there had been some issue with the public schema (maybe it was dropped). But apparently the schema exists, and anyway the problem is not ...
0
votes
1answer
21 views

Do i need “CHECK CONSTRAINT” when i am using “WITH CHECK ADD CONSTRAINT”

I am working on SQL Server 2008 R2, where I generated a schema-only database script using SQL Server Management Studio. The generated script is as follows: ALTER TABLE [dbo].[ConsoleServer] WITH ...
6
votes
1answer
66 views

SSDT Schema Compare fails when comparing my DB Project to my Azure Server

I have a SQL Database project that I have built our enterprise DB on. It has deployed several times on internal and AWS hosted SQL servers using SSDT's Schema Compare tool. The problem when I post ...
2
votes
1answer
40 views

Database Table Design

I would like to ask couple of questions regarding my schema table design. I have the following data coming from an external database where I do not have any control over it. PROD_NO PROD_NAME ...
2
votes
2answers
922 views

Designing database with Category and Tags for Posts - Seeking for guidance/advice

I'm not really a database novice but I'm not an expert either. Problem: I'm having this difficulty on designing my Post, Category and Tags relationship. I've read Normalization many times but could ...
3
votes
1answer
59 views

Design for scientific data. Data table with hundreds of columns or data table with a generic value column and hundreds of rows (EAV)?

I am trying to improve the data storage in biomedical science lab where I recently started working. The existing workflow is atrocious, involving many differently formatted Excel sheets that all get ...
7
votes
1answer
100 views

Purpose of owning a schema in SQL Server

I've been spending the last few days cleaning up database permissions, grouping them all into AD groups and removing orphaned users. This has lead me to a recurring scenario: Find a user that owns ...
1
vote
1answer
181 views

Relation between multiple hierarchical taxonomies linked to a single entity

I am working on an online test application which supports multiple choice questions. I have created schema for taxonomy (classification) system to be used with questions. taxonomy(id, name, slug, ...
1
vote
1answer
31 views

SQL Server 2008 R2 copy Schema with all user security permissions

I have a prod support request from a high value user to adjust the settings on a company-wide dashboard so that he can manage a section of his workflow currently being excluded from these reports. ...
5
votes
2answers
3k views

Query across multiple schemas, unknown until execution time

I have multiple schemas that I need to query across. The schemas are not known in advance, for example: U111 U222 U333 I need to select across these three schemas from a specific table in each of ...
0
votes
1answer
192 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 ...
0
votes
1answer
34 views

Apply operation on all schemas

I have an Oracle instance, with several schemas (all starting with the same prefix). PATT_A PATT_B PATT_C ... All of them have the same table, and I'd like to update all of them in one shot (with ...
1
vote
0answers
40 views

SQL Server vs Oracle [closed]

I am transitioning from SQL Server DBA to Oracle DBA. I have minimal experience with Oracle, and I have found that the best way for me to traverse if by correlating terminology and database engine ...
3
votes
1answer
719 views

How to normalize my db schema for a quiz application?

I am putting together a quiz application. (I'm calling each quiz a "challenge") I have a "challenge" table and a "challenge_question" table which is pretty straightforward. challenge table: id ...
1
vote
1answer
47 views

Understanding of schema and tablespaces - recommendation for a later seperation [closed]

DLDR: I would like to get a confirmation of my understanding of tablespaces and schemas (see image) a recommendation how to organize schemas and tablespace to make a later separation easy. ...
1
vote
1answer
690 views

MySQL DB structure with Main category and several nested sub categories

I am looking to create a set of fields on my webpage identical to what eBay uses on their category selection page when you are selling something. For my purposes I am doing motorcycles, power sports, ...
0
votes
0answers
7 views

Setting up a many (messages) to one (user/group) polymorphic relationship in SQLAlchemy [migrated]

So far I have set up the following: class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True) sent_messages = relationship("Message", backref="sender") ...
0
votes
2answers
130 views

Schema for lists of relationship differences

Say there is a data model that allows for relationships to be defined either explicitly or as a list of records added or removed relative to some existing item: Item <–> *Properties and Item ...
2
votes
2answers
214 views

Is there a best practice for recurring calendar events

I'm not a dba but a php programmer, so that I'm not an SQL pro. Now, I have searched in both programmers and dba stackexchange sites but the answers are too specific or not conclusive. My question is ...
8
votes
1answer
477 views

Designing Simple Schema for Disaggregation of Demand Forecast

I am doing a simple database design task as a training exercise where I have to come up with a basic schema design for the following case: I have a parent-child hierarchy of products (example, Raw ...
0
votes
1answer
50 views

Divide a PostgreSQL database into schemas

My Postgres database will be focused on multidisciplinary organizations. The project axis is: a person could belongs to diverses disciplines (ex: arts, sports) for the same organization, and this ...
2
votes
3answers
51 views

What schema for different relation from two tables to another?

There are three tables instructors, meeting_points and bookings. Here are the relation I want: 1 instructor has 0, 1 or n meeting_points 1 booking has 1 meeting_point 1 meeting_point can be linked ...
1
vote
0answers
14 views

Alter schema of Access 2013 database with linked table

I'm trying to change the schema of an Access 2013 table. I want to lengthen some of the text fields. When I change the schema and try to save I get dialog with Operation is not supported for this type ...
0
votes
1answer
107 views

In regards to GS1 barcode - what size DB field are used?

In regards to GS1 barcode - what size DB field is used or is the entire GS1 typically not stored in database, but rather processed in the application layer and stored in the database as a collection ...
9
votes
4answers
9k views

Is there a tool to check if my database is normalized to the third normal form?

I learned about normalization recently, and understand how important it is when implementing a new schema. How can I check if my database is 2NF or 3NF compliant ? Manual review is a sure option, ...
0
votes
1answer
246 views

Data Sync between servers with different schema in SQL Server [closed]

I have two servers 2008 R2 and 2005. The e-commerce site has been running with 2005 Server. I have migrated 2005 server data with modified data schema to 2008 R2 from yesterday's date of data. My ...
2
votes
2answers
1k views

Compare two MySQL dump files

I am trying to compare two MySQL dump files. One was made from a fresh install of a web application and the other is a dump from the same web application that has been upgraded from a previous version ...
1
vote
1answer
39 views

Database templates [duplicate]

Are there any site with database templates for specific purposes? (i.e. a database schema for users and authentication in a webpage) for different databases like Oracle, MySQL... I have been looking ...
0
votes
1answer
227 views

Pros and cons of using many schemas in PostgreSQL as opposed to just one?

For a large SAAS application (backed by PostgreSql 9.4), with over 300,000 accounts (and growing), what are the pros and cons of using a schema per account to partition the data vs putting all the ...
0
votes
2answers
2k views

Oracle schema import is not importing all the tables present in the schema dump file

I have exported an existing oracle schema from another machine and then imported it in my local machine. Import was successful, but some tables which are present in the export dump file are not ...
0
votes
2answers
161 views

PostgreSQL : dependencies on a schema

I need to delete a schema in my PostgreSQL database. I would like to make sure that the schema is not used in another schema (for instance : this schema is used for a view in another one). Is there a ...
1
vote
2answers
199 views

How can I integrate a new system to a design scheme I previously created?

This is a follow-up to a question I wrote a while ago, for reference, you can look it up here. I've developed a curriculum based database scheme that looks like this(Thanks Joel Brown) Now that a ...
2
votes
1answer
311 views

Best embed/reference/field strategy for many inserts (mongo)

I'm building a gaming backend with Mongo, and have some issues on how to best design the schema to maximize performance and database size. My models: User Match -ReferenceMany (User) ...
0
votes
1answer
1k views

What's a good way to model user authorization to hierarchical data?

I'm wanting to implement something that's basically an ACL in SQL Server (2008, we'll be moving to 2012). We're working with farm production information. We will have users who need to be authorized ...
0
votes
0answers
40 views

DB schema for an invoice system with tiered prices

I've been hired by a payment gateway company that handles payments for its customers. Every month, a script is run and will charge each merchant for the bulk number of payments completed. The unit ...
1
vote
2answers
162 views

MySQL JOIN two tables and get latest result

I want to JOIN two tables and get the latest result from each one of those two in a single table. I'm kind of concerned about speed too since tables are growing kinda fast. Close to 60-70k records a ...
0
votes
0answers
23 views

pt-online-schema-change with statement based replication in MYSQL

Is it possible/safe to use pt-online-schema-change in a Master slave environment where as the way replication is setup is statement based(SBR). What is the better way of doing it as currently I have ...
0
votes
0answers
52 views

Referral table structure

I need to make a simple referral system and I have a database table set out as follows: mem_id | date | refer_email | accepted And the meaning of such columns is the following: mem_id: The ...
-1
votes
0answers
37 views

Get available first booking date in my system

I am creating an application which connects users with workers. Users are those who have some requests to be done and Workers are those who works for the users and get paid based on the working time. ...
0
votes
0answers
10 views

Query table with the same name on different schemas in PostgreSQL [duplicate]

I want to query table with the same name (for instances "walls") in multiple schemas on a PostgreSQL database. Is it possible? I am searching for something like this: select * from *.walls; I need ...
0
votes
1answer
46 views

Database design: handling time

I am developing a weekly timetable which ideally would allow teachers pick what subjects they teach. While most of this is fairly straightforward, from a conceptual point of view I am unsure how to ...
3
votes
0answers
29 views

Possible SQLite bug?

I am running into an issue with SQLite that I think might be a bug. When I run the PRAGMA table_info command on a view that uses an aggregate function, the data type always comes up empty. To ...
0
votes
1answer
46 views

Best Approach to Migrating Oracle to MySQL - Run on EC2 in AWS

I'm trying to migrate an Oracle schema as well as all of the data within the DB to a MySQL database. I want to then make an EC2 app on AWS to kick off whatever I've written for this. Are there any ...
0
votes
0answers
12 views

When to use tags vs binary fields in a constituent management system?

I have a table of Constituents and I want to track yes or no qualities like: are they a teacher? are they an elected official? are they philanthropists? There will be less than a dozen of these ...
0
votes
1answer
41 views

PizzaShop - DB - Normalized Schema

I am trying to make a simple DB in Access for a theoretical pizza shop(the db is for an assignment). What I am trying to do is link one type of pizza to one or more types of toppings. I just wanted a ...
0
votes
1answer
24 views

Generate Schema Only Script from SQL Server 2012 to SQL Server 2008R2

Hi this is the first time that I've encounter this error in generating script for my database, what do you think causes this error? Thanks. Please see image.
0
votes
0answers
40 views

SQL Server 2008 R2 Error Msg 15063 and Msg 15410

I just execute a Schema Script from my SQL Server 2012 Database to SQL Server 2008 R2. I'm using same SQLAdmin account for this two Server. But when I execute the Schema Script I receive an error ...