One thing I have continually found very confusing about using an object database like db4o is how you are supposed to handle complex migrations that would normally be handled by SQL/PL-SQL.
For example imagine you had a table in a relational database called my_users. Originally you had a column named "full_name", now that your softwa...
I've been working on a web application that is basically a CRUD application (Create, Read, Update, Delete). Recently, I've started working on what I'm calling an "approval workflow". Basically, a request is generated for a material and then sent for approval to a manager. Depending on what is requested, different people need to approve t...
My company has a handful of apps that we deploy in the websites we build. Recently a very old app needed to be included along side a newer app and there was a conflict w/ a duplicate table name needed to be used by both apps.
We are now in the process of updating an old app and there will be some DB updates. I'm curious what people ...
Hi, I'm currently working on wholesale online t-shirt shop. I have done this for fixed quantity and price, and its working fine. Now i need to do this for variable quantity and price.
I am trying to base my design on this reference site.
Basic tables I have created are:
CREATE TABLE attribute (
attribute_id int(11) NOT NULL auto_in...
Hi folks,
I have a very large Oracle database, with many many tables and millions of rows. I need to delete one of them, but want to make sure that dropping it will not break any other dependent rows that point to it as a foreign key record. Is there a way to get a list of all the other records, or at least table schemas, that point to ...
I have a problem with the mapping of Oracle Float double precision datatype to Java Double datatype. The hibernate schema validator seems to fail when the Java Double datatype is used.
org.hibernate.HibernateException: Wrong column type in DB.TABLE for column amount. Found: float, expected: double precision
The only way to avoid this ...
We have a PostgreSQL database. And we have several tables which need to keep certain data in several languages (the list of possible languages is thankfully system-wide defined).
For example lets start with:
create table blah (id serial, foo text, bar text);
Now, let's make it multilingual.
How about:
create table blah (id serial, f...
I'm creating an application that will store geolocation data for specific transactions. Should I store a simple lat/long or is there a more preferred standard? What datatypes should I use to allow for switching to NoSQL in the future?
...
i have taken over a database that stores fitness information and we were having a debate about a certain table and whether it should stay as one table or get broken up into three tables.
Today, there is one table called: workouts that has the following fields
id, exercise_id, reps, weight, date, person_id
So if i did 2 sets of 3 diffe...
Hi,
I need to create XML file, given a table/view in the Database. The actual requirement would be: The code has to get the table/view name as input parameter, read the schema of the same, create a corresponding XML file with the same structure as that of the table/view, and load the XML with the data of the table/view. Language preferr...
Given a [mysql] database with a given schema, is it possible to generate an ORM interface for it? doesn't matter if its php, python or perl.
in other words, I have a database and I have to ask it a few questions. while I could just craft a bunch of SQL queries (okay, several dozen), this is way more interesting to think about.
is this ...
I have a table structure like the following:
user
id
name
profile_stat
id
name
profile_stat_value
id
name
user_profile
user_id
profile_stat_id
profile_stat_value_id
My question is:
How do I evaluate a query where I want to find all users with profile_stat_id and profile_stat_value_id for many stats?
I've tried ...
I am trying to do a Schema Compare in Visual Studio 2010 on some SQL Server 2008 databases. But I get the following error. What does it mean and how can I ignore?
An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Schema.Sql.SchemaModel.ISql100DatabaseEncryptionKey: The user does n...
I just tried to upgrade a Visual Studio 2008 Database project to VS2010 and actually it is quite a mess. Hundreds of warnings, all unsolved references. It seems to boil down to Visual Studio not to understand Schema Names (aka Ownership) anymore. For example, the default dbo schema:
[$(MyDataBase)].dbo.MyTable
is fine but:
[$(MyDataB...
I'm curious about how others have approached the problem of maintaining and synchronizing database changes across many (10+) developers without a DBA? What I mean, basically, is that if someone wants to make a change to the database, what are some strategies to doing that? (i.e. I've created a 'Car' model and now I want to apply the appr...
Hi everyone,
I have a problem that needs me to convert my existing live production (I've duplicated the schema on my local development box, don't worry :)) table column types from enums to a string.
Background:
Basically, a previous developer left my codebase in absolute shit, migration versions are extremely out of date, and apparen...
I have design a database. Theres no columns with indexing, nor any code for optimizing. I am positive i should index certain columns since i search them a lot.
My question is HOW do i test if any part of my database will be slow? ATM I am using sqlite and i will be switching to either MS Sql or MySql based on my host provider. Will crea...
The co-founder of Reddit gave a presentation on issues they had while scaling to millions of users. A summary is available here.
What surprised me is point 3:
Instead, they keep a Thing Table and a Data Table. Everything in Reddit is a Thing: users, links, comments, subreddits, awards, etc. Things keep common attribute like up/down...
Here is the scenario: You have a Persons table with a one-to-many relationship with an Addresses table, where one of the Address rows is the "primary" Address.
Is it better in a normalized schema to
Use a Persons.PrimaryAddressID to access the "primary" Address for a Person
or
Use an Addresses.IsPrimary bit column to reference th...
I am creating a simple email client program. I am using MS SqlCe as a storage of emails. The database schema for storing the message is as follows:
StorageId int IDENTITY NOT NULL PRIMARY KEY,
FolderName nvarchar(255) NOT NULL,
MessageId nvarchar(3999) NOT NULL,
MessageDate datetime NOT NULL,
StorageData ntext NULL
In the StorageData ...