スレッド安全性 パブリック静的メソッドはスレッドセーフですが、インスタンス・メソッドではスレッド安全性は保証されません。 例 // C# using System; using System.Data; using Oracle.DataAccess.Client; class OracleConnectionSample { static void Main() { // Connect string constr = "User Id=scott;Password=tiger;Data Source=oracle"; OracleConnection con = new OracleConnection(constr); con.Open(); // Execute a SQL SELECT OracleCommand cmd = con.CreateCommand(); cmd.Co
106 DBMS_OUTPUT DBMS_OUTPUTパッケージによって、ストアド・プロシージャ、パッケージおよびトリガーからメッセージを送信できます。このパッケージは、PL/SQLデバッグ情報の表示に特に便利です。 この章では、次の項目について説明します。 DBMS_OUTPUTの使用方法 概要 セキュリティ・モデル 使用上の注意 例外 ルールおよび制限 例 データ構造 表タイプ オブジェクト・タイプ DBMS_OUTPUTサブプログラムの要約 概要 通常、このパッケージは、デバッグに使用されるか、あるいはメッセージとレポート(プロシージャにSQLコマンドDESCRIBEを適用するなどして生成)をSQL*DBAまたはSQL*Plusに表示するために使用されます。 このパッケージに含まれているPUTプロシージャおよびPUT_LINEプロシージャによって、別のトリガー、プロシージャまたはパッ
SQL 13章 ストアドプロシージャ (SQL 非標準) 13.1. ストアドプロシージャとは 13.2. ストアドプロシージャの基本構文 1. ストアドプロシージャの作成 2. ストアドプロシージャの実行と削除 13.3. ストアドプロシージャの利用 13.1. ストアドプロシージャとは ストアドプロシージャは、データベースに対する一連の処理を一つのプログラムにまとめ (PROCEDURE)、データベース管理システム (RDBMS) に保存 (STORE) したものです。複雑な SQL 文の呼び出しを、論理的に一つの処理単位にまとめて、簡単にその名前で呼び出せるようになっています。一つのプロシージャには、複数の SQL 文が含まれていたり、繰り返しや条件分岐などの制御構造をもつこともあります。また、引数をとって処理をしたり、処理結果を返すこともできます。 ストアドプロシージャを利用するこ
Note データセットと関連クラスは、アプリケーションがデータベースから切断されている間にアプリケーションがメモリ内のデータを操作できるようにする、2000 年代初期からのレガシ .NET Framework テクノロジです。 これらが特に役立つのは、ユーザーがデータを変更し、変更をデータベースに戻して保持できるようにするアプリケーションです。 データセットは非常に優れたテクノロジであることが証明されていますが、新しい .NET アプリケーションでは Entity Framework Core を使用することをお勧めしています。 Entity Framework には、オブジェクト モデルとして表形式データを操作する、より自然な方法が用意されており、よりシンプルなプログラミング インターフェイスが備わっています。 DataSet オブジェクトは、本質的に小型データベースである、メモリ内オブ
このセクションには、カタログ ビューのエラー メッセージのテキストから取得されるエラー メッセージ番号とその説明が sys.messages 含まれています。 当てはまる場合、エラー番号は詳細情報のリンクとなっています。 カタログ ビューに対して次のクエリを実行すると、データベース エンジンに対してクエリを実行して、すべてのエラーの完全な一覧をsys.messages表示できます。 SELECT message_id AS Error, severity AS Severity, [Event Logged] = CASE is_event_logged WHEN 0 THEN 'No' ELSE 'Yes' END, [text] AS [Description] FROM sys.messages WHERE language_id = 1040 /* replace 1040 wit
たまにしか使わないし、DBMSによって記述方法違うので、しょっちゅうやりかた忘れて困るので自分用メモ。 ちなみにDBはpostgresql。 サンプルはとあるテーブルの項目に連番を振り直したいとき用のアップデート文 UPDATE target_table SET target_column = (SELECT count(*) FROM target_table t1 inner join target_table t2 on t1.id>=t2.id WHERE target_table.id = t1.id GROUP BY t1.id ) どうでもいいけどWEB系のプログラムってあんまりごちゃごちゃしたSQL書くことが少ないなーとか思ったり。そうでもないのかな。
PL/SQL(ピーエル・エスキューエル)は、Oracle社が、Oracle Databaseのためにコンピュータのデータベース言語SQLを独自に拡張したプログラミング言語で、Ada言語を参考にして開発された言語である。PL/SQLは1988年にOracle Databaseに対して初めて追加された。 もともと非手続き型言語であるSQLを手続き型言語 (Procedural Language) に拡張するところから「PL/SQL」と命名された経緯を持つ。PL/SQLを使用すると、手続き型言語で埋め込みSQLによる処理と同様に、変数の利用やif、for、loopなどの制御構造を記述してビジネスロジック(Business Logic)をデータベース内に実装することができ、問い合わせ結果の行を一件ずつ処理する場合には、カーソルによるFETCHループでの処理を行うことが出来る。数値計算の効率化のため
これまで階層構造データはリレーショナルデータベースでうまく扱えませんでしたが、その解決策としてジョー・セルコが提案したのが「入れ子集合モデル」です。この手法を紹介した『プログラマのためのSQLグラフ原論』の刊行にあたり、翻訳されたDBエンジニアのミックさんに入れ子集合モデルの将来性についてうかがいました。 なぜRDBで木と階層構造を扱う手法が1冊の書籍に? ――『プログラマのためのSQLグラフ原論 リレーショナルデータベースで木と階層構造を扱うために』についてミックさんにうかがいます。最初に、本書がどういう本なのか教えていただけますか? ミック:内容としては、リレーショナルデータベース(RDB)でグラフ構造の一つである木と階層構造を扱うための方法論「入れ子集合モデル」をメインに解説しています。RDBには大きな問題があり、入れ子集合モデルがそれを解決しうる手法だと見込まれています。その問題と
.app 1 .dev 1 #11WeeksOfAndroid 13 #11WeeksOfAndroid Android TV 1 #Android11 3 #DevFest16 1 #DevFest17 1 #DevFest18 1 #DevFest19 1 #DevFest20 1 #DevFest21 1 #DevFest22 1 #DevFest23 1 #hack4jp 3 11 weeks of Android 2 A MESSAGE FROM OUR CEO 1 A/B Testing 1 A4A 4 Accelerator 6 Accessibility 1 accuracy 1 Actions on Google 16 Activation Atlas 1 address validation API 1 Addy Osmani 1 ADK 2 AdMob 32 Ads
W3Schools offers a wide range of services and products for beginners and professionals, helping millions of people everyday to learn and master new skills. Free Tutorials Enjoy our free tutorials like millions of other internet users since 1999
SQLのプログラミングは奥が深い。特にパフォーマンスの観点から、そう言えるだろう。 みなさんご承知の通り、同じ結果を出すプログラムでも、SQLの書き方次第で処理時間に何倍もの差が生じ得る。効率の悪いSQLを書いてしまう原因は、多くの場合、リレーショナルデータベースの内部動作やアプリケーションに関する理解不足である。両者をよく知った上で最適なSQLを書けるようになることは、システムエンジニアとしての重要なスキルの一つである。 特集『基礎から理解するデータベースのしくみ』では、リレーショナルデータベースの内部動作について、基本的な部分を分かりやすく解説している。SQLプログラミングに役立つことはもちろん、SQLチューニングやデータベース設計のための基礎知識としても不可欠だ。 イントロダクション ブラックボックスのままでいいの? Part 1:SQL文はどのように実行されるのか SQL実行までの
NoSQLデータベースはRDBMSに比べて並列処理で性能を上げていけるという特長がある反面、単純なデータ構造しか扱えないとか、データの並べ替えなどが難しいという難点があります。今回からは、NoSQLを使いながらも、RDBMSが備える機能を部分的に実現する方法を解説していきます。(編集部) 高速な分、複雑なデータ加工が苦手なNoSQLデータベース 前回は、リレーショナルデータベース管理システム(RDBMS)からデータを読み出す流れを詳しく見ていきました。問い合わせを受けてから結果セットを動的に作って返すRDBMSのやり方では、分散環境においては十分な処理性能を発揮できないということがご理解頂けたかと思います。 RDBMSはデータの結合や検索のほかにも、データ集計や並べ替えなど、SQLを使った問い合わせ内容に応じてさまざまな形にデータを加工する機能を備えています。多様な要求に応えてくれる問い合
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く