schema

Lookup tables for basic user input?

Data like Birth month, day and year, user's age, Gender/Sex, etc. Should these be stored as text or ID based in database? ID based means they will have lookup values. Usage is for example: User signup will record age, user profiles will have a seeking partner age, etc so age and other data can be used in multiple places. In backend there...

primary key in linked csv using schema.ini somehow?

For a number of reasons I have to use a linked csv file in a sqlexpress database. Col1 is always unique, although the data changes periodically, based on current logins. Is there a way to set as a primary key in some manner using the schema.ini or some other way? ...

Using sql tables with the same name on different schemas

Hi, Does anyone know of any white papers available that discuss the use of tables with the same name existing on different schemas? I'm implementing on SQL Server but I imagine the theory can be applied to any RDBMS. Thanks, Gary ...

Optimal way to store units of measure for Stock items

Hi all, Assuming a schema structure as such. ----------------------------------------- Stock (ID, Description, blah blah) ----------------------------------------- StockBarcode (ID, StockID, Barcode, Price, blah blah) ----------------------------------------- What is the optimal way of storing units of measure for your stock items? G...

Retrieve DataTable info for a table in SQL Server

I need to get the column names, primary keys, foreign keys, and other schema info. The DataTable class seem to contain all of those. Below is the current code I got so far. With it I could retrieve all info except the foreign keys. I'm expecting them to be defined in DataTable.Constraints but they are not. This is my current code: ...

Storing user data as text or ID based using lookups?

Is there any benefit to storing Days of weeks, Months, Week number, user age, etc as Lookups vs plain text entry into the database? I am creating a social website with some analytic and planning to use a Question table, Answer table and Question_Answer table to store all the data like Gender, Birth months, Age, etc so I can give each an ...

Easiest Way To Diff Two Table Schemas In SQL Server 2008?

I have to do checks between a development and release database and do this manually, which is both slow and not 100% reliable (I only visually inspect the tables). Is there a quick and easy way to compare table schemas automatically? Maybe even a feature that does this built right into SQL server? Edit: I'm comparing structure only, t...

XML to DynaBeans from only xsd. Possible ?

Hello, my question seems simple but I'm going crazy :) Is there a way, using JAXB, Castor or XStream to convert XML into DynaBeans, considering that I have the xsd schema but no precompiled mapping classes and no ObjectFactory or similar ? Blaise Doughan suggested to use MOXy (thanks again, Blaise) but unfortunately I have no permissio...

Adobe Flex 4 XML validation against XSD

Is there any way using any of the standard XML tools or E4X tools in Flex 4 (Adobe Air WindowedApp) for me to validate an XML against an XSD schema I have created? ...

Synchronize New Database Schemas with existing DB using SQL Script

I have a database with Data and I have another same database, but I did changes in tables, relations etc. Now I want to update DB schema with the new one that I have modified, but using SQL Script. ...

XML Schema Binding / Object Model Framework in Cocoa

New to XSD here. Has anyone found or written a framework for working with XML schema object model in Cocoa/Obj-C? What I really need is the ability to define permitted types of modifications to an NSXMLDocument, as described in an XSD File. This includes defining sequences of child elements, list of attributes and their permitted valu...

heroku not updating database schema

Hello, Heroku doesn't seem to update my database schema when I deploy. Here are the details: Here is what is should look like for the User class: create_table "users", :force => true do |t| t.string "username" t.datetime "created_at" t.datetime "updated_at" t.string "email" t.string "encrypted_password" t.string "salt" t.strin...

List of database table types and security permissions?

I can't find any list for the various table types and if possible the basic default 'good practice' security permissions for tables types. I am referring to a complete list like this: http://www.databasejournal.com/features/oracle/article.php/3616476/Types-of-Tables-in-Oracle.htm The above list has few general but not in depth like Look...

Access Project Recognizes Schema as NetworkID

I created a new MS Access project against a SQL Server 2008 database using windows based authentication. (UPDATE: Now using Login Credeitnals, same results though) I have some tables in the (dbo) schema and some I made in a (prj) schema. In the access project itself, prj is not recognized but the dbo are. Looking at the access table l...

Recreate database schema on another system?

I have access to a remote Oracle database with a schema consisting of may tables but no data. I'd like to recreate this schema on my local database system for testing purpose. How would I go about this? Are there any utilities that can help with this? Also, if the 2 Oracle database versions are different would that be a cause of any con...

SOAP Response Schema Validation

Short version: I'm trying to write an XSD that will validate my SOAP service's responses. I feel compelled to just import http:// schemas.xmlsoap.org/soap/envelope/ instead of redefining the SOAP elements like Envelope, Head, and Body, but that xmlsoap.org schema definition of Body is too broad for my use--as soon as I import the SOAP ...

DTD: How to declare a DTD to must have a element value ?

Hi, I want to declare my DTD to force the XML node should have a value. For example I have the following XML structure. <Employees> <EmployeeID></EmployeeID> <EmployeeName></EmployeeName> <EmployeeAddress></EmployeeAddress> </Employees> I want the EmployeeID node value must exist for all the XMLs. So I want to create a DTD t...

Possible to programmatically ALTER multiple MySQL tables?

I have multiple MySQL tables with names of the form "Shard_0", "Shard_1", "Shard_2" ... "Shard_n" All of them have identical table structure. They all live in the same database. Say I want to add a column to all those tables. Is there a way to do that programmatically? Something like: # pseudo code for i in range(n): tablenam...

Migrating and Backing up Schemas (complex database structures)

Hey guys, I need to figure out a way to back up and also migrate our Oracle database from our production schema to the dev schema and the other way around. We have bunch of config tables that drive how systems on our platform run, and when setting up new systems or doing maintenance, we need to update our config tables. We want to be ab...

NHibernate SchemaUpdate adding existing foreign keys again?

I'm using SchemaUpdate to synchronize my hbms with existing database. Database has recently created based on hbms and is completely up-to-date. But SchemaUpdate generates all foreign key constraints again. For example suppose you have Student and Teacher. Student has association to Teacher with name ArtTeacher. ArtTeacher is a foreign ...