Questions tagged [schema]

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).

Filter by
Sorted by
Tagged with
0
votes
1answer
831 views

Cannot find the Order Entry folder in $ORACLE_HOME/demo/schema/

I have downloaded and installed the most recent version of Oracle 12c (12.2.0.1.0). As stated on the page https://docs.oracle.com/database/121/COMSC/installation.htm#COMSC00005, I expected to find ...
-1
votes
1answer
52 views

SQL Server : refactor schema to avoid repetition

I have an enormous prod SQL Server database : total size = 1.5 TB full backup duration = 4 hrs ( online ) that needs to be slimmed-down because it's causing a variety of issues for database ...
3
votes
2answers
70 views

1..1 and 1..n cardinalities on the same relationship

I have two tables (companies and users), for which the following rules apply: A User has a Role ('employee' and 'boss') There is one and only one 'boss' in a Company. A User can be in only one ...
1
vote
0answers
1k views

Best way to schedule structure schema design of a events database

On this case at the events table has a repeated schedule and scheduled by date example case each of event schedule: The event has schedule every month, week and day with start and end of time The ...
1
vote
1answer
114 views

Optimizing column types for reduced overall database size

Given the following table: CREATE TABLE avl_historico ( fecha timestamp with time zone NOT NULL, latitud double precision DEFAULT 0 NOT NULL, longitud double precision DEFAULT 0 NOT NULL, ...
0
votes
1answer
4k views

PostgreSQL how to get case insensitive schema name [closed]

I created a schema with uppercase letters like this: CREATE SCHEMA "requeteSQL" AUTHORIZATION ......; Now when I try to GRANT some privileges like : GRANT SELECT ON ALL TABLES IN SCHEMA ...
1
vote
1answer
31 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 ...
0
votes
1answer
55 views

Database scheme for web log analytics

I analyse web logs (nginx) and want store (organize) result in DB. After analyse and aggregate my result looks like: Date and Time (Truncate it by hours) Country City URL (Page on the website) ...
0
votes
1answer
54 views

How best to store complex cost information

I am creating a database to store data related to costs. The cost information can be very varied and I won't be able to fully determine all possible columns currently. An example piece of data might ...
4
votes
1answer
2k views

What is the significance of the principal_id in sys.schemas?

What is the meaning of the principal_id in sys.schemas and when would it ever be different from schema_id? 1> SELECT LEFT(name,20), schema_id, principal_id FROM sys.schemas; 2> GO ...
0
votes
1answer
71 views

Common TVF in SQL server to get results from differnt schema

I have been using SQL Server for past one month and I need a suggestion from SQL Server folks to help me on this use case. The tables below are just to explain about the idea that I am looking for. ...
0
votes
2answers
521 views

how to replicate articles from different schemas?

from sp_addarticle (Transact-SQL) I get an example as how to add an article to a publication. this adds the table dbo.Product to the publication AdvWorksProductTran DECLARE @publication AS ...
0
votes
1answer
116 views

Issue with users creating objects in a user owned schema

I gave a group (AD group) in SQL 2014, access to create, alter, delete objects in a schema [Test] in a database that they have datareader. The user testing (UserA) is able to create objects in a user ...
1
vote
2answers
162 views

Is it possible to schema-qualify an operator?

Let's say I create an extension, like PostGIS, in the schema postgis, CREATE EXTENSION postgis WITH SCHEMA postgis; Is it possible to fully qualify an operator like && in the below example, ...
0
votes
1answer
2k views

Have to change schema in production

I have a mean-stack website www.myweb.io. I need to upgrade the code and the database. In the previous database, I have a schema: var UserSchema = new mongoose.Schema({ username: {type: String, ...
1
vote
1answer
174 views

How do I get the GRANT statements for a specified schema?

Is there a way to generate the GRANT statements that have been run on a schema in PostgreSQL, for example if myUser has been granted usage on mySchema the script would generate GRANT USAGE ON SCHEMA ...
0
votes
1answer
34 views

What would be the better schema to represent this data?

I suspect this is one of these questions to which there is not going to be a single definitive answer. But I'm hoping to gain some insight into what might generally be considered best practice, most ...
0
votes
1answer
34 views

When do I need more than one Oracle Instance on the same server?

I have one application server separate from an Oracle server (one physical server). I have three instances on one Oracle Database Server (another physical server). I want to have three environments ...
3
votes
1answer
2k views

Postgres, benefit of named schema va public schema?

I am new to Postgres and I am trying to understand how schemas fit into everything and what is the benefit of a non-'public' schema. For example, does it provide security, access control benefits or ...
0
votes
1answer
18 views

Which schema is better?

I have three entities: Document, Asset, and Client A Document can be linked to several assets. An Asset can have many documents. A Document can be linked to several clients. A Client can have many ...
6
votes
2answers
2k views

Benefit of having time dimension in a star schema?

What would be the benefits of having a time dimension in a star schema over having the time attributes in the fact table itself? For example: I have a transaction data with user information for ...
1
vote
0answers
62 views

Designing a Database Structure for Permissions: More Columns Vs More Rows

I have an application that needs to keep track of a collection of bit values that is driving a user's permissions within the application. Option 1 As for the respective database structure, the first ...
0
votes
1answer
304 views

My first database schema design

I'm new to programming and databases and working on my first application using .Net, Entity (for SQL Server) and Identity. My application will allow users to create html pages for online courses. ...
0
votes
1answer
791 views

Is it possible grant a PRIVATE Synonym from an the Table Owner schema to an User schema?

Is it possible grant a PRIVATE Synonym from an the Table Owner schema to an User schema? Background: We are doing microservice development and there is an sole owner schema and many different service ...
1
vote
1answer
835 views

What would a “properly designed” schema for roles and permissions look like?

I'm creating an application that has a similar roles and permissions system to Discord. Basically Users are members of groups Groups have roles Roles have permissions And users can be associated ...
0
votes
1answer
356 views

SSIS - Iterative Data Flow Task with Schema Differences

I am new to SSIS and am trying to change a current process that moves data from one server to another using a linked server to use an SSIS package instead. Currently, I have am getting a list of the ...
1
vote
1answer
3k views

Designing a bank database schema with multiple balances per account [closed]

I'm trying to build a schema to keep a record of the transactions made on some accounts, but those accounts are not "user accounts", instead there are orders that are being paid, and money is being ...
6
votes
1answer
4k views

ALLOW FILTERING vs NOT; Cassandra Data Model Question

I have a toy Cassandra cluster running on some RaspberryPis at home. I am currently logging CryptoCoin data to it in hopes of learning more about Cassandra and as well as some other things along the ...
0
votes
2answers
156 views

Online Schema change when DB has existing triggers

I'm doing some due diligence before attempting a MariaDB schema change that really needs to be performed online, but seems like I'm going to have issues with the existing DB triggers in using a tool ...
4
votes
1answer
4k views

Time series data of several sources in one SQLite table or several? File size impact?

Here is the situation: A large amount of time series data from a very limited set of sources is to be kept in a SQLite database file. Time series sources are identified by a 10 character long string. ...
2
votes
2answers
123 views

Why can't I take RDBMS Database Design practices, and use for NoSQL MongoDB Database Designs?

Let's say I have a BankAccount table, and a BankAccountHistoryTransactions table. When it comes to RDBMS database schema design, most Database designers would recommend something like the following: ...
6
votes
1answer
307 views

How to model the relationships (a) between properties and owners and (b) between properties and tenants?

I have a database design and I'm having trouble with two tables. I have a Users table, and a Properties table. The Properties table may only have 0, 1, or 2 users, let's call them owner and tenant, ...
2
votes
1answer
106 views

Simple question about schema (is this supposed to happen?)

I've created a simple database, a table, a schema, and a table with that schema ( so, 2 tables ). --sysadmin create database dba_schema go use dba_schema go create table tabela1 ( id int ) go --...
5
votes
1answer
73 views

What would cause newly restored SQL Databases to show tables, but display an 'Invalid Object' error when trying to view table data?

Problem: As an untrained and involuntary SQL DBA, I'm taking a set of SQL 2008R2 databases and restoring to a new SQL 2008R2 server in another environment. The restore process goes fine and gives no ...
0
votes
2answers
2k views

postgres schema grants usage [closed]

I have a database called layers. in it there are two schemas 1. how 2. base_layers each schema has its own login name and password and both are not superusers. I want the ability to query across both ...
0
votes
1answer
705 views

How can I relate ‘address’ with other two entity types?

In a certain business domain, there are three entity types: Address, Merchant and Hotel, and they're related as follows: A Merchant can have many Addresses, and a Hotel can have only one Address at ...
1
vote
0answers
2k views

Database Schema For Storing Emails

I need to save incoming and outgoing emails from an application in a MySQL database server. It used to be simple to do in that all that needed to be tracked was the from address, to address, subject,...
4
votes
3answers
15k views

Create table permission for a user in specific schema

I want to give Create , alter and drop permission to user A on a schema1 of a database. I guess this question has been already asked, and what i have found is to Grant Alter to the schema and also ...
2
votes
1answer
890 views

Change Schema Binding for All Views

I have to make quite a few changes to my tables. I have numerous views all with schema binding on. Is there a way to turn schema binding off for all views then turn it back on again when I'm done (...
2
votes
1answer
358 views

User created automatically because of AD Group?

I have a Development SQL Server that I'm managing with Active Directory Groups, sometimes when I do my checks on the server I find that some users were "automatically" added to SQL Server Database ...
0
votes
2answers
97 views

Gaming Website: Schema Design [closed]

I want to make a gaming website for Magic the Gathering to report event results and management user decks. Here's what I have so far. Event is a tournament with Players competing in the tournament. ...
0
votes
1answer
20 views

Orderable representation of multi-part values

Consider a table for construction projects. Each project requires resources, e.g. steel, wood, copper, etc. Suppose we want the following types of queries: All projects requiring less than 3 units of ...
5
votes
4answers
1k views

How do I compare large stored procedures?

I want to compare stored procedures that should be identical in several different databases, by retrieving and comparing the definitions from sys.sql_modules. Currently I'm thinking about ...
2
votes
1answer
2k views

Event Booking System: Database Design

I want to make an event (concert, theater, cinema,..) booking website venues table: -ID -name -address stages table: -ID -venue_id -title -seats -seats is json and contain seat row and column ...
3
votes
1answer
3k views

Orders and Quotes Tables - Database Design

Below is the ERD of my current db schema for the orders part of an e-commerce site. The site is based on oscommerce, but has been modified, also I have removed quite a few of the fields from the ...
0
votes
2answers
709 views

Database design for logging varied types of data

I am currently in the process of moving our logging system from file-based to database-based, and I'm trying to come up with a suitable schema to fit. I'd like my application to be logged extensively, ...
1
vote
1answer
844 views

Inventory Database Design? Get historical data from DB for reporting & accounting

Following is the design of my db: Product: ID Name Quantity in Hand (as on date - total across all format) Reorder_point Remarks Warehouse: ID Name Address Remarks is_default Inventory: ID ...
3
votes
2answers
410 views

SQL Server 2008 R2 - How to export/migrate only tables and their PKs

is there a way how I can only migrate/export table names with the PKs but no other relationships like FKs? So there is no dependency between the tables. And then import them to another database? I ...
4
votes
1answer
167 views

SQL Server 2008 Indexed View

I am attempting to add schemabinding to a view in SQL Server 2008, but I am getting an error of Syntax 'Openrowset/Openquery/Opendatasource' is not allowed in schema-bound objects. I am using ...
2
votes
1answer
54 views

Maintainability of schema changes during runtime of an app [closed]

We have an application which accepts JSON objects from X number of third party services and unfortunately we're locked into using SQL to store it. The objects must be flat (no nesting), but each third ...

1
3 4
5
6 7
18