473,386 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Is this true ?

Hello programmers,

is this true ? Could someone please comment on this.
http://www.dbdebunk.com/page/page/611060.htm

I have modeled some Entity Relationship Databases
using only MySQL, which was difficult.

According to what I believe, only connecting a database and accessing
a database is possible with PHP, and in addition creating dynamic web
pages.
To keep track of the users. And some history.

If this is true, then it would be possible to implement any database,
relational or Entity Relationship. Without MySQL.

I simply can't believe missing SQL statements can be remedied with php.

For instance create trigger, how can this be coded in php?

CREATE TRIGGER
Creates a trigger, which is a special kind of stored procedure that executes
automatically when a user attempts the specified data-modification statement
on the specified table. Microsoft® SQL ServerT allows the creation of
multiple triggers for any given INSERT, UPDATE, or DELETE statement.

Syntax
CREATE TRIGGER trigger_name
ON { table | view }
[ WITH ENCRYPTION ]
{
{ { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] [ , ] [
DELETE ] }
[ WITH APPEND ]
[ NOT FOR REPLICATION ]
AS
[ { IF UPDATE ( column )
[ { AND | OR } UPDATE ( column ) ]
[ ...n ]
| IF ( COLUMNS_UPDATED ( ) { bitwise_operator } updated_bitmask )
{ comparison_operator } column_bitmask [ ...n ]
} ]
sql_statement [ ...n ]
}
}

Yours Sincerely

Morten Gulbrandsen
http://www.dbdebunk.com/page/page/611060.htm

MySQL is not a toy database - it is far superior to many I
have used in my long career. The lack of constraints is not
a weakness. It is eminently possible to create reliable
applications without the need for database constraints - I
should know because I have designed and built many
applications that did not use database constraints (mainly
because they were not available). Developers only rely on
database constraints to circumvent their sloppy code.
Anything that can be done within the database can also be
done within application code. I have seen what happens when
poor programmers try to shift logic from their code into the
database - they get it wrong and then blame the database for
their incompetence. I am used to designing and building
applications without relying on database'features', so I
write my code accordingly. It also means that the logic is
maintained in one place and not it bits and pieces here and
there.

--Tony Marston, http//groups.google.com, comp.lang.php

11/07/03

Jul 17 '05 #1
1 1873

On 24-Dec-2003, "Morten Gulbrandsen" <Mo****************@rwth-aachen.de>
wrote:
is this true ? Could someone please comment on this.
http://www.dbdebunk.com/page/page/611060.htm

I have modeled some Entity Relationship Databases
using only MySQL, which was difficult.

According to what I believe, only connecting a database and accessing
a database is possible with PHP, and in addition creating dynamic web
pages.
To keep track of the users. And some history.

If this is true, then it would be possible to implement any database,
relational or Entity Relationship. Without MySQL.

I simply can't believe missing SQL statements can be remedied with php.

For instance create trigger, how can this be coded in php?

CREATE TRIGGER
Creates a trigger, which is a special kind of stored procedure that
executes
automatically when a user attempts the specified data-modification
statement
on the specified table. Microsoft® SQL ServerT allows the creation of
multiple triggers for any given INSERT, UPDATE, or DELETE statement.

Syntax
CREATE TRIGGER trigger_name
ON { table | view }
[ WITH ENCRYPTION ]
{
{ { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] [ , ] [
DELETE ] }
[ WITH APPEND ]
[ NOT FOR REPLICATION ]
AS
[ { IF UPDATE ( column )
[ { AND | OR } UPDATE ( column ) ]
[ ...n ]
| IF ( COLUMNS_UPDATED ( ) { bitwise_operator } updated_bitmask )
{ comparison_operator } column_bitmask [ ...n ]
} ]
sql_statement [ ...n ]
}
}

Yours Sincerely

Morten Gulbrandsen
http://www.dbdebunk.com/page/page/611060.htm

MySQL is not a toy database - it is far superior to many I
have used in my long career. The lack of constraints is not
a weakness. It is eminently possible to create reliable
applications without the need for database constraints - I
should know because I have designed and built many
applications that did not use database constraints (mainly
because they were not available). Developers only rely on
database constraints to circumvent their sloppy code.
Anything that can be done within the database can also be
done within application code. I have seen what happens when
poor programmers try to shift logic from their code into the
database - they get it wrong and then blame the database for
their incompetence. I am used to designing and building
applications without relying on database'features', so I
write my code accordingly. It also means that the logic is
maintained in one place and not it bits and pieces here and
there.

--Tony Marston, http//groups.google.com, comp.lang.php


It seems to me that any non-trivial application should encapsulate their
database access in a class or function library so that any need for
triggers, views or complex data relationships can be coded and enforced
therein. Personally, I wrap the PHP database calls so that I can port
between databases and to provide a central point for tracing if I need to
for debugging or performance tuning. Then I encapsulate the application
access in a class, so that the database structure is independent of the
application.

--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
by: Scott Chapman | last post by:
There seems to be an inconsistency here: Python 2.3.2 (#1, Oct 3 2003, 19:04:58) on linux2 >>> 1 == True True >>> 3 == True False >>> if 1: print "true" ....
3
by: drs | last post by:
I just upgraded my Python install, and for the first time have True and False rather than 1 and 0. I was playing around at the command line to test how they work (for instance, "if 9:" and "if...
35
by: Steven Bethard | last post by:
I have lists containing values that are all either True, False or None, e.g.: etc. For a given list: * If all values are None, the function should return None.
36
by: Remi Villatel | last post by:
Hi there, There is always a "nice" way to do things in Python but this time I can't find one. What I'm trying to achieve is a conditionnal loop of which the condition test would be done at...
14
by: Walter Dnes (delete the 'z' to get my real address | last post by:
I took a C course some time ago, but I'm only now beginning to use it, for a personal pet project. My current stumbling-block is finding an efficient way to find a match between the beginning of a...
48
by: Skybuck Flying | last post by:
Hi, I came across this C code which I wanted to understand etc it looked like this: if (-1) etc It made me wonder what the result would be... true or false ? In C and Delphi
30
by: Jason | last post by:
I am fairly new to ASP--I have been using it about 2 months. I did these tests (below), and it doesn't make sense to me. False is equal to 0, and that's fine. True should be equal to 1, but it's...
90
by: John Salerno | last post by:
I'm a little confused. Why doesn't s evaluate to True in the first part, but it does in the second? Is the first statement something different? False print 'hi' hi Thanks.
2
by: Ultrak The DBA | last post by:
Using the following query: select substr(reg_var_name,1,24) as reg_var_name, substr(reg_var_value, 1,12) as reg_var_value, level from table(sysproc.reg_list_variables()) as registryinfo; I am...
40
by: nufuhsus | last post by:
Hello all, First let me appologise if this has been answered but I could not find an acurate answer to this interesting problem. If the following is true: C:\Python25\rg.py>python Python...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.