A data structure that organizes information into rows and columns.

learn more… | top users | synonyms

0
votes
0answers
13 views

Access 2013 compare changes made to table

I am currently working on an Access 2013 database and trying to find the best solution to a problem I am having creating it (I am fairly new to databases so bear with me). Situation: Data is imported ...
-3
votes
0answers
41 views

Querying for commentator repo and poster repo for different values of the comment ID (stored in a table) in SEDE [migrated]

How can I modify the following query SELECT CASE WHEN U.Id = P.OwnerUserId THEN 'Poster' ELSE 'Commenter' END AS [User], U.Id AS [User Link], U.Reputation AS [User Rep] FROM Comments AS C INNER ...
-1
votes
0answers
11 views

Need help making meaningful relationships in my database

So, I'm trying to figure out a way to connect my tables with meaningful relationships and I'm not sure why this is bothering me so much. I have 3 tables: Properties Contacts Businesses Now, I ...
0
votes
1answer
22 views

How to generate create table script without primary and foreign key in Oracle [duplicate]

I have lots of schemas and tables. I want to generate create script of all of my tables. I am using below statement and it is working pretty well. SELECT ...
1
vote
1answer
47 views

How to generate create table script without primary and foreign key in Oracle

I have lots of schemas and tables. I want to generate create script of all of my tables. I am using below statement and it is working pretty well. SELECT ...
0
votes
1answer
34 views

Last used index from specific table

how can i take last used index from a specific table and add a +1 to it? database login, table cars I think i need to add it here #### $sql = 'INSERT INTO '.$this->options['db_table'] ...
1
vote
1answer
26 views

When tables are locked does MySQL queue queries?

I have a small production website, but it's live 24/7. When running the Optimize, Analyze or Repair commands, MySQL locks the table it is working on. QUESTIONS How would this effect users trying ...
1
vote
1answer
49 views

Will a specific denormalization increase performance in a specific scenario?

Suppose I have a table with fields | a | b | c | d | ... | z | which contains millions of records and which will serve millions of queries a day. And the field z holds the id of some parameter which ...
0
votes
0answers
22 views

Database tables to store all old relations between them (SQL)

i have a main table with lines that never update, and i need relate each line from table 0 to one line from table1, one line from table2 and one line from table3. But the 3 relations change every ...
0
votes
1answer
38 views

autonumber and one-to-many relationship

I have a main table with an autonumber key. I need to introduce a new table, related to the main table in a one-to-many relationship (i.e. a record in the main table could conceivably link to several ...
1
vote
1answer
27 views

Methods for identifying differences in accumulating history table?

This question will probably be elementary to most DBAs. I'm doing light DB work which isn't my specialty and I'd like to create some kind of "change log" for a table that is copy/appended to a ...
0
votes
0answers
28 views

Need an advice on how store some statistics details of a master entry in a MySQL DB

I need an advice on how to store this statistics data: I have a master table which stores some institutional infos of some cities in several years and a detail table which should contain a detailed ...
0
votes
1answer
46 views

How to organize the tables of a MySQL database with several statistics data of several years?

I am developing an app that must provide statistics information about the distribution of the money that a person spends each year in taxes in the city where he lives. The user should select the ...
0
votes
1answer
63 views

Beginner table design

I have been coding in C# for a couple of years where I usually try to follow the 'single responsibility principle' which states that each class should ideally be responsible for only 1 goal. Now I ...
0
votes
1answer
54 views

Recommendations for how I should create my table based on data given?

I'm asking this as I'm kinda overwhelmed by the data presented to me (I'm still fairly new in programming and SQL). Basically I need to create a database to store warehouse equipment information, and ...
2
votes
2answers
45 views

Table Transformation with SQL?

I got a set of tables which have been imported into a database by transforming them like shown in the following picture: Now it is necessary to get the former tables back. Unfortunately the guy who ...
5
votes
1answer
130 views

changing mysql table comment

i know that: mysql table comment can be defined while creating it: create table (...)comment='table_comment'; and how to display it: show table status where name='table_name'; and i know how to ...
0
votes
1answer
43 views

What is the correct name and significance of EAV table pivot?

I've been forced to use a very uncomfortable structure for a table. After trying to up similar examples, I've discovered the EAV, which seems almost like a pivot of said structure. The attribute order ...
0
votes
1answer
35 views

Get the value of one attribute from the reference key of another table?

I have two tables named as ps_order_detail and ps_product_lang in MySQL. I want to get the product name from one table whose reference key is in another table. I have two tables. First the ...
0
votes
0answers
45 views

Alternatives for subquery

There are three tables: product_hits, products, and product_subcategory_map. I want to count the number of product_hits and for each product. There could be more than one subcategory in the ...
0
votes
1answer
33 views

Combine or Separate Tables

I have a single table that holds the following data columns: id = Auto Increment provider = Twitter or Facebook (depends what they use to login with) uid = User ID name = Their full name (e.g. ...
1
vote
4answers
91 views

How to handle table design with variable columns

I have a table design scenario and as a non-DBA type, would like opinions on which is more scaleable. Say you are asked to record information on houses for a metro area, starting with a small ...
0
votes
0answers
51 views

Storing nationality options

We have a table for countries, using ISO 3166-1 standard, also languages, using ISO 639-1. Now we need a table for nationalities, but I can't find a standard for abbreviating or indexing them. ...
0
votes
1answer
54 views

Automobile database logic

I am building a web based quoting system for a local automobile dealership. I think I have figured out the logic for the databases but I want to get a second opinion before I start just to make sure ...
0
votes
4answers
122 views

revoking mysql table level privileges

I have a mysql user account who has following Global privileges GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK ...
0
votes
2answers
85 views

How to list all table columns in sorted order?

I know that \d table_name lists all columns for that table, but is there a way to list them sorted in alphabetical order?
-1
votes
1answer
40 views

Making data from one schema available to another schema

I need to make data that is currently in one schema available to a different user in the same Oracle database. Does this require that we replicate data from one schema to another? Or is there a ...
0
votes
1answer
123 views

My database keeps crashing on startup how can i repair it without it running?

I've got some problems with my database. I hope somebody can help me out. Problem: The database keeps crashing on startup. In my log i see a couple off these errors: [ERROR] /usr/libexec/mysqld: ...
1
vote
0answers
93 views

KPI Metrics Table Design [closed]

We are currently working on project to get KPI metrics from out account partners,We want to design a table and It will have 3 Major Business units 4 Business Verticals (Service Desk, Knowledge ...
1
vote
1answer
118 views

Drop table without its dependencies and solve block corruption

I have found alert about corrupted block in alert log. Corrupted block belonged to the table named DOCS. Because of I don't have any backup of this database, decided to recreate DOCS table to solve ...
3
votes
1answer
74 views

How many blocks is my database

How can I write a query using Oracle SQL Developer to find how many blocks my database is using? (tables & indexes)
0
votes
1answer
75 views

Save and restore specific tables

in an Oracle 11.2 Database, Enterprise Edition, we are running calculations divided into 3 different "modules". These modules can be started on their own, but not parallel, so in between users are ...
0
votes
0answers
36 views

Why does an aliased temporary table consume more space than a real table

I have a table named app with millions of lines. /var/lib/mysql/our_data/app.MYD 1468.527344 When running a query such as: select * from (select * from app) as temp; We get the following: ...
0
votes
1answer
46 views

SSMS gives error if column name is “MERGE” where as other keywords works

IN SSMS create table if we include sql keywords in column name then it will be wrapped around square brackets "[]" automatically and the table gets created without any error generally. But if we ...