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
2answers
97 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 ...
1
vote
0answers
52 views

MySQL Workbench Forward Engineer from only the current diagram

I want to create a test database from a huge schema in MySQL, but when I try to do Forward Engineer from a Diagram with about 6 tables, it try to create all the tables, views and routines groups that ...
1
vote
0answers
308 views

MySQL Space efficient way of storing indexed key-value pairs associated with table

We're storing transactions in an accounting system using two tables, one contains the general description of the particular transaction (the other contains the entries, one for each account - which ...
1
vote
1answer
134 views

Scheme review/Normalization level/query optimization

So I have a relatively complex database I'm designing - basically full in-house accounting setup. In one section I have some concern that I'm over-normalizing; the 'directory' - I'll example the ...
3
votes
2answers
53 views

Best design for a many:many relationship issue

We have three types of entity, each with their own table: table:A(a_id), table:B(b_id), table:C(c_id) Each of these entities can have any number of email addresses and linked Twitter accounts. ...
0
votes
0answers
45 views

Schema & Database Role Permissions Issue

I have a Schema and a Database Role. An Active Directory member is added to the Database Role. I grant the Role Select permission on the Schema. Control permission is denied on this Schema. However, ...
0
votes
0answers
13 views

Reducing schema to shrink real-world data to a functional subset

I work with two editions of a shipping product; call them "A" and "B". Both use similar a database schema, but edition "B" has a strict super-set of the schema (and features) used for edition "A". ...
0
votes
1answer
115 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, ...
0
votes
1answer
195 views

Automatically generate ALTER TABLE to syncronize schema on PostgreSQL

i Have 2 different database schema in PostgreSQL sql file from pg_dump, is there automated way to generate alter table commands so it would be in sync, without inspecting one by one? this is the ...
0
votes
1answer
143 views

Do I need to explicitly grant permissions for a login under the sysadmin role for it to access a custom schema?

So I have a login that has sysadmin rights on the db server. However, it's not able to access database objects under a custom schema that was created (eg. it cannot select from tables with ...
1
vote
1answer
238 views

Should I save “document ID” as a String or Number in MongoDB

So I'm importing about a 100,000 documents into mondoDB. MongoDB already generates an Object hash but the data has a documentID that was used to identify records in the previous database. The IDs ...
0
votes
1answer
259 views

Shopping cart schema with multiple product tables

I have a shopping cart table used to store customer id and product id of their chosen items. However I have multiple product tables, for example cars, books, houses. I started out with one table but ...
1
vote
1answer
73 views

Multi tenancy by schema - Deny access to another tenants [closed]

In a multi tenant environment, where the multiple tenants are in the same database and a schema is used to separate each one of them, how can I create a database user (MS SQL SERVER) for each schema, ...
0
votes
0answers
44 views

Should I be worried about duplicate entries in the Oracle all_dependencies table?

I think there are some problems with object relational functionality in Oracle 11g (and some earlier versions). We have a purely relational mapping ready as it is easier to handle, but need to support ...
1
vote
0answers
71 views

Schema for yearly data models

I am developing a school management system. Most data will not be reused after the end of the school year. I am contemplating using schemas to separate data in various school years, however I am ...
2
votes
3answers
283 views

Database design for bookmark system

I am creating a bookmark system where people can save their bookmarks. Each user has its own personal page with bookmarks. A bookmark should have atleast one tag and max five. Each user can create ...
5
votes
2answers
648 views

Is it bad idea to create foreign keys on the tables in a different schemas in the same database for big applications?

I am working on the transfer a big pl/sql web-based application to the dedicated server. This application is located in one schema with 70 packages of programm code. This application was made ...
0
votes
2answers
65 views

Store extra, optional information about any entity [closed]

I've done a bit of reading but haven't found anything related. This must be widely discussed, so it's most likely my fault. I've got a relational database with a number of different tables, each ...
1
vote
1answer
233 views

Polymorphic Association - is it bad? [duplicate]

In the following schema: Collections Upvotes Reports Upvotes Reviews Upvotes I'm tempted to have a single Upvotes table with a single "entityId" column that stores either the ...
4
votes
1answer
568 views

How to migrate between schemas in bulk in SQL Server?

We currently have multiple databases but would like to combine them and, instead, separate our domain contexts using schemas. In MS SQL Server 2008 R2, how can I relocate all the contents of one ...
0
votes
2answers
100 views

Accept null value on parent column in multipart relationship

EDIT: I've come up with one poor solution (below) that requires some denormalization, but does avoid the risks of UDFs in CHECK constraints. I would appreciate your help if you have a better answer. ...
2
votes
1answer
111 views

To normalize or not to normalizde? (10 fields)

I'm helping someone to design a database and for a specific case I'm not sure. I have 10 fields - this will never change - that will always be filled and used in every query that could be coming up. ...
1
vote
2answers
302 views

How to create a blank version of a PostgreSQL database

I've been using pgAdmin to create a database and test it. I'm at a point now where I need to install this db on different servers. I've been using pg_dump to do this and I've been able to muddle my ...
1
vote
2answers
166 views

Postgres sequence usage

I have an Postgres database with two users: dev and junit. Junit and dev objects are dropped and created regularly. They both have the same objects unshared for tables, however, sequences are shared, ...
1
vote
1answer
238 views

How To Hide Schema from user

I have DB with 2 schemas: A and B. B schema's procedures use A schema's procedures. I need to create user, which will not be able to see A schema. This user can use only B schema, but i want to let ...
1
vote
0answers
82 views

Cloning Postgres schema/tables across multiple servers

I'm working on a project that has databases across multiple servers, with one server for each business client. The project has some identical 'base' tables that are present in all the databases (for ...
0
votes
1answer
307 views

How to transfer the ownership of the dbo schema in SQL Server 2012

I've accidentally given a user the ownership of the db_owner schema (using the check box in the UI as below) and now I cannot: Transfer ownership to another user Drop the user from DB (though I can ...
0
votes
0answers
101 views

Save output of MYSQL Schema Inspector

MySQL Workbench 6 has a Schema Inspector that shows all the tables in a DB and useful statistics such as number of rows and average row lengths. How can I get that in a form that I can email someone ...
1
vote
2answers
197 views

Oracle - Is it possible to maintain transaction across multiple schemas?

I got this database in oracle which includes 4 schemas. Each schema represents a logical layer. Each transaction (Stored Procedure) in the upper layer breaks into a couple of transactions in the lower ...
1
vote
1answer
139 views

Should I extract / normalize the mailing address despite requirements limiting number / type of addresses?

I currently am working on a contacts application (similar to Outlook contacts combined with eVites and LinkedIn). The requirements for the application are to limit the addresses (and phone / email ...
0
votes
0answers
17 views

Services in a Catalog with Year/Week/Day period

I want to create a database structure for the Services in a Catalog with Offres for one or more services. Each Offre is available for one Year period ( example : 01 Janvier – 31 Mai ) , for a Week ...
0
votes
1answer
120 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 has migrated 2005 server data with modified data schema to 2008 R2 from yesterday's date of data. My client ...
2
votes
3answers
359 views

Many to many link tables with history? [closed]

While creating a PostgreSQL database of customer subscribed services with DNS domains, I want to: enable customers to subscribe to multiple services each service can have multiple domain names per ...
-2
votes
1answer
147 views

message table schema - body TEXT or varchar [closed]

I want to make a small social network. For messaging body which one is more suitable? VARCHAR or TEXT? if VARCHAR how long is efficient?
0
votes
1answer
90 views

How to reduce table duplication, while ensuring integrity of the database?

For example, in my app I have some class called Contact: case class Contact(name: String, email: String, phone: String) And several other classes have one-to-many relation to that contact (for ...
1
vote
2answers
175 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 ...
0
votes
2answers
499 views

Multi-Tenant (SaaS) Database Schema with Sharing

Guys I just need your opinion which is the best approach to design a schema of a database for a SaaS application. I want it all on a single database, At first I think I can simply put a context_id ...
2
votes
2answers
1k views

Import Oracle schema data without losing modifications of stored procedures

I have this scenario: One huge (thousands of tables), complex production database, Oracle 8 One huge (thousands of tables), complex development database, Oracle 9 ( same structure as production ) ...
0
votes
0answers
26 views

Create a schema like an existing schema [duplicate]

I have a existing schema in my database called SCOTT, how can I create a new schema with exactly the same privileges which SCOTT schema is having? Is there any create like or some command to create ...
0
votes
3answers
62 views

ER Schema “Optimisation”

I am trying to make an ER Schema for a person. The person will have Current Address and Permanent Address. So far I have it so that both Current and Permanent Address are Composite Attributes and they ...
2
votes
1answer
80 views

Constrains relationship

I have the following design. Each user has it's own contacts, it's own hosts and assign those to a domain which belongs only to him. I want to insure that the host you assign to the domain belongs ...
0
votes
2answers
318 views

Which schema is better for a shopping project? [closed]

I'm working on a business-to-customer project that has variety of product types. There are a few properties like name, description, brand_id that each product has but there are also many specialized ...
3
votes
2answers
599 views

DB2 (LUW) equivalent for Oracle “drop user cascade”

This question is related to creating and initialising test and development databases for an application that has the database running on LUW (linux-unix-windows) On oracle, we have an os user (on ...
2
votes
2answers
312 views

SQL Server 2008 R2 : A Possible indexing strategy for the given schema?

We have these four tables: Store ( row bigint, id uniqueidentifier, name varchar ) Products ( row bigint, id uniqueidentifier, storeID uniqueidentifier, productname ...
1
vote
0answers
107 views

Are duplicates ever acceptable in a database

A warehouse system I am working on allows inwards consignments [type = 0] and outwards consignments [type = 1]. The user selects multiple products for each consignment and then multiple warehouse ...
1
vote
1answer
619 views

Schema Change/Update script for Database deploy [closed]

I have a need to change the database schema . I'm planning to write Schema change and update scripts for tracking database changes and updating them. I followed Versioning Databases – Change Scripts ...
0
votes
1answer
111 views

Whether or not to create separate tables

I am working on a project, where I need to store the information related to A and B, the A and B both have identical columns.There might be thousands of As and Bs. Should I use "type" column to ...
0
votes
1answer
81 views

is there a recommended way to update many postgres schemes

I have a database in postgres which has 15 schemes, the schemes are identical with the same tables, views and functions. the system uses one scheme at a time, as if they were separate databases. So ...
0
votes
1answer
315 views

How does security context propagate between schemas within a database?

We have a SQL Server 2008 database that contains two schema's. The owners of these schema's have been granted full SELECT permissions to all tables within each others ownership. I have created a ...
2
votes
2answers
110 views

What is a standard or conventional name for a column representing display order? [closed]

For example, a junction table associating a product and its pictures: create table product_picture ( product_id bigint not null references product(id), picture_id bigint not null references ...