Enhanced LINQ to SQL Compatible ORM Solution from Devart

2010-06-14 Thread Julia Samarska
Devart
Email: i...@devart.com
Web: http://www.devart.com

FOR IMMEDIATE RELEASE

CONTACT INFORMATION:
Julia Samarska
jul...@devart.com

11-Jun-2010


Enhanced LINQ to SQL Compatible ORM Solution from Devart

Devart has recently announced the release of LinqConnect - an enhanced LINQ to 
SQL compatible ORM solution with extended functionality, support for SQL 
Server, Oracle, MySQL, PostgreSQL, and SQLite, its own visual model designer, 
seamlessly integrating to Visual Studio, and SQL monitoring tool. 

LinqConnect allows you to quickly create mapping model and generate data access 
layer code for your application, greatly decreasing development time and 
eliminating the need to work over routine tasks. It was developed closely to 
the Microsoft LINQ to SQL technology, while extending its functionality, thus 
allowing LINQ to SQL developer to easily get started with LinqConnect.

In addition to LINQ to SQL features, LinqConnect provides its own advanced 
functionality. LinqConnect has complete support for complex types, allowing you 
to create entity properties with internal structure. With ID Generation feature 
you may just set an attribute for the property to use unique value generation 
for it. LinqConnect caches compiled queries automatically, while allowing you 
to set cache parameters and control caching process. This is just a part of 
LinqConnect unique features.

LinqConnect supports SQL Server, Oracle, MySQL, PostgreSQL, and SQLite. It 
provides the same interface to all database servers, allowing you to easily 
develop applications that are able to use different databases. 

Please, feel free to download, try and write any comments or suggestions about 
our products!

Pricing and Availability

A Single license costs $249.95. To learn more, download trial edition, or order 
a license please visit the Devart site:
www.devart.com/linqconnect/.

About Devart

Devart is a software development company with 11 years of experience on the 
software market and over 20 thousands of devoted users. 

We specialize in providing native connectivity solutions as well as 
comprehensive development and management tools for the most popular databases, 
including Oracle, SQL Server, MySQL, PostgreSQL, InterBase, Firebird, and 
SQLite.

For additional information about Devart, visit www.devart.com/company/. 

# # #

EVALUATION COPY AVAILABLE ON REQUEST


int(10) va int(11)

2010-06-14 Thread Ryan Chan
Assume MySQL int range (unsigned) is from 0 to 4294967295

There are total 10 digits.

Why a lot of tutorial in the web tell you to declare,

e.g.

 CREATE TABLE t1  (f INT(11) UNSIGNED);

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: int(10) va int(11)

2010-06-14 Thread Michael Dykman
11 characters of display allow for any int of any size, signed or
unsigned.  When you do not specify a length attribute in a
declaration, MySQL uses 11 as the default.

For your application, use what makes sense for your problem's domain.

 - michael dykman


On Mon, Jun 14, 2010 at 12:14 PM, Ryan Chan ryanchan...@gmail.com wrote:
 Assume MySQL int range (unsigned) is from 0 to 4294967295

 There are total 10 digits.

 Why a lot of tutorial in the web tell you to declare,

 e.g.

  CREATE TABLE t1  (f INT(11) UNSIGNED);

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:    http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com





-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: int(10) va int(11)

2010-06-14 Thread Daevid Vincent
AFAIK, the number in parenthesis is ONLY for display purposes in formatting
the size of the column in mySQL command line output, NOT the size of the
data that can be held.

I think they use (11) because unsigned will need one extra character for
the minus sign.

INT SIGNED = -2147483648 to 2147483647

Now this changes for things like a CHAR(2) where that *IS the column is
only going to handle 2 characters. Or VARCHAR(10) where that column will
handle from 0 to 10 characters. Same goes for FLOAT(7,4) which means 7
total digits and 4 of them are decimal places.

But for *INT columns, I don't think the same is true. It's cosmetic only.
Someone PLEASE correct me if I'm wrong. It's kind of silly if you ask me.
This one special case just adds confusion.

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

Another extension is supported by MySQL for optionally specifying the
display width of integer data types in parentheses following the base
keyword for the type (for example, INT(4)). This optional display width may
be used by applications to display integer values having a width less than
the width specified for the column by left-padding them with spaces. (That
is, this width is present in the metadata returned with result sets.
Whether it is used or not is up to the application.)

The display width does not constrain the range of values that can be stored
in the column, nor the number of digits that are displayed for values
having a width exceeding that specified for the column. For example, a
column specified as SMALLINT(3) has the usual SMALLINT range of -32768 to
32767, and values outside the range allowed by three characters are
displayed using more than three characters. 

 -Original Message-
 From: Ryan Chan [mailto:ryanchan...@gmail.com] 
 Sent: Monday, June 14, 2010 9:14 AM
 To: MySql
 Subject: int(10) va int(11)
 
 Assume MySQL int range (unsigned) is from 0 to 4294967295
 
 There are total 10 digits.
 
 Why a lot of tutorial in the web tell you to declare,
 
 e.g.
 
  CREATE TABLE t1  (f INT(11) UNSIGNED);
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?unsub=dae...@daevid.com
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



list rows with no recent updates

2010-06-14 Thread MadTh
Hi,


I ran a update command on around 2700 rows inside a mysql database table
which has around 3000 table rows to change the ( say)  price of each item (
with unique ID. unique product code).

like:

mysql UPDATE tbl_xyz  set listprice='9.45' where prod_id='3069' and
prod_code='a0071';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0




How can I list rows with no recent updates ( or the once where the above
updates were not done)  or say with no updates in last 2 hours?





Thank you.


RE: list rows with no recent updates

2010-06-14 Thread Daevid Vincent
The only way I could think of is to have a column that's an auto updated
timestamp and then just query using that time.

`updated_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP

So for your mass update, I'd SET @updated_time = NOW(); and then you could
use that in your future query where @updated_time +/- some fuzzy amount of
seconds.

 -Original Message-
 From: MadTh [mailto:madan.feedb...@gmail.com] 
 Sent: Monday, June 14, 2010 2:02 PM
 To: mysql@lists.mysql.com
 Subject: list rows with no recent updates
 
 Hi,
 
 
 I ran a update command on around 2700 rows inside a mysql 
 database table
 which has around 3000 table rows to change the ( say)  price 
 of each item (
 with unique ID. unique product code).
 
 like:
 
 mysql UPDATE tbl_xyz  set listprice='9.45' where prod_id='3069' and
 prod_code='a0071';
 Query OK, 1 row affected (0.00 sec)
 Rows matched: 1  Changed: 1  Warnings: 0
 
 
 
 
 How can I list rows with no recent updates ( or the once 
 where the above
 updates were not done)  or say with no updates in last 2 hours?
 
 
 
 
 
 Thank you.
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: list rows with no recent updates

2010-06-14 Thread Jim Lyons
Do you have a timestamp field on this table?

There's no way of seeing when a row was last updated unless you have a
timestamp field that automatically updates for any change (that's *any*
change - not necessarily the ones you want to keep track of) or creating
your own and updating them either on the update statement itself or in a
trigger.

You can pretty much tell when the last time an entire table was updated by
the date on the MYD or ibd file.

I'm assuming you don't want to constantly parse the binlog or general log.

On Mon, Jun 14, 2010 at 4:02 PM, MadTh madan.feedb...@gmail.com wrote:

 Hi,


 I ran a update command on around 2700 rows inside a mysql database table
 which has around 3000 table rows to change the ( say)  price of each item (
 with unique ID. unique product code).

 like:

 mysql UPDATE tbl_xyz  set listprice='9.45' where prod_id='3069' and
 prod_code='a0071';
 Query OK, 1 row affected (0.00 sec)
 Rows matched: 1  Changed: 1  Warnings: 0




 How can I list rows with no recent updates ( or the once where the above
 updates were not done)  or say with no updates in last 2 hours?





 Thank you.




-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com


Re: list rows with no recent updates

2010-06-14 Thread MadTh
Hi,


Thank you all for your prompt response. Unfortunately timestamp  file isn;t
there, so I will find some other way to do it.

Seems timestamp  is a valuable field ( unless you want to save resource on
generating timestamps on a very busy table).






Thanks


RE: list rows with no recent updates

2010-06-14 Thread Daevid Vincent
Easy enough to rectify

http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

ALTER TABLE `tbl_xyz` ADD COLUMN `updated_on` TIMESTAMP NOT NULL DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `prod_id`;

Personally I put a 'created_on' and an 'updated_on' column for mostly every
table I create.

3000 rows is nothing. A mere blink of an eye to mySQL. The database I'm
using is almost a Billion (yes, with a B, and I mean a good ol' USA 10^9
Billion, not that goofy long scale 10^12 Billion*) rows and 90GB. So
don't worry about it. Plus it's stored internally as an integer (timestamp)


*http://en.wikipedia.org/wiki/Long_and_short_scales

 -Original Message-
 From: MadTh [mailto:madan.feedb...@gmail.com] 
 Sent: Monday, June 14, 2010 2:23 PM
 To: mysql@lists.mysql.com
 Subject: Re: list rows with no recent updates
 
 Hi,
 
 
 Thank you all for your prompt response. Unfortunately 
 timestamp  file isn;t
 there, so I will find some other way to do it.
 
 Seems timestamp  is a valuable field ( unless you want to 
 save resource on
 generating timestamps on a very busy table).
 
 
 
 
 
 
 Thanks
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



alias problem and odd warnings

2010-06-14 Thread brian

Using 5.1.41/Ubuntu

I have 2 tables, members  countries. The former has a column, 
country_id (tinyint(3) unsigned). The countries id column is the same 
(although auto_increment). I'm trying to select just those countries for 
which there is a member. So I decided this query should do the trick:


SELECT c.id, c.name FROM countries AS c INNER JOIN members AS m ON 
m.country_id = c.id GROUP BY c.id;


And, indeed, it works like a charm. However, I'm using the CakePHP 
framework, which creates a query like:


SELECT `Country`.`id`, `Country`.`name` FROM `countries` AS `Country` 
INNER JOIN members AS `Member` ON `Member`.`country_id` = 'Country.id' 
WHERE 1 = 1 GROUP BY `Country`.`id`;


This not only gives an empty set, but also throws 171 warnings (more on 
that below). I've remove both the WHERE and GROUP BY clauses with no 
success. I've been staring at this for an hour now and can't see what 
the trouble is. Can any of you?



As for the warnings:

Warning | 1292 | Truncated incorrect DOUBLE value: 'Country.id'

I've searched online a bit without success. There was a submitted bug:

http://bugs.mysql.com/bug.php?id=46641

... but I haven't been able to figure anything out based on that (except 
to agree that this error message is definitely not very enlightening). 
Can anyone shed some light?



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: alias problem and odd warnings

2010-06-14 Thread brian

On 10-06-14 09:13 PM, brian wrote:

Using 5.1.41/Ubuntu

I have 2 tables, members  countries. The former has a column,
country_id (tinyint(3) unsigned). The countries id column is the same
(although auto_increment). I'm trying to select just those countries for
which there is a member. So I decided this query should do the trick:

SELECT c.id, c.name FROM countries AS c INNER JOIN members AS m ON
m.country_id = c.id GROUP BY c.id;

And, indeed, it works like a charm. However, I'm using the CakePHP
framework, which creates a query like:

SELECT `Country`.`id`, `Country`.`name` FROM `countries` AS `Country`
INNER JOIN members AS `Member` ON `Member`.`country_id` = 'Country.id'
WHERE 1 = 1 GROUP BY `Country`.`id`;

This not only gives an empty set, but also throws 171 warnings (more on
that below). I've remove both the WHERE and GROUP BY clauses with no
success. I've been staring at this for an hour now and can't see what
the trouble is. Can any of you?


Solved. I just noticed the quoting difference here:

ON `Member`.`country_id` = 'Country.id'

Country.id is entirely wrapped in single quotes rather than the alias 
and column being separately wrapped with back-ticks. I've changed my 
code so that the query is created properly.


I'm still curious about the strange warning, though.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



normalization

2010-06-14 Thread bharani kumar
Frankly speaking ,

Am looking very simple example for 5NF ,

Even i looked the lot of site , in most of the site they given clear
information upto 3NF ,

But can u please tell me , 5NF with example,

Regards
Bharanikumar