schema

Appropriate way to structure a database table? (empty columns vs. multiple tables)

Let's say we have a object called a Widget, for which we can construct a database table. Now, let's say we have two sets of additional detail to describe widgets. Each set of data is available at a separate time. So, let's say our widgets have three phases to their life-cycle... In phase 1, we simply have a widget with a name and a des...

DB Schema for Storing Edit-History

I am designing a system which will include a history of edits made to user posts. I expect roughly 1/3 of the posts made by my users to include edits of some kind. Most of those will have only a handful of versions. Reaching the double digits will be very rare. What is the best schema to represent this data in the database? What tables ...

Date / Time reference table needed for Analytic?

Is it better to keep Days of month, Months, Year, Day of week and week of year as separate reference tables or in a common Answer table? Goal is allow user content searches and action analytic to be filtered by all the various date-time values (There will be custom reporting for users based on their shared content). I am trying to ensure...

Help regarding the XML schema validation in JavaScript

I am currently working on a scenario where I am converting an input flat file (.txt) to an output XML file using JavaScript. I might have a requirement to validate that output XML file against a 5000 lines XSD. So, could someone please help me with the advantages or disadvantages of doing a schema validation within a JavaScript functio...

Adding schema information to xsl transformation output

Hi When performing an xsl transformation on an xml document, I need to add the following snippet to the xml output: <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:ResourceForm:-myXSD-2010-08-09T08-39-43" solutionVersion="1.0.0.68" productVersion="14.0.0.0" PIVersion="1.0.0.0" href="http://somewhere.com/ResourceF...

Pick column with default value or column with user defined value if not null ?

I'm working on a webapp with a set of data that users can browse and edit. Users want to customize one of the fields that appear for each item, say "product_name". Each product has a set of default values in a table, which is the same for all users: The product table would be like (skipping syntax cruft, you get the idea): CREATE TA...

Use SQL Information to Populate Schema Documentation and Code Comments Using Hibernate Tools?

I have set up Hibernate Tools from within Eclipse to autogenerate classes based on an existing DB. For each of the tables I have documented them and each of their columns within SQL Server. Is there a way to use that documentation information to comment the generated classes and to populate the schema entity documentation? I see that ...

Products - data schema

I am designing the tables for the products module. One issue is ingredients. I want to filter products by ingredients. So to do this then I guess each ingredient must be stored in the DB separately and given an ID also? But lets take a supplement. It may have 50 ingredients. So if there are 1 million products to store and each has 50 ing...

DB Schema for Facebook like Wall + "Shared links"

Hi, I am making a db schema for facebook like wall structure. I need to save wall posts, share a link, share a video stuff into my database. Till now I am able to make this schema : GO CREATE TABLE [Wall] ( [ID] [int] NOT NULL IDENTITY(1, 1) , [PostText] [nvarchar](MAX) [PostedByUserID] [int] NULL , [PostedO...

RDB schema conversion to XML Schema

Hi, We are developing a project, with the concept of database virtualization, i.e considering more than one database as a single datbase so that in user view only one database exists for that we need to prepare common XML schema. So we need reading the schema information from the RDB and converting into XML. The RDB includes 'table nam...

OleDbConnection s FillSchema doesn't change after alter table (Oracle)

Hi, I got a problem when using OleDbConnection in combination with an oracle Database. When i request the schema of an existing Table using the OleDbConnection's FillSchema Method the result seems to get cached somehow. To reproduce the Problem you need to do the followin steps: create a table named cachetest with one column Request ...

Multilanguage content tables Q

So I have 1 Content table for storing all system text. (it is a user content website) content_id, Keyword, en, fr, ea, sp, ........ (each of these columns refers to a language ID from the language lookup table). This is fine upto here, but now how do I translate the data stored in other tables - in the lookup tables such as City names...

Database schema design for schedules

Hi! I have two tables: Companies and Employees. I also have a relation table Employs which contains the foreign keys company_id, employee_id as a composite primary key. Note: employees can work at multiple companies. I would like to have another table EmployeeSchedules which simply contains schedules (company_id:integer,employee_id:in...

<userSettings> in app.config Could not find schema information for the element 'userSettings'

Hello when I try to add parameters to the settings table I get multiple messages for each parameter I add. e.g.: Could not find schema information for the element 'userSettings' Could not find schema information for the element 'setting' Could not find schema information for the attribute 'serializeAs' In the app.config I get: <pr...

How do I set a schema level default engine? [MySQL]

I'm trying to set a default database engine for each of my MySQL schemas, but I can't seem to find out how to do that. I know it's possible to specify the engine at the table level, and in the config file with --default-storage-engine=type, but isn't there a way to set it at the schema level? ...

How to automate generating XML instances from XSD files, using Eclipse MDT XSD project?

I am working in a project where we create XSD schemas, and would like to generate sample xml instances for testing purposes. In eclipse, there is an XSD editor that has the option Generate > XML which does it by a click of a button. But I would like to convert this mouse click to a Builder, Maven or Ant task. Any ideas of how to do it? ...

Eclipselink: modifying the deploy.xml and entities using java code

I have built several applications using Eclipselink and the EL Workbench to generate entity files and all necessary configuration as a deploy.xml file. For my next project, I would like to be able to modify the deploy.xml at runtime, using some sort of XML API, and be able to generate the revised entity files and ideally manipulate the ...

SQL Server 2005 Schema Ownership & Domain Accounts

Greetings all, In SQL Svr 2005 I created a new schema for my database called GSOC whose owner is dbo. I then created a local SQL user account with the default schema set to GSOC - my new schema name. I have one View that I want this schema to control access to, so I added the local SQL account to the View's permissions granting SELECT p...

Is it a good practice to let Hibernate create the tables automatically using <property name="hbm2ddl.auto">create</property> ?

I know that adding "hbm2ddl.auto"=create Hibernate will create the tables automatically reading the mapping from the hbm / the annotation. Please let me know that if this is a good practice to follow and why? ...

vb.net - Getting the Xpath of XSD schema elements

Can the Xpath of XSD schema text() elements be retrieved in vb.net? For example, how can you get this Xpath from the following schema; parent/child/grandchild <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSche...