ddl

what is ddl and dml

can you please help me understand from scratch about DDL & DML ... ...

SQL Server denormalization question - store user data in 1,3, or 21 tables?

A section of our web site calls for asking the user 20 multiple-choice questions about themselves (a "profile"). This part of the web site will be frequently viewed, and occasionally updated. The web site is expected to develop a high amount of traffic, so some consideration is being given to try and prepare for performance issues. Th...

Oracle index is defined identically to constraint

I am having an issue with Oracle SQL Developer where it keeps telling me my index "Index PK_TBLCASENOTE is defined identically to constraint PK_TBLCASENOTES" whenever I go to the Indexes section of my table TBLCASENOTE. I found this Oracle form post but no one seems to have a solution. This is the DDL for making the table. CREATE TABL...

Test Column exists, Add Column, and Update Column

I'm trying to write a SQL Server database update script. I want to test for the existence of a column in a table, then if it doesn't exist add the column with a default value, and finally update that column based on the current value of a different column in the same table. I want this script to be runnable multiple times, the first time...

Hadoop/MapReduce: Reading and writing classes generated from DDL

Hi, Can someone walk me though the basic work-flow of reading and writing data with classes generated from DDL? I have defined some struct-like records using DDL. For example: class Customer { ustring FirstName; ustring LastName; ustring CardNo; long LastPurchase; } I've compiled this to get a Customer class ...

VBA for Access 2003 - DDL help with creating access file: setting the Autonumber data type

So I have the below VB that creates an access file in the default workspace, creates a table, create some fields in that table...just need to know the syntax for setting the first data type/field to autonumber...GUID, Counter, etc will not work as in Access SQL ' error handling usually goes here dim ws as workspace dim dbExample as dat...

Find and replace table/field names in Access?

I've been handed a rather large, old, and crusty Access 2000/2003 database to clean up. I'll need to rename a number of tables and fields, but need to do so in a way that doesn't break existing queries. (Fortunately, there are no macros, forms, or reports to worry about.) I've heard there are some commercial tools to make this job easie...

SQL Server 2005 Create Table with Column Default value range

Trying to finish up some homework and ran into a issue for creating tables. How do you declare a column default for a range of numbers. Its reads: "Column Building (default to 1 but can be 1-10)" I can't seem to find ...or know where to look for this information. CREATE TABLE tblDepartment ( Department_ID int NOT NULL IDENTITY, Departm...

Are there tools to generate a ddl schema from JDO annotated pojos?

Perhaps i'm wandering down the wrong path - I'm looking for a tool like hbm2ddl. I currently have domain model (pojos with JDO annotations) - I need to setup the database. I want to experiment with a few database types - HSQLDB, Google App Engine, Oracle. Can anyone offer advice on how to proceed? ...

Is there any free/open source software/tool which can generate DDL out of a VSD file ?

Hi, Is there any software/tool which can be used to generate DDL(Data Definition Language) from the ER Modal diagram ? Currently I am using Microsoft's Visio Architect to generate DDL from a VSD file. I want an open source or free software which can serve the same purpose. ...

How do i change query of MS Access 97 file using MS Access 2007

Hi guys, I am adding a small feature in a program that uses access 97 db. The change is to add a one single field in a table A. There is one query which selects certain fields from that table. Now I need to add the field in that query too. I have added the field using DDL SQL statment from query builder screen. But now I need to add t...

Superkey vs. Candidate key

What difference between Super and Candidate key in ERDB? Thanks. ...

ADO.NET and ExecuteNonQuery: how to use DDL

I execute SQL scripts to change the database schema. It looks something like this: using (var command = connection.CreateCommand()) { command.CommandText = script; command.ExecuteNonQuery(); } Additionally, the commands are executed within a transaction. The scrip looks like this: Alter Table [TableName] ADD [NewColumn] bigi...

How can I create a sequential SQL creation script for Oracle?

Something like: create table Employee( ID int primary key, Name nvarchar(200) IDArea int foreign key references Area(ID) ); go create table Area( ID int primary key, Name nvarchar(200) ); Does something like this exist in Oracle? ...

Free/OSS Data model diagram generator from DDL

I am looking for some free/oss to reverse engineer from DDL a data model diagram. My database is Oracle if that matters. Do any exist? ...

Oracle SQL script giving errors!

I get this error when trying to run this Oracle SQL script. Any help please? Error messages ((29,21) expected token:; [ ) * + , - / = > DROP WHERE HAVING AND OR NOT ON JOIN FROM GROUP ((34,21) expected token:; [ ) * + , - / = > DROP WHERE HAVING AND OR NOT ON JOIN FROM GROUP ((39,21) expected token:; [ ) * + , - / = > DROP WHERE HAVI...

Execute DDL from hibernate

I know that SchemaExport should be my friend. But I am using liquibase and want to execute the DDL - pure sql statements - generated from liquibase to recreate the database before every test method. Do you see problems with the following code? I wonder that this seems to be so complicated ... public static int executeScript(String sqlF...

Oracle's dbms_metadata.get_ddl for object_type JOB

I'd like to create ddl scripts for most of my database objects. dbms_metadata.get_ddl works for most of the object types. For instance the following creates the ddl for a view: select dbms_metadata.get_ddl ( 'VIEW', 'SAMPLE_VIEW') from dual On the other hand it's not working for object_type 'JOB'. The following: select dbms_metadata....

Converting MySQL DDL to SQL Server DDL

I have a model that was generated for MySQL 5 but now I need to create these tables on a SQL Server installation. It's been years since I mucked with SQL server and I want to make sure I can convert this script to be compatible. I don't really know what to look for TBQH, so without further ado, here's my MySQL DDL CREATE SCHEMA IF NOT...

Does anyone know of a data description language for products?

Is there any kind of data description language / XML schema to address describing different kinds of products? I can't find anything of the sort. I'm looking to make something like that, but thought I 'd ask if something was already there first. ...