ORACLE - tables
Hi, After entering code to create a new table in SQL ORACLE, would the changes be saved if I was to log out of the SQL Session? ...
Hi, After entering code to create a new table in SQL ORACLE, would the changes be saved if I was to log out of the SQL Session? ...
I am using perl DBIx::Class ORM and would like to be able to dynamically generate an XSD either from the DBIX::Class schema or directly from the SQL DDL. I know it would probably be better that we start with XSD and generate our SQL DDL from the XSD but we are not in a position to do that yet. thanks, Tom ...
FYI: SQL Server 2005 I have a database user account (user_web) that has the ability to connect to and run queries and stored procedures in my database. Specifically, I have given the user the db_datareader and db_datawriter roles as well as granted them execute permission on the specific stored procedures it needs to be able to run. In...
I'd like to have all DB DDL code under CVS. We are using Subversion for our .NET code. But all Database code remains still unversioned. All we know how important DB logic can be. I've googled but I've found only few (expensive tools) I believe there exist other (cheaper) solution(s) I'm wonder your approach. How do you implemente...
I am building a database of online offers. Each offer can be viewed in one or more countries, for instance an advertiser may be interested in reaching offers in the US & Canada. The list of countries we are covering is about 50 long with each country identified with an ISO standard two letter acronym like US, CA, GB, FR, DE, etc. I cou...
We've got a view that's defined like this CREATE VIEW aView as SELECT * from aTable Where <bunch of conditions>; The "value" of the view is in the where-condition, so it is okay to use a Select * in this case. When a new column is added to the underlying table, we have to redefine the view with a CREATE OR REPLACE FORCE VIEW aView...
Hi there, not sure if the subject entirely conveys what I'm trying to achieve, but let me explain: We are building an application that uses Oracle as storage backend. Each year, last years dataset will be "Archived", and a new instance created and populated from scratch. What are the options to do this within the same schema? Keep ve...
In Informix, I can do a select from the systables table, and can investigate its version column to see what numeric version a given table has. This column is incremented with every DDL statement that affects the given table. This means I have the ability to see whether a table's structure has changed since the last time I connected. I...
CREATE TABLE PERMISSIONS( ID BIGINT NOT NULL PRIMARY KEY, NAME VARCHAR(255) NOT NULL, UNIQUE(ID) ) CREATE TABLE ROLES( ID BIGINT NOT NULL PRIMARY KEY, NAME VARCHAR(255) ) I want to run this in MySql. When I try to execute separately each create-query everything works fine but they don't work together. I thought that separ...
For Postgres is there any sort of command line utilities that allow a database to be "dumped to a file" and that allow that same database dump to be imported? I know this can be done through PGAdmin, but I need to be able to do this on the cmd line. ...
How would one write a sql server DDL script that can: For each table in database: add column CreatedBy add column CreateDate add column UpdatedBy add column UpdatedDate Also, if the particular column already exists on the table, just skip that column. Also, the reverse of it, for each table, drop those 4 columns. ...
I have read only access to a few tables in an Oracle database. I need to get schema information on some of the columns but i'm having trouble doing so. I'd like to use something analogous to MS SQL's sp_help. I see the table i'm interested in listed in this query. SELECT * FROM ALL_TABLES When I run this query, Oracle "tells me table ...
I need to execute a bunch of (up to ~1000000) sql statements on an Oracle database. These statements should result in a referentially consistent state at the end, and all the statements should be rolled back if an error occurs. These statements do not come in a referential order. So if foreign key constraints are enabled, one of the stat...
I've created the following classes and use the automap functionality of fluent to automatically generate my database: public interface IBaseClass { int Id { get; set; } DateTime CreatedOn { get; set; } } public interface IApplicant : IBaseClass { string Firstname { get; set; } string Lastnam...
I make DDL changes using SQL Developer's GUI. Problem is, I need to apply those same changes to the test environment. I'm wondering how others handle this issue. Currently I'm having to manually write ALTER statements to bring the test environment into alignment with the development environment, but this is prone to error (doing the s...
I'm having trouble figuring out how to create a foreign key constraint. My data model is fixed and out of my control, it looks like this: CREATE TABLE Enquiry (Enquiry_Ref INTEGER PRIMARY KEY CLUSTERED, Join_Ref INTEGER, EnquiryDate, EnquiryType...) CREATE TABLE Contact (Contact_Ref INTEGER PRIMARY KEY CLUSTERED, Surname, Forenam...
I have a table with two child tables. For each record in the parent table, I want one and only one record in one of the child tables -- not one in each, not none. How to I define that? Here's the backstory. Feel free to criticize this implementation, but please answer the question above, because this isn't the only time I've encountered...
I have created a MySQL database using MySQL Workbench. It has about 20 tables. I cannot figure out how to run scripts on the database. Basically, I want to make a database creation script which will allow me to create my database on any other MySQL server. ...
Seems like max table comments length in mysql is only 60 characters. I'm developing an aplicacion in php symfony, which automatically generates sql ddl sentences, and in many cases those comments are far beyond 60 characters. Is there some way to increase that limit? thanks a lot ...
Reading about WPF and thinking about my application's data store at the same time led me to wonder if there are any languages or tools that allow you to define relational data in a declarative way? A shallow Google search suggests no such thing exists. Yet it seems so obviously useful. The kind of tool I have in mind would declaratively...