Questions tagged [database-table]

In a relational database management system (RDBMS) a table organizes the information in rows and columns. Each table has a defined number of columns, each of which is identified by its name, but the number of rows is variable, consisting of one for each line of data.

In a relational database management system (RDBMS) a table organizes the information in rows and columns. Each table has a defined number of columns, each of which is identified by its name, but the number of rows is variable, consisting of one for each line of data.

More Information:

  1. The wiki entry on database tables is a good source of information.
  2. Microsoft provides an intuitive definition of a table
313 questions
2
votes
1 answer

Database table structure for user profile with 20 attributes

Let's take for example a dating site with 100.000 users. Each users has about 30 attributes like hair color, smoking, age, city, gender, ...Some attributes are bool, some int and some var or text. About 20 of those attributes are searchable and half…
user1324762
  • 765
  • 4
  • 7
  • 24
2
votes
2 answers

How to select certain fields from table in mySQL using PHP

I'm trying out my hand at php at the moment - I'm very new to it! I was wondering how you would go about selecting all items from a mySQL table (Using a SELECT * FROM .... query) to put all data into an array but then not displaying the data in a…
ez007
  • 135
  • 2
  • 12
1
vote
1 answer

Database Tables For Multiple Roles

I have an architecture problem about how to store data related to a specific role in a relational database. I have three roles, a Subscriber Contact, Teacher, and Student. They are all stored in the Users table, but have specific properties…
1
vote
1 answer

php postgres fetch array conversion to mysql

Hi i've been working on a task of porting some code from some old postgresql driven site to a newer and imported site running against mysql. There are some sections of code that use's function calls like: $DataArrDT =…
bcar
  • 815
  • 9
  • 19
1
vote
1 answer

MultipleInputs with DBInputFormat in Hadoop

In my database I have multiple tables where each table is a different entity type. I have an Avro schema that I use in hadoop which is a union of all the fields of these different entity types plus it has a entity type field. What I would like to…
user533020
  • 137
  • 1
  • 3
  • 9
1
vote
1 answer

Need help understanding mysql LEFT JOINS and DataTables

Im trying to get my head around MySQL. I have learnt a great deal from info online but, im a little stuck on understanding how JOINS work and how to fit in into the DataTables code. I have this table structure: And this MySql statement: SELECT…
monsterboy
  • 153
  • 3
  • 17
1
vote
1 answer

Cannot find the sysmail_mailitems table in SQL Server 2008

Could not find the table sysmail_mailitems in SQL Server 2008 R2. Can you help me find that table?
superbun1
  • 129
  • 1
  • 4
  • 6
1
vote
1 answer

How to display "Null" (SQLite)

On SQLite, I displayed the table "user" as shown below but "Null" is not displayed so I cannot differentiate between "Null" and Blank(Empty String): sqlite> .header on sqlite> .mode box sqlite> select * from user; ┌────┬─────────────────┐ │ id │ …
Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
1
vote
4 answers

How do I limit my PL/SQL query to search only relevant tables?

I'm trying to write a PL/SQL script that searches the entire database for a string and report the tables and columns it finds it in. It looks like this: DECLARE ncount NUMBER; vwhere VARCHAR2(1000) := ''; vsearchstr VARCHAR2(1000) := 'search…
gib65
  • 1,709
  • 3
  • 24
  • 58
1
vote
2 answers

SQL: Insert into statement, but suppose you do not know origin and target headers

I am trying to come up with an insert sql stament that will insert data from a table into another existing table. There are in fact some ways of doing this but I did not find a way that matches my requirements. I need an insert statement type query…
Tiago Martins
  • 129
  • 2
  • 11
1
vote
6 answers

Are this good MySQL practices

When I make a SQL query, for example, in database where there's a table named "employees", which is the best practice of writing? SELECT 'name', 'surname', 'phone' WHERE 'city'='ny' FROM 'employees' ORDER BY 'name' SELECT name, surname, phone,…
1
vote
2 answers

Difficulties with creating a function to delete data from the database

I created a button in the table to implement the function of deleting data on the site, I did everything according to the video tutorial and after I did everything refreshing the page I got an error: Undefined variable: value (View:…
Mineral
  • 39
  • 1
  • 1
  • 7
1
vote
1 answer

How do I specify unique constraint for 2 columns that should be treated as one in PostgreSQL?

Let's say I have a table: table people ( user, path1, path2, ); I would like to make a constrain that it restrict adding/updating if there is already a record with the same name either in column path1 or path2. Example: INSERT INTO…
1
vote
2 answers

Convert table to 2NF - strange table to convert?

I have the following table below and am supposed to convert it to 2NF. I have an answer to this where I have gone: SKILLS: Employee, Skill LOCATION: Employee, Current Work Location I have a feeling I'm wrong with this ^above^ though. Also can…
maclunian
  • 7,893
  • 10
  • 37
  • 45
1
vote
1 answer

Hive one line command to catch SCHEMA + TABLE NAME info

Is there a way to catch all schema + table name info in a single command through Hive in a similar way to SELECT * FROM information_schema.tables from the PostgreSQL world? show databases and show tables combined in a loop [here an example] is an…
Terru_theTerror
  • 4,918
  • 2
  • 20
  • 39