Example code taken from another SO Question
var test = context.Tests
.Include("Question.QuestionLocale")
.FirstOrDefault();
If your DB schema needed to change for some reason, how could a developer possibly deal with hard-coded values used in a method that takes a string parameter (Include method us...
I'm new to SQL and could use some help in creating a database schema for my program, which manages and installs programs for my home network. Are there any guidelines/tutorials for creating database schemas?
...
Additional questions regarding SilentGhost's initial answer to a problem I'm having parsing Twitter RSS feeds. See also partial code below.
First, could I insert tags[0], tags[1], etc., into the database, or is there a different/better way to do it?
Second, almost all of the entries have a url, but a few don't; likewise, many entries ...
Trying to implement a rating system of users and postings.
What is the best schema for managing the multiple reputations.
A user has a reputation derived from postings and feedback(similar to SO).
Postings have a reputation too (again similar to SO).
My initial idea as to have one reputation table. The rows would correspond to the...
Hey guys -
here's a more general question on how you handle database schema changes in a development team.
We are a team of developers and the databases used during development are running locally on everyone's box as we want to avoid the requirement to have web access all the time. So running a single central database instance somewhe...
For my application I have to support update scenarios and the database might be affected.
I want to be able to update from an old version to the newest without installing intermediate versions. E.g. Suppose I have version A (the oldest), B (intermediate) and C (new version). I want to be able to update version A straight to version C. ...
We have a large XML file with lots of data relationships and lots of data. Is there a way to generate a DB schema based on the relationships and then load the data into the schema?
...
If it matters as of now I'm using
MySQL/MyISAM but I'm open to using
PostgreSQL. I'm also open to using memcached.
Consider a table that's used to store forum threads:
id forum_name post_date
1 Hey! 2009-01-01 12:00:00
What's the best practice of storing thread-related entities such as votes, views, and counters?
S...
Hi,
I want my database to support multi Languages for all text values in its tables.
So what is the best approach to do that?.
Edit1::
E.G.
I've this "Person" table:
ID int
FirstName nvarchar(20)
LastName nvarchar(20)
Notes nvarchar(max)
BirthDate date
...........
So if i want my program to support new language "...
I have a view that is built on multiple tables from different users schema. By virtue of the currently logged in user, he is able to see the table from different schema. When the view is created the table name becomes ambiguous as the user have access to the same tables from the different schema.
Is there any way to specify to use the ta...
Given a Postgresql table schema:
create table thing (
id serial primary key,
key text,
type int references thing,
latest_revision int default 1,
created timestamp default(current_timestamp at time zone 'utc'),
last_modified timestamp default(current_timestamp at time zone 'utc')
);
$for name in ['key', 'type',...
I understand the need to have referential integrity for limiting specific values on entry or possibly preventing them from removal upon a request of deletion. However, I am unclear as to a valid use case which would exclude this mechanism from always being used.
I guess this would fall into several sub-questions:
When is referential i...
Hi
I'm using ASP.NET Membership. I'm runnig it on a shared hosting site where I have an db schema I run things off.
In the scripts to generate the DB on the server I changed the schema from 'dbo' to this other schema; on the tables, views and SP's.
Thing work fine, with everything except the Membership; I'm able to contact the DB and pul...
What is the best database schema for polls? Is one-to-many relationship good for this? I'm thinking about having two tables:
poll_questions
int id
varchar body
datetime created_at
datetime updated_at
poll_answers
int id
varchar body
int votes default 0
int question_id (foreign key to poll_questions.id)
...
Hi all.
I need a software that let me compare and synchronize two database on two different server.
I found this, and was great until i deploy the site and put the database online.
Now I can't connect to remote server.
The standard port of SQL server is opened to my IP.
Anyone use it?
Do I miss something?
Does anyone know a better soft...
Hi
does anybody know of a tool that will allow for viewing of database schemas and the data within it? Im using a Mac and need to view a mySQL database. Basically something like phpmyadmin that runs as more of a stand-alone app and can connect to any mySQL db.
I have found Aqua Data Studio but it is too expensive.
Thanks for any...
It seems that org.hibernate.cfg.Configuration object can be used to perform validation programmatically, by calling the validateSchema method.
However, this method needs dialect and databaseMetadata objects.
I am using Spring and I can get a hold of AnnotationSessionFactoryBean object from spring context. So far I have the following co...
We deploy multiple instances of multiple databases to multiple sites. These sites all have their own DBAs. Here at head office we would like to monitor all the satellite databases and get a notification when any of the schemas change (table structures, stored procs, views etc).
Is there any tool available that can perform this function...
I have an existing database in mysql. One of my tables has discontinuous ids. I would like to modify the ids of the table so that they go from 1 to num-of-rows.
This particular tables does not happen to have incoming references, so the ids can be changed without modifying other tables.
The reason I want to do that is that I want to pro...
I have a dimension (SiteItem) has two important facts:
perUserClicks
perBrowserClicks
however, within this dimension, I have groups of values based on an attribute column (let's call the groups AboveFoldItems, LeftNavItems, OnTheFlyItems, etc.) each have more facts that are specific to that group:
AboveFoldItems: eyeTime, loadTime...