Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [table]

A data structure that organizes information into rows and columns.

0
votes
1answer
16 views

Application performance [on hold]

I need to have users table in which each user has one of few different types (ex. admin, manager, basic user etc.). So my question is: Is it better to just make an attribute in user table and fill ...
0
votes
1answer
28 views

dynamic or static database tables

I am creating a little mulitplayer game. The game creates a session where players can join in. Then the session has to store some data provided in the game. Should I create a new session table ...
1
vote
1answer
25 views

Weird error on creating table and selecting rows from table

I have db and I am trying to create table called "sales_invoice_grid" I am having bellow scenarios: error 1: while creating the table "sales_invoice_grid" manually, it gives the message that it ...
-1
votes
0answers
15 views

Postgres: Create table when 2 tables share a common value

I want to create a new table, taking all the columns from table1 and only taking the rows from table1 where it shares a common attribute. So far I have: CREATE TABLE schema1.table3 AS SELECT topo.id ...
0
votes
1answer
40 views

The simplest way to copy sql tables from one database to another?

So I have been logged into two different database. I want to copy one table from the first database to the other one with its content. I want to overwrite the content of the destination one (Because I ...
-1
votes
0answers
27 views

What the exact relation is when we talk about “a relation of six tuples”? [duplicate]

There is a toy database table from a big data course: Per this professor, each row (record) is considered as a tuple, a database table is "a relation of six tuples". What the exact relation is?
1
vote
1answer
194 views

Why am I receiving the identity insert error even after explicitly setting IDENTITY_INSERT ON and using a column list? [closed]

My code: SET IDENTITY_INSERT SomeCoolDatabase.BoringOldSchema.TableWithIdentityColumn ON INSERT INTO SomeCoolDatabase.BoringOldSchema.TableWithIdentityColumn SELECT ColumnWithIdentity, ...
0
votes
0answers
25 views

How to effeciently save this kind of text into database?

I have this kind of text and want to save it to database: I. Master Text I <<<Parent I.A. Sub Master Text I &...
0
votes
0answers
24 views

How to add values matching from table B to table A?

I've been struggling for a while now. Can someone help me? I have 2 tables. I have a table 'SKUS_info' with SKUS(a number assigned to a product), approximately about 30k rows. And the second table ...
0
votes
0answers
30 views

Does having unused columns effect the indexing of the table

I have a table where there are some columns which are empty and they are not used. That table has to be indexed multiple times based on the application. Does having these empty columns in my table ...
0
votes
1answer
21 views

How to store data in look-up tables when some of it may be semantically different, but logically the same?

I am working on a system that receives communications from various laboratories. Each laboratory has two separate, independently operated data services which means that Laboratory A and Laboratory B ...
0
votes
1answer
31 views

Combine many table into one table in mysql table design

I'm grappling to design table relation. Version is Mysql 5.6.10. My case is like below bill table, payment table, contract table, recruitment tables... are existing. Currently we're considering new ...
1
vote
1answer
42 views

MySQL, operation DELETE

I have: DELETE FROM songs WHERE songs.id_album = album.id AND album.id_band =16` Error: #1054 - Unbekanntes Tabellenfeld 'album.id' in where clause. Table album exists, field id too, 100%. ...
0
votes
1answer
22 views

select number that isn't in the table

So I have a table named reserveringen. inside the table there are (Reserveringsnummer(auto_increment and Unique), Voorstellingsnummer, Stoelnummer). I also have a table named voorstelling in that ...
0
votes
0answers
21 views

Can you insert a value from a range in mysql?

So basically I have one auto incrementing column which is increments every time a ticket has been sold. However I also have 50 chairs inside the room. since I can't use auto_increment 2 times is there ...
1
vote
1answer
56 views

How to count records from different tables [closed]

So I'm trying to filter some records out of my select inside a form on my website. Problem is that I currently have this setup: Database Table1 time Number Table2 Number Something I'...
0
votes
1answer
35 views

Generate metadata file from PostgreSQL server [closed]

Is there a way that I can make a metadata-sheet that lists all the available tables from a postgresql-database, so users can see documentation of the tables? I know that there are descriptions, ...
0
votes
1answer
40 views

Left join SQL Select Statement

Good day, Im trying to find a good way on my select statement Table1 AccountID AccountName Rate OldRate 01 Smith X X2 02 Providence X X2 03 ...
0
votes
2answers
42 views

How to create a table in a database on a different server

I need to create Table B in database B on SQL Server B by querying Table A in database A on SQL Server A. Table B does not exist in database B. SQL Server A and B are linked. I wonder how could this ...
0
votes
1answer
28 views

Combing two queries in one

I have two tables, e.g. "Locations" and "Connections" "Locations" has values Id | Dimension --------------- 1 | 4 2 | 8 3 | 2 "Connections" maintains attributes Origin | ...
0
votes
0answers
25 views

How to create multiple tables based on existing tables in postgreSQL?

I have several tables, and I need to create a matching _hist table for each one. For example if I have: CREATE TABLE public.test ( first text, middle text, "last" text, ...
-1
votes
1answer
35 views

Is the index created as soon as data is inserted into a table? [closed]

For example I have a table and I created an index on ID column which generates numbers every time I insert a row. If I only insert 5 rows does index tree start to be created or is there a threshold of ...
0
votes
0answers
23 views

How to group related information: Another table vs Same table

I have a table to store video information, like so: ----------------- video ----------------- video_id title description duration inserted_date ... Many times, i have videos that are directly ...
0
votes
1answer
54 views

schema of messaging system

in a web application where people talk to each other , there will be a lot of messages , suppose for simplicity that each row in a table is a message , do you think if a have 5 million messages that ...
0
votes
1answer
30 views

Questions on database table and index partitioning in SQL Server

I have developed Transact-SQL script to partition the table. To apply the partition, I am creating one non-clustered index for my partition key column and associating it to partition scheme. I have ...
0
votes
2answers
45 views

Should I create new table for each User to store their product List?

I'm creating a Web based billing and inventory management system. I need to store the product details such as name, price, stock left and also want to store details of every bill for each user ...
0
votes
1answer
42 views

External Table: VARCHAR in Create but CHAR in Access Parameters

Consider this SO Question UTF-8 And External Tables. A proposed solution contains VARCHAR2 columns in the CREATE section but those same columns get CHAR attributes in the ACCESS PARAMETERS section. ...
0
votes
2answers
72 views

Will frequent creation and deletion of TABLE (not indexes) cause fragmentation in database?

Does frequent creation and deletion of physical table in database causes fragmentation? I am frequently creating and deleting database for loading data warehouse load. I am using these table to hold ...
1
vote
1answer
27 views

SQL How to show information from others tables in select requet

There are my database user id | user_code | user_name 1 | 1x2d | Peter shops id | shop_code | shops_name 1 | 1234 | shop1 2 | 3456 | shop2 articles id | art_code | art_name 1 | ...
1
vote
0answers
17 views

Best practise for data dump 'entry point' in DB processing chain - PostgreSQL

I need to implement a process chain to transform and analyze potentially large sets of data, inserted both programmatically and manually (e.g. CSVs). In either way, the input data is standardized in ...
1
vote
2answers
54 views

database design for song position under play-list

I have a music streaming application where I have playlists. Each playlist has maximum 100 songs. I have a mapping table called PlaylistSongMapping which has the following schema +------+------------+...
1
vote
0answers
37 views

Statistics injection for calculating the cost of a query

I want to find out the cost of a query by "EXPLAIN" query in Postgres. As I know, Postgres calculate this cost by using the statistics of the table. (e.g: relpages, reltuples in pg_class or some ...
0
votes
0answers
8 views

Creating a database for due dates

In my current role I have to write down all my projects on pre-made grid on a dry erase board. As I finish a project I erase it but as the board reaches its capacity I have to manually shift ...
0
votes
2answers
100 views

Get Headers from SQL Table

I am looking for a way to dynamically get the headers from a table without having to write them (select 'header1' as "header1"...., 'header50' as "header50" from MyTable) It doesn't work above a ...
0
votes
1answer
40 views

SQL, creating a new table with auto generated passords from other tables

i have this sql below which i have retrieved from our student database. It retreives all that i need, but i would like to create a new table which includes all the tables plus one column with auto ...
1
vote
0answers
144 views

What are the advantages of using a Materialized View directly on a table?

Recently, in enterprise's Oracle database, I have seen some materialized views that filter directly columns of table without adding aggregate fields and without calling custom functions. Example: ...
1
vote
1answer
36 views

Pivot information - sql table

I was wondering if anyone could help me with pivoting data in sql? I am a newbies and need some help I want to pivot data based on "LastLogOn" column. Is it possible to do in SQL? From: To:
0
votes
1answer
44 views

How to LOCK/BLOCK selected row in table to be ReadOnly?

Is it possible to LOCK completely or make READ-ONLY where id = value in MariaDB? or add some trigger locking if someone is trying to update selected row ? Some people says: "Trigger is not a good way ...
-2
votes
1answer
49 views

Copy column rows to be the first rows in column

I have two database tables named vegan_ar_sheet1 (old) and vegan_en_sheet1 (new). Now I want to copy the column name and all of its contents from the vegan_ar_sheet1 table to the vegan_en_sheet1 ...
-1
votes
1answer
74 views

Is mysql using some kind of auto repair due to “check table” warnings?

Today i noticed a "strange" behaviour of MySQL when using "CHECK TABLE" on a crashed table. First i got a warning like "Size of datafile is: * ... Should be: *" but i could still "insert into / select ...
0
votes
1answer
24 views

In which context does a procedure run when called from another context?

Envisage: use databaseA; go exec databaseB.dbo.spProcedure(); go Does the procedure execute against databaseA - the context from which it is called, or databaseB - the context in which it exists? ...
0
votes
1answer
28 views

Update two tables, each on separate MySQL servers, on two different machines in one query?

Have two MySQL servers running on two different machines in a local network. Using PHP and accessing via IP. No problems there. The databases have identical schemas. One was an import from the other ...
0
votes
2answers
59 views

DB2 huge IREF and lots of scans

I received a task from one of my colleagues to check why he always receives high CPU load alerts. I don't have too much experience with databases and I need some clarifications. I created a script to ...
-2
votes
2answers
71 views

How to display null records/rows from table

For ex: I have a record with name = "sga_target", and no record exists where name = "_exafusion_enabled". I still want to display a row with "_exafusion_enabled" as name and NULL as value, without ...
3
votes
4answers
144 views

Representing lists in SQL

My database setup is modern (My)SQL. I've got a Content Table, including ids. Now, users should be able to comment on content. To achieve this, arrays have come to my mind. Now I see several options ...
1
vote
1answer
209 views

Trigger with a Variable Select and Order by

Is there a way to a set trigger that will activate once a new table is created and will get the new tables name? I was able to come up with the query below but it only gets the first query by ...
1
vote
2answers
313 views

Does SQL Server automatically update the foreign key relationships between tables when one of those tables is renamed?

What happens to the foreign key relationships on a table if that table is renamed?
2
votes
0answers
30 views

IDB file Maximum kb limit

I'm new in handling MySQL database, I made a tracking system I using the MySQL database incorporated on the xampp package as a database. Everything is running smoothly, however upon reaching 90,112 kb ...
3
votes
2answers
34 views

How can I instantly update a table in a database with the columns values from another database?

I have database_1 and database_2 both on the same server. How can I instantly update the USER table in database_2 when data is inserted into the USER table in database_1? Structure of both tables: ...
1
vote
3answers
196 views

InnoDB “holes” in large table 200 Million Rows?

I have a large MySql InnoDB table with about 200 million rows. One of the columns has some data in it that I really don't need any more, so I'm thinking about removing that column, or setting all the ...