WEBDEV Concepts

Part 5: Databases 163 • the type of database associated with the data file : • Database HFSQLDrive (paid turnkey solution, on a shared server). • HFSQL database in PCSCloud (paid turnkey solution, on a dedicated server). • HFSQL database (Client/Server or Classic). • Database accessible via a Native Connector. • Other types. Depending on the type selected, this data file will be handled by the HFSQL engine, an OLE DB driver or one of WINDEV or WEBDEV’s Native Connectors (SQL Server, Oracle, etc.). 4. The new data file becomes the current data file. The description window of the data file items opens automatically. It allows you to describe the file items. To import a preset description of a data file : 1. On the "Analysis" tab, in the "Creation" group, click "New file". The data file creation wizard starts. 2. Select the option "Select a description among the preset data files". 3. Choose the preset data file to be created (you can select multiple data files). This data file will be imported into the current analysis. This data file can be modified later. 4. Select the items you want to keep. These items can be modified later. 5. The imported data file is automatically inserted into the current analysis. Remark : To modify a data file or the items in a data file: 1. Select the data file. 2. Select "Data file description" or "Description of items" in the context menu. Two solutions can be used to import an existing data file description : Solution 1: From the data model editor 1. On the "Analysis" tab, in the "Creation" group, click "New file". The data file creation wizard starts. 2. Select "Use the data files from an existing database" and select the type of database. 3. Specify the source database containing the descriptions to be imported and the type of database. Depending on the selected type, specify the requested information. 4. Select the tables or data files whose description must be imported and validate. 5. The imported data file is automatically inserted into the current analysis. Solution 2: From the Windows explorer Drag the data file description from the Windows explorer and drop it onto the data model editor. 2.3 Creating an item To create an item : 1. Double-click the data file where the item will be created. The description window of the data file items opens. 2. Click the first empty row in the table. 3. Specify the name, caption and type of the item. 4.  In the right section of the window, indicate the details of the new item (type, size, default value, iteration direction, etc.). 5. Specify the details about the shared information: click "Parameters of the control bound to the selected item (shared information)". 6. Validate the item description. Remark : you can also create an item from the metatypes available in WINDEV. To do so, click the button. The list of available metatypes appears. 2.4 Creating a link Different types of links can be created between data files. For more details on links, see Characteristics of the links defined in an analysis. To create a link : 1. On the "Analysis" tab, in the "Creation" group, click "New link". The mouse cursor turns into a pen. 2. Select the two data files to be linked. The link description window opens automatically. 3. To define the cardinalities between the two data files: • select the desired cardinalities (0, 1; 1, 1; 0, N; 1, N). • answer the questions. The cardinalities will be automatically updated. 4. To define the advanced cardinalities, check "Display advanced cardinalities" and answer the questions. 5. Specify the link caption and briefly describe the purpose of the link. 6. Specify the keys to be linked. 7. Define the integrity rules. These rules ensure data integrity when one of the keys of the relationship is modified or deleted. 8. Validate. The link is automatically created.

RkJQdWJsaXNoZXIy NDQ0OA==