schema

Best software (or other) solution for modeling existing complex MySQL schema

Hi Stack Overflow, What's a good solution for modeling an existing and very complicated MySQL schema. Preferably with the following features: completely visual drill down on click shows keys, indexes gives sample data per field* *as fields aren't always intuitively named Thanks! Emile ...

SQLServer: Problem choosing a default schema for a user

I named a schema wrong, and all the tables are created with a schema of a wrong name. So I created a one, and use alter schema to transfer the tables over. First problem is, SQL Server fails when I try to drop the wrong schema, second, although users were created with the new schema as default, I figure I could simply say select * fr...

Bug Tracker .NET - How to determine version from just the database?

A recent blunder was made where the Bug Tracker .NET software was removed from our server; now we don't have a backup of the installer that was used, only the database. Is there a way to determine the version of Bug Tracker .NET supported by the database backup just based on the schema alone? without manually sifting through the differe...

Can the defaultSearchField in a Solr schema be set to "any or all" fields?

There is a parameter in the Solr schema to set a default search field like so... <!-- field for the QueryParser to use when an explicit fieldname is absent --> <defaultSearchField>detail</defaultSearchField> ...But I would like to search all fields (I have five besides "detail") when the user does not specify. How can I make search a...

Importing Multiple XSD Files into Eclipse's XML Catalog

We presently have about 15 different XSD files that define the many XML configuration files available to developers configuring our project. Is there any convenient way to import all of these into the XML Catalog in a simple pass? Although multiple select would be better than importing the files one at a time (as we presently have to do...

Flexible Persistence Layer

I am designing an ASP.NET MVC 2 application. Currently I am leveraging Entity Framework 4 with switchable SQLServer and MySQL datastores. A requirement recently surfaced for the application to allow user-defined models/entities to be manipulated. Now I'm unsure if a SQL/relational database is appropriate at all; instead of adding/removi...

How do I specify a numeric range of occurences in RELAX NG?

I am developing a schema using RELAX NG. I'm pretty new to this, so it is quite possible that I am overlooking something obvious, but there doesn't seem to be a convenient way to specify the number of occurrences of an element like you can in the XML Schema language. For example, suppose I wanted to specify that an A element may contain...

Add an array to an XSD file to assign users to a permissions specification

I am not a programmer, so this may or may not make sense, but I would like to be able to link an external data file to an XSD file to specify whether a user belongs to a certain group. Without linking, the code currently stands as: <xs:element name="user"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumer...

Proper datastructure for the following...

I want to represent documents in a database. There are several different types of documents. All documents have certain things in common, but not all documents are the same. For example, let's say I have a basic table for documents... TABLE docs ( ID title content ) Now let's say I have a subset of documents that can ...

JAXB: setting complexTypes to use existing java classes.

Currently, JAXB is creating a point class from the xml schema I have specified. However, I would prefer it to use the existing java.awt.Point class. And for any other types I have defined to use and import java.awt.Point too. Here is my point code: <xs:complexType name="point"> <xs:sequence> <xs:element name="x" type="xs:int" /> ...

In RDBMS, is there a formal design principle for Concrete objects, such as Course vs CourseSession?

In designing RDBMS schema, I wonder if there is formal principle of concrete objects: for example, if it is Persons table, then each record is very concrete and unique. Each record in fact represents a unique person. But what about a table such as Courses (as in school). It can have a description, number of units, offered only in Autu...

CakePHP getting data from multiple models

In my CakePHP application I have a model called 'Customer' which describes (unsurprisingly) an individual customer. I then have a 'Sale' model about a sale. (One customer per sale, many sales per customer). Each sale then has a 'car_id' (which maps to the 'Car' model) and an 'engine_id' (maps to 'Engine model'). Currently when I get the ...

Storing user action data in MySQL: one table or many?

I am building a website wherein the users can perform a variety of actions and they get a variable number of "points" or "badges" for performing specific actions. Certain data must be stored no matter which type of action the user performs, such as the user ID, the action type, a timestamp, the current point total, and any badge awarded....

JDBC Change Default Schema

Hi, I'm trying to connect to a sql server 2005 database via JDBC. I get the error: com.microsoft.sqlserver.jdbc.SQLServerException: The SELECT permission was denied on the object 'MyTable', database 'MyDatabase', schema 'dbo'. The schema I use to connect is "MyUser". How do I connect using MyUser as opposed to dbo? Thanks! ...

Entity Framework 4 Generate Database From Model With Multiple Schemas

Hello I am using EntityFramework 4 with POCO classes, but I like to divide the database up into separate schemas. While I can do this designing the database first and then generating the model and everything works fine, if I update the model and select to generate database from model it ignores all my schemas and generates all tables un...

How to store Goals (think RPG Quest) in SQL

Hi, Someone asked me today how they should store quest goals in a SQL database. In this context, think of an RPG. Goals could include some of the following: Discover [Location] Kill n [MOB Type] Acquire n of [Object] Achieve a [Skill] in [Skillset] All the other things you get in RPGs The best I could come up with is: Quest 1-* Que...

Validating an XDocument instance against its own schema reference.

I'm using the XDocument.Validate extension method to validate my instance. Is there anyway to hold an XML instance accountable to its own schema reference? This seems like something that would be fairly implicit. Unfortunately simply loading the instance into an XDocument doesn't seem to perform this validation implicitly. ...

Unable to create schema with Castle ActiveRecord

Hi all, I'm trying to get started with Castle ActiveRecord (following the "Getting started with ActiveRecord" screencast). I created two ActiveRecord classes, one of them named User. I added the relevant strings to the app.config file, and I initialize using: var config = ActiveRecordSectionHandler.Instance; ActiveRecordStarter.Initia...

Doctrine - Problems on a table generation from schema

Hi! I have the following schema for the generation of a table/model class named Account: Account: actAs: Timestampable: ~ SoftDelete: name: deleted type: boolean columns: branch_code: type: integer notnull: true state_id: type: integer notnull: true state_description: ty...

Advice on "schema" for some related data in MongoDB

Hi, I have a project I'm working on and I want to use MongoDb. Description: The programme is a questionnaire for an entity. The entity can be college, faculty or department. A form is captured per year for any of these entities though mostly departments. Queries can be made on any of them. Where needed, the data can be aggregated and u...