schema

adding attributes to an xml document

I have an XML schema and an instance document I get from a customer. For example the document can be: <doc>    <carId>12</carId> </doc> And it is valid according to the schema. I would like to annotate this with my attributes: <doc>    <carId myns:valid="true">12</carId> </doc> I would like the annotated document to be va...

Should sql server schemas be used for logical or administrative grouping?

Is it agood idea to divide my SQL Server objects into schemas based on their logical grouping (a kind of namespace s.a. sales, user, common) or should they be primarily used to create different security boundries? ...

How to better import/export XML to Database, having XML with schema?

Do you know best practicies ? ...

relational database and net structure

The company Microsoft could be referred as "microsoft", "ms" or "m$" etc. We may say these names are alias to one single identity. If you want to store the "alias" relationship, you might have to do it as the following pairs microsoft ms ms microsoft microsoft m$ m$ microsoft ms m$ m$...

Best-Practices for using schemas in SQL Server (2008)

I can see in the AdventureWorks database that different schemas are used to group tables. Why is this done (security, ...?) and are there best-practices I can find? thx, Lieven Cardoen ...

Is there an XSD or similar declaration for Facebook's API method signatures?

I'm developing a generator to create a C# API wrapper for Facebook's API. I'm just about finished with the basic coding, except that there doesn't seem to be any well-formed declaration of the method signatures of all the API methods. I can parse the schema for the element types to figure out what the names of all the methods are (they'...

What is a good MySQL Database Schema tool?

I'm starting a new project soon and I'd like to try to use some better tools this time around. The last project, I wrote all my Database creation SQL by hand for MySQL. I'm hoping there are some good tools out there for creating, maintaining and modifying database schema in MySQL. My budget is out-of-my-own-pocket, so free (as in beer) w...

Where are the schemas for XML files on an Android project?

Where are the schemas (DTD or XML schema) for the XML files used on Android like AndroidManifest.xml or the layouts? ...

How to validate the clients database against my database schema?

Our clients use SQLServer/Oracle databases. Over the years, we've sent them many update scripts which they had to run manually. Most of the time, everything went smooth, but every now and then a script did not run completely to the end or had some errors in it (which weren't detected at the time of the upgrade). Also, sometimes even "sma...

How do you design a schema to efficiently query nested items in a key-value database?

I'm using Mnesia with Erlang, but this question applies to any key-value db like couchdb, etc. I'm trying to break free of the RDBMS thought process, but I can't wrap my head around how to efficiently implement this kind of schema. Say I have a User record, and he has many SubItemA records, which has many SubItem B records, so: User -...

Implementing foreign key type relationships in XSD schema

I'm trying to wrap my head around xml schemas and one thing I'm trying to figure out is how to do relational type schemas where on element refers to another, possibly in another schema altogether. I've looked at the xsd:key and xsd:keyref and it seems like the sort of thing I'm interested in, but I'm not sure. Initially I just set attrib...

Dropping a schema and all of its contents in DB2 8.x

How would I drop a schema and all of its contents, using SQL, in DB2 8.x without knowing what the content is? ...

Modifying tags in a web app. Best practice.

Is there an efficient way for a system to update tags for an item when presented side-by-side in a text box, similar to StackOverflow? In my web app, individual items have tags and I am using a link table between a tags table and the items table to keep some normality. Database schema are discussed here: http://stackoverflow.com/questi...

How to safely update a live website

We have a fairly simple Django-based website for doing CRUD operations. I've been doing testing and development locally and then checking out releases and database schema changes onto the live server once testing is done. We've recently run into a problem when releasing some types of changes. Imagine the following sequence of events: U...

A database schema for Tags (eg. each Post has some optional tags).

Hi folks, I have a site like SO, Wordpress, etc, where you make a post and u can have (optional) tags against it. What is a common database schema to handle this? I'm assuming it's a many<->many structure, with three tables. Anyone have any ideas? ...

Where (or how) should I define the schema in a select statement when using PostgreSQL?

I have an application built upon ASP.NET 3.5 and PostgreSQL 8.3. My database has 3 users, a data owner (xxx-owner), a data editor (xxx-editor), and a data viewer (xxx-viewer). Each user has their own schema called xxx-schema, xxx-editor-schema and xxx-viewer-schema. All the data is stored in xxx-schema. This requires that I specify t...

How can I script an MS SQL Server database with proper object ordering?

I'm trying to script an MS SQL Server 2005 database to a single file. So far I've tried using SQL Management Studio and the MS Database Publishing Wizard. Both tools will script the database objects without a problem although neither tool is scripting objects in the right order of creation. For instance the script might script a view ...

Should the schema always be explicitly defined in the SQL statement?

Earlier I had asked the question: Where (or how) should I define the schema in a select statement when using PostgreSQL? The answer I accepted was to modify the search_path for the connecting user so that the schema need not be specified in the SQL. However, now I wonder if I should always specify the schema in SQL rather than allow th...

How liberal should I be with NOT NULL columns?

I'm designing a database schema, and I'm wondering what criteria I should use for deciding whether each column should be nullable or not. Should I only mark as NOT NULL only those columns that absolutely must be filled out for a row to make any sense at all to my application? Or should I mark all columns that I intend to never be null...

Perl, LibXML and Schemas

I have an example Perl script which I am trying to load and validate a file against a schema, them interrogate various nodes. #!/usr/bin/env perl use strict; use warnings; use XML::LibXML; my $filename = 'source.xml'; my $xml_schema = XML::LibXML::Schema->new(location=>'library.xsd'); my $parser = XML::LibXML->new (); my $doc = $parse...