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
-1 votes
1 answer
33 views

Desired State Schema Best Practices for continous schema + data upgrades at different on prem locations

I am looking however to blogs/articles on people who did the same so that i can reference my work against other people who also went in this direction before / or even a github repo: I have a project ...
user avatar
  • 131
0 votes
1 answer
21 views

Creation Synonym among different db schemas

might seem a stupid question, but I'm pretty new to the db world. Is that a good practice to have two oracle schemas which have synonyms pointing to each other ? like SCHEMA_A owns a SYNONYM_1 ...
user avatar
  • 1
1 vote
1 answer
27 views

mysql optimization for intensive schema-altering queries (DDL)

In the context of CI would like to massively parallelise the running of tests. The code under testing require a database to be present, so MySQL is used (as the application goes with that right now). ...
user avatar
0 votes
1 answer
17 views

Recover schema and the data in it from accidentally deleted schema

I did something careless. I deleted a schema. I have backups of the \mysql...\data\refadmin folder so I (hope) I have all the tables and data. That's backed up daily. When I look at work bench, I ...
user avatar
3 votes
1 answer
31 views

Lists and list of items instead of one table per 'list'?

A sql database I am working on at a customer has been created with an unusual structure. For example, instead of having one table for each of the following: Country, State, City, Units (in, m, ...
user avatar
0 votes
0 answers
11 views

Importing a database with the exact same schema as the destination database

I am working in Access with a fairly simply relational database. I want to import another database of the EXACT same schema, but when I use Access' import tool the software creates extra tables (...
user avatar
0 votes
0 answers
15 views

ERD relationships rental_car

So I'm having difficulties with making an erd for a project about renting cars. I think I'm almost done, I only have to make the relationship between 3 tables ,2 of them had many to many relationship ...
user avatar
  • 1
0 votes
0 answers
29 views

Airport booking system schema (ERD) guidance

I have to make an ERD for an Airport. I have created and identified some entities but I am having some trouble connecting them among them. For the airport's booking system I have the following ...
user avatar
0 votes
1 answer
48 views

Is my database ERD well designed

I'm creating a PostgreSQL database for datasets, which should store historical and future data of weather forecasts and train timetables. I'm wondering if my ERD is good enough for a database which ...
user avatar
  • 1
0 votes
1 answer
229 views

Postgresql DB - insert or update on table violates foreign key constraint + Schema Design Question

I have 1 big table with 9 fields/columns, some of theses columns have a lot of duplicates, so i decided to split them into 2 tables in Postgresql i.e. TEST_A table with columns that have a lot of ...
user avatar
  • 1
1 vote
1 answer
16 views

How to model data which sometimes (but not always) has a subsection?

I'm trying to help my wife create a schema for a project of hers, and I'm somewhat stumped by some of her data and how to model it. She has a bunch of "standards" that go in to a database. ...
user avatar
  • 13
1 vote
1 answer
54 views

Unique array values for this string_to_array

This is a follow-up to: Best way to map different JSON keys to same target columns Based on these sample tables: data_providers: id | field_map -------------- 1 | {"segments": "...
user avatar
  • 203
3 votes
1 answer
303 views

Best way to map different JSON keys to same target columns

I have CSV import data that comes from multiple vendors with 50+ different columns, and each vendor has slightly different naming. Instead of trying to spend hours mapping all of the column names to a ...
user avatar
  • 203
0 votes
1 answer
27 views

DB Schema Design for storing Test Results

I am working on a project to view test results for different 15 subsystems . Each subsystem is more or less similar but requires different monitoring parameters to be tested . Each subsystem has ~300 ...
user avatar
  • 1
1 vote
0 answers
26 views

Database design for aggregate data (containing duplicate records)

I'm looking to generate statistics based on the MySQL database - but I'm having issue in designing the proper database schema for it. Scenario : User has a bunch of machines which upload their ...
user avatar
0 votes
1 answer
36 views

Storing order of relation as JSON array

Let's assume I have Playlist, Song and playlist_song tables. Where's it's better to store song ordering data? In Playlist as JSON songs_order = [song_id_1, song_id_3, song_id_2] or better on ...
user avatar
0 votes
1 answer
159 views

Chat schema for PostgreSQL and MongoDB

I'm designing a schema for a very large chat app. I had problems with NoSQL databases such as MongoDB and Cassandra. Some part of the schema is relational i decided to use both PostgreSQL and MongoDB ...
user avatar
0 votes
0 answers
24 views

Add extra column to anyelement type - querying across multiple schemas with extra information

I'm trying to create a generic function which can be used to query across all of my schemas. I'm using schemas to separate my tenants, so they all have the structure. I found Staab's post useful: ...
user avatar
1 vote
1 answer
42 views

Role-playing Dimensions

I am new to data warehouse schema and i am confused about role-playing dimensions. i have searched a lot and regarding to dates in data warehouse, it is always the same type of example they give ...
user avatar
0 votes
0 answers
25 views

Mongodb search and sort

My scenario is to search and then sort according to date for this I have made my schema like this { section:String, name:String,(always lowercase) updated_at:Date.now ...many more fields } ...
user avatar
0 votes
1 answer
47 views

Database Design For Realty Website Review

I am designing a real estate website and wanted feedback from some professionals about the database schema that I came up with. I created a property table that would have each house. Each house can be ...
user avatar
0 votes
0 answers
23 views

How to organize common columns to a single table?

I'm very new to database designing and I'm creating a small project to understand it better, I'm trying to come up with a new school crm. I started with the below schema: create table student( id ...
user avatar
  • 113
0 votes
1 answer
85 views

PostgreSQL granted all privileges on schema, but user still cannot insert a record

This is maddening. I'm running PostgreSQL 14 in a Docker container using a standard image. # docker-compose.yml version: "3.7" services: pg: image: postgres environment: - ...
user avatar
-1 votes
1 answer
182 views

Understanding a double entry accounting DB Schema

This question is related to a previous question "Why the Accounting DB Schemas do not allow to maintain a clean Products Table?", asked on this network by someone else. Assuming that the ...
user avatar
0 votes
1 answer
22 views

How to design Postgres schema with multiple nullables?

I want to create a table for tasks in my database. There are a number of roles accounts can have in my app—admin, operator, user. All these roles can create tasks, and admin and operator can close the ...
user avatar
0 votes
1 answer
65 views

Is it possible to apply filters on SqlPackage?

We develop a lot of modules separately. This means the Blog module has its own database in development. All objects of each module start with the module schema. So the Posts table inside the Blog ...
user avatar
  • 31
0 votes
1 answer
65 views

Survey DB Design. No user answers, only questions

The task is to SQL a bunch of surveys in order for the researchers to have examples for creating new questionnaires in the future (and insert those questionnaires into DB). So no information about the ...
user avatar
  • 1
0 votes
2 answers
33 views

data structure for grouping children without parents

I have a list of name ID Name 1 John Doe 2 J. Doe 3 John Doe 4 John Doe With different methods, I check which names are the same person by checking their actions. For example, in ...
user avatar
  • 4,179
0 votes
1 answer
88 views

How to spot all transitive dependencies in mysql database design?

I've read up on 3NF and transitive dependencies but had a couple of questions I'm unsure if I have achieved 3NF with my database design. Context: I want to create a basic bankings design where ...
user avatar
  • 13
1 vote
1 answer
185 views

Grant read only access to postgresql schema

I want to grant user foo_user read only access to schema bar_schema. I executed the following commands postgres=> GRANT SELECT ON ALL TABLES IN SCHEMA bar_schema TO foo_user; GRANT postgres=> ...
user avatar
  • 171
0 votes
0 answers
235 views

How can I handle multiple social logins per user and yet unique email in this database schema?

I am trying to create a postgres database for a webapp that has users that either login with email/password combo or with social accounts. I would like to do it such that once logged in a person is ...
user avatar
  • 246
-2 votes
2 answers
180 views

Seeking advice on 3NF on my first database design for a banking system [closed]

Like I say in the question this is my first go at database design and normalization I want to achieve 3NF. The general context is a basic banking system, that allows for loans and multiple ...
user avatar
  • 13
0 votes
1 answer
38 views

SQL Schema vs Schema

As far as I can tell, the word “schema” is used in two different ways: The schema is the structure of the database, including the tables and how they are related The schema is a sort of namespace ...
user avatar
  • 2,337
1 vote
1 answer
89 views

How can I Run stored procedures in public schema to provision and create tables in a new schema

I'm building a multi tenant application with shared database and different schemas(each customer has its isolated data in a schema) I have run a stored procedure that creates all tables and ...
user avatar
1 vote
0 answers
102 views

How to find created mssql schema in DBeaver?

I have created new database and new schema. CREATE DATABASE banks_db; CREATE SCHEMA Chains; Database was created, but not schema, and when I try to create it one more time I get error: SQL Error [...
user avatar
  • 111
0 votes
1 answer
39 views

Correct database schema?

A system for a bike repair shop has 2 types of users: Mechanics and their Customers. The schema has this structure: Table Users: The boolean field is_staff defines the type of User (if is_staff is ...
user avatar
0 votes
0 answers
49 views

Is this a solid database design that passes 3rd normal form?

I am a tennis coach and created a small database to track student testing. I have several programs( beginner, intermediate, advanced). And Throughout the year/season, they are divided into four 8 ...
user avatar
  • 1
0 votes
1 answer
58 views

SQL: Entity belongs (many-to-one) one of two different entities

Let's say I have organization and person and they have a one-to-many relationship with post. post could only be owned by either an organization or user (person). What I'm doing right now is making the ...
user avatar
  • 7
0 votes
0 answers
35 views

Appropriate way to convert Extended ER diagram to Hibernate Entity and repository

I am new to Hibernate and don't know well how to convert EER to JPA entity and repository. Would you demonstrate how to create Hibernate/Jpa entity and repositories from this diagram . You can ...
user avatar
0 votes
0 answers
32 views

How to get all the extended properties inheritance and regarding this heritage apply the values of extended properties?

Hope you are well I'm been a bit stuck trying to develop the code to get the inheritance of extended properties. I will explain the situation: The thing is have a query to list all extended properties ...
user avatar
0 votes
1 answer
30 views

Database scheme for re-testing records

Goal Monitor records of temperatures for each room, daily. What I have created so far Firstly, this table shows the rooms and their minimum & maximum values of the temperatures they should meet. ...
user avatar
  • 103
0 votes
0 answers
86 views

dbeaver connection cannot change driver properties schema

For the dbeaver connection, edit connection (Athena JDBC, i.e. AWS daata lake), "driver properties" tab: I cannot change driver properties schema field (default) anymore. This used to be ...
user avatar
-1 votes
1 answer
49 views

ClickHouse MV is not working perfectly as i need [closed]

I’m new to ClickHouse and having an issue with MV. I have a record table which is the data source. I’m inserting all the data here. Then created another table called adv_general_report using ...
user avatar
0 votes
0 answers
46 views

Database Scheme

I have a problem with a use case and I don't know how to design my database. Here are the detail : I have an entity "event" which can occur at different frequency but for each frequency ...
user avatar
  • 1
0 votes
0 answers
38 views

How do i design a schema with proper DB engine to accumulate data depending on this need on clickhouse or in any other database?

We're a new Adtech company and I was planning to design a database where I'll pull all the data to a single table and then make new tables with a materialized views for others to generate multiple ...
user avatar
0 votes
2 answers
446 views

Oracle: Simple way to compare all objects of a schema in two databases?

I'm attempting to compare all objects of two schemas located in two different databases. I know there may be ways to do this with TOAD and SQL Developer, but is there another way to do this by script ...
user avatar
  • 11
0 votes
3 answers
39 views

Best Practice to define has many through relationship

Given the Images. Sometimes I needed to fetch lessons related to a course without joining the topic table. It is a good way to model the Schema in the diagram at the bottom? Kindly advice.
user avatar
0 votes
1 answer
36 views

How to interpolate a function return of column names into the SELECT section of a QUERY [MYSQL]

I deal with tables with many columns - recently I realised I can generate a list of column names excluding one column (maybe PK), that I don't want. Like so: mysql> SET @notColumns = 'primary_key,...
user avatar
0 votes
0 answers
28 views

Question for my entity relationships

I'm not sure how I should think regarding my database design. I have made this database schema below. And I'm trying to think about the relationship between the entities. I have read through online ...
user avatar
0 votes
1 answer
141 views

Postgresql: avoid referencing schema in trigger function

I have written function that I registered in a trigger that ensure referential consistency in non-normalized data (like we store agency_id + branch_id and I ensure that a referenced branch is inside a ...
user avatar
  • 429

1
2 3 4 5
20