Author:admin

Date:2008-09-19T07:54:43.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@25 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
jfiat
2008-09-19 07:54:43 +00:00
parent c0aba35d72
commit 8a46c5d793
247 changed files with 1257 additions and 47 deletions

View File

@@ -1,5 +1,6 @@
[[Property:title|Esql Sample]]
[[Property:weight|0]]
[[Property:uuid|04d03117-fdb2-8b73-677f-9b1a0c333dc4]]
This sample consists of a command line SQL parser. SQL statements are filtered through a monitor and sent to the RDBMS.
==Compiling==

View File

@@ -0,0 +1,13 @@
[[Property:title|EiffelStore Samples]]
[[Property:weight|3]]
[[Property:uuid|65a0aab3-bc1d-28b8-a6f0-6d71b4c6d54d]]
=EiffelStore Samples=
The following basic examples showcases the different EiffelStore capabilities:
* [[Esql Sample|esql]] : A command line SQL parser: very useful to test your Database connection!
* [[Selector Sample|select]] : A basic example to perform smart database queries.
* [[Inserter Sample|insert]] : A basic example to easily insert data in your database.

View File

@@ -1,5 +1,6 @@
[[Property:title|Inserter Sample]]
[[Property:weight|2]]
[[Property:uuid|fa0b8601-ca7a-b1cc-384d-f366be33ac40]]
This sample lets the user insert a DB_BOOK object in your database using EiffelStore insertion facilities.
==Compiling==

View File

@@ -1,5 +1,6 @@
[[Property:title|Selector Sample]]
[[Property:weight|1]]
[[Property:uuid|3d608710-5537-04e4-fa89-a608ee6864cd]]
This sample creates a <eiffel>DB_BOOK</eiffel> table in your database, enters sample data in it and lets you select rows from this table with author's name.
==Compiling==

View File

@@ -1,5 +1,6 @@
[[Property:title|EiffelStore DataView Cluster]]
[[Property:weight|3]]
[[Property:uuid|75f8cc72-7ccf-28a4-f6b2-beeb2219dc43]]
==1. Introduction==
DataView cluster helps the programmer creating a GUI for a RDBMS. It gives a basic solution for a RDBMS GUI and also enables the developer to customize his GUI from this basic interface.

View File

@@ -1,5 +1,6 @@
[[Property:title|Data structures creation]]
[[Property:weight|1]]
[[Property:uuid|d8845cb9-2581-f85d-aad1-460816711356]]
==1. Overview==
EiffelStore enables to create data structures mapped to your own database. This part describes how the EiffelStore wizard generates these structures mapped to your database and how you can map your own classes to your database with EiffelStore.

View File

@@ -1,5 +1,6 @@
[[Property:title|Data structures use]]
[[Property:weight|0]]
[[Property:uuid|25885469-d6c8-5d1c-bbf8-c5fca5524d36]]
==1. Overview==
EiffelStore affords a context that optimizes and facilitates the use of the classes that maps your database content.

View File

@@ -1,5 +1,6 @@
[[Property:title|EiffelStore Generation Cluster]]
[[Property:weight|2]]
[[Property:uuid|f443ed73-14bb-9a3a-b7c7-35c2660e7784]]
The EiffelStore library lets the user associate database elements with Eiffel objects. These database elements are basically database table rows, database view rows or more generally sets of database attribute values. The easiest way to manipulate database elements is to insert their content into Eiffel objects and to work on these Eiffel objects as database elements.
A first solution to implement this is to use some adaptable structures that will fit to any database element. This is done in EiffelStore through the [[ref:libraries/store/reference/db_tuple_flatshort|DB_TUPLE]] class, which contains mainly an [[ref:libraries/base/reference/array_chart|ARRAY]] [[[ref:libraries/base/reference/string_8_chart|STRING]] ] containing element attribute names and an [[ref:libraries/base/reference/array_chart|ARRAY]] [[[ref:libraries/base/reference/any_chart|ANY]] ] containing element attribute values. This solution has one major drawback: any static checking is impossible: the developer cannot be sure at compile time of the nature of a [[ref:libraries/store/reference/db_tuple_flatshort|DB_TUPLE]] , i.e. what it represents, and cannot know if attributes number, names and types are correct. To overcome this problem, a second solution is to use data structures that statically fits to the expected database element, as introduced in the [[Data Object Coupling|DataObject Coupling]] section.

View File

@@ -1,5 +1,6 @@
[[Property:title|EiffelStore Implementation Layer]]
[[Property:weight|1]]
[[Property:uuid|80cd0938-6837-3c17-8515-b4ac60a51d09]]
Each interface class has an implementation counterpart that implements specific DBMS handling. The class prefix indicates clearly its layer, for instance:
* [[ref:/libraries/store/reference/db_selection_flatshort|DB_SELECTION]] is the interface to perform a database selection query.
* [[ref:/libraries/store/reference/database_selection_flatshort|DATABASE_SELECTION]] [[[ref:/libraries/store/reference/database_flatshort|DATABASE]] ] is its implementation.

View File

@@ -1,5 +1,6 @@
[[Property:title|Data Modification]]
[[Property:weight|1]]
[[Property:uuid|ef5568ff-dc7c-4c85-0174-335fdab1bd84]]
Use the [[ref:/libraries/store/reference/db_change_flatshort|DB_CHANGE]] class to perform any operation on your database that does not require access to a result. You can for instance modify table row content, drop table rows, create and delete tables.
{{note| '''Note''': Take a look at the [[Data Object Coupling|Data Storing]] capability if you want to '''insert''' table rows. }}

View File

@@ -1,5 +1,6 @@
[[Property:title|Data Object Coupling]]
[[Property:weight|4]]
[[Property:uuid|c51311cd-8782-0bc3-3ef7-000ea6eee37c]]
A smart way to work with relational databases is to have Eiffel objects directly mapping relational tables. Three EiffelStore classes enable this coupling:
* [[ref:/libraries/store/reference/db_repository_flatshort|DB_REPOSITORY]] objects [[#describe|describe a relational table]] and allow Eiffel to create objects mapping database tables.
* [[ref:/libraries/store/reference/db_store_flatshort|DB_STORE]] works directly with [[ref:/libraries/store/reference/db_repository_flatshort|DB_REPOSITORY]] objects to [[#insert|insert data into relational tables]] .

View File

@@ -1,5 +1,6 @@
[[Property:title|Database Connection]]
[[Property:weight|0]]
[[Property:uuid|2cf2cb7c-e28d-5d06-b03e-e2b17c1f6879]]
# To connect to your database, you have to create a '''handle''': this handle actually links the interface classes with corresponding implementation classes mapped to your DBMS. This handle is implemented by the DATABASE_APPL class:
<code>
database_appl: DATABASE_APPL [ODBC]

View File

@@ -1,5 +1,6 @@
[[Property:title|Database control]]
[[Property:weight|7]]
[[Property:uuid|432c6e51-36d5-b469-c924-eb821713256a]]
Use the [[ref:/libraries/store/reference/db_control_flatshort|DB_CONTROL]] class to check or change database status and behavior. The main operations you are likely to use are:
* [[#errors|Handling]] database errors.
* [[#connection|Connecting]] to the database.

View File

@@ -1,5 +1,6 @@
[[Property:title|Database Selection]]
[[Property:weight|2]]
[[Property:uuid|de759a74-b3e1-c937-e620-67526c116925]]
Use the [[ref:/libraries/store/reference/db_selection_flatshort|DB_SELECTION]] class to select data from the database. Once you have selected the data, you can [[Selection Access|access]] it with convenience using adaptative EiffelStore structures.
{{note| '''Note''': Take a look at the [[Data Object Coupling|Database/Eiffel objects Coupling]] if you need information about your database structure. }}

View File

@@ -1,5 +1,6 @@
[[Property:title|EiffelStore Interface Layer]]
[[Property:weight|0]]
[[Property:uuid|abd6c880-e0d8-0961-8cd2-d2ca43c1ce28]]
The Interface layer gathers a set of classes covering all the capabilities an application need to interface efficiently with a DBMS.
The interface affords these main capabilities:

View File

@@ -1,5 +1,6 @@
[[Property:title|Query variables]]
[[Property:weight|5]]
[[Property:uuid|37222a07-a8f8-e57d-45f0-3b28cd66d660]]
If you have to execute database queries which only differ in the expression values, you can create a template query and then bind variables into this template for each execution.
This mechanism can be applied for requests with a result ([[ref:/libraries/store/reference/db_selection_chart|DB_SELECTION]] ) or without ([[ref:/libraries/store/reference/db_change_chart|DB_CHANGE]] ). Hence both classes inherits from STRING_HDL that actually handle variable binding.

View File

@@ -1,5 +1,6 @@
[[Property:title|Selection Access]]
[[Property:weight|3]]
[[Property:uuid|3b4fdde3-d903-55c8-0068-cee2407db280]]
Once you have [[Database Selection|selected data]] from the database, it returns a set of rows containing queried columns values. Each row loaded with DB_SELECTION is stored in a DB_RESULT object. The easiest way to access the data is thus to refer to DB_RESULT objects themselves.
{{note| '''Note''': Take a look at the [[Data Object Coupling|Database/Eiffel objects Coupling]] to learn advanced data handling features. }}

View File

@@ -1,5 +1,6 @@
[[Property:title|Stored Procedures]]
[[Property:weight|6]]
[[Property:uuid|9979af90-07c3-8b20-448e-04454a75c801]]
When sending requests to the database, the request is first parsed then executed. Instead of parsing many times the same requests, i.e. with only changes in expression values, most of RDBMS enable to '''precompile''' requests. These requests can then be executed as routines and are identified by a name and a signature.
EiffelStore lets you use stored procedures with [[ref:/libraries/store/reference/db_proc_flatshort|DB_PROC]] class to:

View File

@@ -1,6 +1,7 @@
[[Property:title|EiffelStore Content]]
[[Property:link_title|EiffelStore Tutorial]]
[[Property:weight|1]]
[[Property:uuid|542caa33-5dc1-d2ea-414b-b1739045edd9]]
EiffelStore main classes are grouped into 2 main layers:
* The [[EiffelStore Interface Layer|interface layer]] provides a high-level, unique interface for every DBMS.
* The [[EiffelStore Implementation Layer|implementation layer]] customizes high-level routines to various DBMS handles.

View File

@@ -1,6 +1,7 @@
[[Property:title|EiffelStore Library]]
[[Property:link_title|EiffelStore]]
[[Property:weight|1]]
[[Property:uuid|f43ab3e6-4551-632a-384b-4964d1436730]]
Type: Library <br/>
Platform: Any <br/>

View File

@@ -2,9 +2,9 @@
[[Property:weight|-8]]
[[Property:uuid|f5d26942-de52-76cc-0f41-66b959a78999]]
== Database access ==
* EiffelStore http://ise181.ise/book/documentation/eiffelstore-library
** EiffelStore introduction http://ise181.ise/book/documentation/eiffelstore-introduction
** EiffelStore tutorial http://ise181.ise/book/documentation/eiffelstore-content
* [[EiffelStore Library|EiffelStore]]
** [[EiffelStore introduction|EiffelStore introduction]]
** [[EiffelStore Content|EiffelStore tutorial]]
** EiffelStore class reference
** EiffelStore samples http://ise181.ise/book/documentation/eiffelstore-samples
** [[EiffelStore Samples|EiffelStore samples]]