Developers should know that using those non-standard SQL commands (such as Oracle, Microsoft and MySQL and other database systems) have fairly high degree of risk. That is to say, from the perspective of cross-platform and compliance, you should try to use ANSI SQL, which is a database language that is unrelated to the platform. No matter which database system you are using, if it fully supports SQL, it should support the ANSI SQL-92 standard. However, "should be supported" and "indeed support" is completely two yards. When performing a DBMS cross-platform programming, not all systems fully support the ANSI SQL standard. This article is to propose risks and related recommendations that exist when using non-standard SQL.
Don't use the stored procedure in some programming environment, for efficiency and security, the stored procedure is the only way for programmers develop database applications. Visual Basic, C and Java programmers don't need to know SQL. However, in other certain programming environments, the stored procedure is completely disabled. MySQL is usually used in combination with the Apache web server, because the two software is not only free, reliable and powerful, but, it is just Mysql does not support stored procedures. -------------------------------------------------- ------------------------------
The definition of the stored procedure so that the stored procedure is a set of SQL statements that make up a logical unit and perform special tasks. The stored procedure is used to encapsulate a set of operations or queries for the database server. -------------------------------------------------- --------------------------------------------------------. Very convenient. However, if you are sensible, don't expect them, you can't guarantee if the database administrator is locked, deletes, or modifies these stored procedures. If you find some of the stored procedures available, you need it, you can use their features in your own code. Typically, you can use the stored procedure on Oracle or SQL Server but you cannot use on MySQL. If you really use them, then you have to ensure that you have not used commands related to a specific platform (discussed later).
Don't use the connection connection is a headache that is a headache on the two DBMSs of Oracle and SQL Server, because the two systems have fundamentally different concepts. Basically, the connection works of each DBMS is not always the same, and you can ultimately get an unexpected result collection. Before we talk about the conceptual differences of each system, how to solve these problems, you should understand the basic connection clause: Connecting the Join (Connection) Creating a command from multiple data sources to obtain data. Connect Equi-join acquire data from two independent data sources and combine them into a big table. Inner / Outer Connection (Inner Join) connects the internal columns of the two tables. The external connection connects the external columns of the two tables. Left / Right Connect Left Join Connect the columns on the left of the two tables. The right connection is connected to the columns on the right side of the table. Composite / complex connection to other various connections - left / internal, left / outside, right / within and right / outer, etc. Anyway, you have to remember, if you want your own application, you can work on a variety of database servers, don't use the connection. ANSI SQL: CREATE, DROP, ADD, UPDATE, DELETE, INSERT, SELECT In summary, the unique command you should use is as follows: Data Definition Language (DDL) Create and DROP. Add, Update, Delete, and INSERT under Data Operation Language (DML). Get the data of the data. If you use a case-sensitive table or field name in these commands, or these names contain spaces or other special characters, then you should use square brackets to surround the name. This helps prevent non-standard characters from causing abnormal reactions of DBMS. The integrity of references: the decisive reason for the use of relational databases, and data types is the relationship between data and maintain those relationships. This will allow developers to store data in a minimum redundancy and most efficient way. The key defines a relationship. The data type defines the rules for storage and operation data. These are the basic aspects of a database, but the specific syntax may vary depending on the database. There are only a few data types that have fewer data types to get support for all database servers. Every DBMS has its own data type and why they use them. Some proprietary data types (such as the AUTONUMBER of Microsoft Access "are actually very convenient.
The following is an ASI data type: Bit, Character, Date, Decimal, Double Precision, Float, Integer, Interval, Numeric, Real, Smallint, TimeStamp, Time, Varbit, Varchar, Char The following are "standards" standards for Oracle / Access / SQL "Data Type: Interval, Time, Varbit Only Oracle supports DATE, but the following" Standard "data type is not supported by Oracle: Bit, Decimal, Numeric, TimeSTAMP" Standard "data type is not supported by Access, Character Such Date, Numeric, Smallint, TimeStamp, only the following data types can be used to use: Double Precision, Float, Integer, Numeric, Real, Smallint, Varchar, Char Main / Foreign key assumes a table There are two fields, create the syntax of this table as follows: create table [MyTable] ([Fielda] varchar, [fieldb] varchar); In order to add a primary key to the only logo in the table, you can use Primary Key Expressions. : Create Table [MyTablea] ([RECORDID] VARCHAR PRIMARY Key, [Fielda] varchar, [fieldb] varchar); Create another table, one of the fields indexes 1st table, you can define this field as the first The field of a table has a relationship: create table [myTableb] ([Recordid] varchar primary key, [fielda] varchar, [fieldb] varchar, [Fieldc] varchar references [myTablea] ([Fielda])) in the above example All fields are varchar types; however, you have to remember that a data type field can only index fields of the same data type. ODBC and JDBC If you are writing to a SQL database connection, you can use ODBC to complete this feature. If it is a Java application, you can use JDBC (in short, ODBC Java interface). Because you want your application, you should not cause the administrator's attention, so you should include all the necessary ODBC drivers for your user's DBMS. This way, if the user is transferred from one platform to another, the drivers needed have been owned in advance. Your application should determine what DBMS currently used in the currently used ODBC driver by programming. This allows you to use the powerful and specific platforms on the database servers.
Alternative browser battle The most popular browser is of course Microsoft Internet Explorer and Navigator for Netscape. However, no matter which one is your hand, can it guarantee all the existing websites? wrong! Many fancy things, such as DHTML, framework, and multimedia, etc. are all supported by non-standard HTML tags in two types of browsers. Because the procedure is inaccessible in these two international standards, you must write code or write a large number of dynamic content for both browsers or write the most universal function code. Database servers face the same problem. ANSI SQL-92 is the standard for everyone. However, Oracle, Microsoft and other database vendors have also advocated a lot of characteristics that destroy SQL code. Therefore, you must not only write code followed by the basic specification (SQL-92), but the code has to achieve different characteristics according to the specific product. In your own application, you must correctly determine what type of database will be used, and where the database should be positioned. You have to experience any errors generated by the application or user. You certainly don't want to crash only because the file is deleted or the network cable is relaxed (or the server crashes). On a well-designed network, the database server usually separates the workstation and web server, the application server is physically separated, so the disconnection is very common. Summary As a web developer, you need to maintain a high degree of care of the application using non-standard SQL commands. The central idea of this article is to recommend using ANSI SQL to write cross-platform applications. The headache caused by non-standard dialects of commercial database systems using ANSI SQL.