Questions tagged [dbtable]

Database tables store data in rows and columns. The columns are defined when the table is created while rows are inserted, updated, and deleted by users over time. These tables are often designed with some particularly kind of efficiency or checking in mind, depending on the data and how it will be added.

For example, one could build the table with indexes to support efficient searching for specific values or with triggers to perform additional actions or validation when certain events occur, such as inserting a row into the table.

13 questions
495
votes
8 answers

Is there an SQLite equivalent to MySQL's DESCRIBE [table]?

I'm just getting started learning SQLite. It would be nice to be able to see the details for a table, like MySQL's DESCRIBE [table]. PRAGMA table_info [table] isn't good enough, as it only has basic information (for example, it doesn't show if a…
Matthew
  • 28,056
  • 26
  • 104
  • 170
63
votes
9 answers

Lookup Tables Best Practices: DB Tables... or Enumerations

If we have to store the available positions at a company (i.e. Manager, Team Lead, ... etc). What are the best practices for storing it? I have two opinions with comments... "sure, welcoming yours" Storing it as DB table with columns ID and Name,…
Bishoy Moussa
3
votes
6 answers

best practices with code or lookup tables

[UPDATE] Chosen approach is below, as a response to this question Hi, I' ve been looking around in this subject but I can't really find what I'm looking for... With Code tables I mean: stuff like 'maritial status', gender, specific legal or social…
Bertvan
  • 4,943
  • 5
  • 40
  • 61
3
votes
1 answer

Zend_Form: Database records in HTML table with checkboxes

I am trying to add a HTML multi-column table to a Zend_Form. The table would be populated by data from the database and each row should be preceded by a checkbox, as shown in the ASCII…
Andy
  • 91
  • 2
  • 5
2
votes
1 answer

Django migrations ignoring db_table when set using metaclass

I'm using a metaclass to automatically set my Django model db table names from camel case to '_' seperated names, e.g. MyGreatModel will have a table name like appname_my_great_model instead of the default appname_mygreatmodel: class…
fpghost
  • 2,834
  • 4
  • 32
  • 61
2
votes
2 answers

Laravel 5, log DB::table insert, update , delete events

I am developing Laravel 5 app. In Which I want to log DB::table insert, update and deleted event with all New or changed(in case DB::table is being updated) DB::table Fields . I want simple reusable solution without writing too much of a code.
Dayat Fadila
  • 21
  • 1
  • 3
2
votes
1 answer

DB table with "my type" column

I have a "CustmerCrd" class that containing : 1.object of "Person" (another class) , let's call it per. 2.object of "Color" (enum type) , let's call it color. My mission: I had to create a DataBase table for this CustmerCrd class ,by using the…
user3515151
  • 97
  • 2
  • 10
1
vote
0 answers

sqlalchemy, can I get around creating the table classes?

I recently found out about sqlalchemy in Python. I'd like to use it for data science rather than website applications. I've been reading about it and I like that you can translate the sql queries into Python. The main thing that I am confused about…
Diego-MX
  • 2,279
  • 2
  • 20
  • 35
1
vote
2 answers

LINQ inner join betwenn Enumerable and DB Table

I'm trying to determine which records to delete from a database when a user submits a form. The page has two CheckBoxList one representing the records before modification and one after. I can easily get the selected values that need to be deleted…
ctrlShiftBryan
  • 27,092
  • 26
  • 73
  • 78
0
votes
2 answers

How to use "\dt" in cursor.execute() to get the tables in PostgreSQL? (Django)

In Django, I'm trying to use \dt in cursor.execute() to get the tables in PostgreSQL as shown below: # "views.py" from django.http import HttpResponse from django.db import connection def test(request): cursor = connection.cursor() …
Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
0
votes
1 answer

Table access permission restriction in MS Access

How can I restrict the access of a table just for one specific db user in MS Access by SQL DDL statemets?
The Bitman
  • 1,279
  • 1
  • 11
  • 25
-1
votes
1 answer

Run DB2 Runstats without activity but still get SQLSTATE=01650

After reading many of articles from the internet, I am still not sure what is the actual purpose of DB2 Runstats. As my understanding, DB2 Runstats will "register" the table index to the DB2 catalog, so that next time when the related query run, it…
Panadol Chong
  • 1,793
  • 13
  • 54
  • 119
-1
votes
1 answer

Sybase instance fails to start: Error: 905, Severity: 17, State: 1

My Sybase instance fails to start. Database log show: 00:0002:00000:00001:2015/05/12 15:51:44.51 server The transaction log in the database 'sybsystemdb' will use I/O size of 4 Kb. 00:0002:00000:00001:2015/05/12 15:51:44.52 server Resident…
Shay Salomon
  • 59
  • 1
  • 5