Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [database]

A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. The data is typically organized to model aspects of reality in a way that supports processes requiring information. Use this tag if you have questions about designing a database. If it is about a particular database management system, (e.g., MySQL), please use that tag instead.

database
5 votes
6 answers
2k views

What's a good way to encapsulate data access with PHP/MySQL?

Most of my experience is on the MSFT stack, but I am now working on a side project, helping someone with a personal site with cheap hosting that is built on the LAMP stack. My options for installing ...
Eric Z Beard's user avatar
  • 38.2k
9 votes
9 answers
18k views

How do I resize and convert an uploaded image to a PNG using GD?

I want to allow users to upload avatar-type images in a variety of formats (GIF, JPEG, and PNG at least), but to save them all as PNG database BLOBs. If the images are oversized, pixelwise, I want to ...
Cheekysoft's user avatar
  • 35.5k
4 votes
2 answers
1k views

Is it possible to share a transaction between a .Net application and a COM+ object?

I did some tests a while ago and never figured out how to make this work. The ingredients: COM+ transactional object (developed in VB6) .Net web application (with transaction) in IIS that... ...
bubbassauro's user avatar
  • 4,181
32 votes
9 answers
9k views

Unit-Testing Databases

This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit testing was one of the requirements. I ran into some trouble when I tried to test against the database. To my ...
pbh101's user avatar
  • 10.3k
36 votes
11 answers
6k views

Represent Ordering in a Relational Database

I have a collection of objects in a database. Images in a photo gallery, products in a catalog, chapters in a book, etc. Each object is represented as a row. I want to be able to arbitrarily order ...
tghw's user avatar
  • 25.3k
497 votes
13 answers
342k views

List of standard lengths for database fields

I'm designing a database table and asking myself this question: How long should the firstname field be? Does anyone have a list of reasonable lengths for the most common fields, such as first name, ...
Patrick McElhaney's user avatar
14 votes
3 answers
3k views

Updating an auto_now DateTimeField in a parent model in Django

I've got two models: Message and Attachment. Each attachment is attached to a specific message, using a ForeignKey on the Attachment model. Both models have an auto_now DateTimeField called updated. I'...
Ellen Teapot's user avatar
  • 1,600
0 votes
4 answers
7k views

Automate Syncing Oracle Tables With MySQL Tables [closed]

The university I work at uses Oracle for the database system. We currently have programs we run at night to download what we need into some local Access tables for our testing needs. Access is getting ...
Clint Davis's user avatar
79 votes
9 answers
90k views

Is there a Profiler equivalent for MySql? [closed]

"Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services." I find using SQL Server Profiler extremely useful ...
Andrew Rimmer's user avatar
892 votes
25 answers
306k views

MyISAM versus InnoDB [closed]

I'm working on a projects which involves a lot of database writes, I'd say (70% inserts and 30% reads). This ratio would also include updates which I consider to be one read and one write. The reads ...
user2013's user avatar
  • 9,251
11 votes
6 answers
2k views

Version track, automate DB schema changes with django

I'm currently looking at the Python framework Django for future db-based web apps as well as for a port of some apps currently written in PHP. One of the nastier issues during my last years was ...
Hanno Fietz's user avatar
  • 31.2k
3 votes
4 answers
1k views

SQL2005: Linking a table to multiple tables and retaining Ref Integrity?

Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote Fields: ID, PropertyID, BespokeQuoteFields... Table: Job Fields: ID, PropertyID, BespokeJobFields... Then ...
littlecharva's user avatar
  • 4,244
129 votes
29 answers
39k views

Favourite performance tuning tricks [closed]

When you have a query or stored procedure that needs performance tuning, what are some of the first things you try?
139 votes
24 answers
49k views

Are foreign keys really necessary in a database design?

As far as I know, foreign keys (FK) are used to aid the programmer to manipulate data in the correct way. Suppose a programmer is actually doing this in the right manner already, then do we really ...
Niyaz's user avatar
  • 54.5k
141 votes
41 answers
16k views

Why do we need entity objects? [closed]

I really need to see some honest, thoughtful debate on the merits of the currently accepted enterprise application design paradigm. I am not convinced that entity objects should exist. By entity ...

15 30 50 per page