Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Samples-Data
This is the README file for SAMPLES-DATA.
The end of the file has setup instructions.
************************************************************************************

---
Use or operation of this code is subject to acceptance of the license available in the code
repository for this code.
************************************************************************************

---

SAMPLES-DATA is meant for use with the InterSystems IRIS.
There are three purposes for these classes:
* To provide sample data that you can query via InterSystems IRIS SQL, for any basic
Expand All @@ -25,35 +28,35 @@ There are three purposes for these classes:
The InterSystems ObjectScript documentation and the InterSystems SQL documentation use these tables and
classes extensively.

************************************************************************************
Contents of the Sample package
************************************************************************************
* Sample.Person represents a person. This class is projected to SQL as the table Sample.Person.

## Contents of the Sample package

* `Sample.Person` represents a person. This class is projected to SQL as the table `Sample.Person`.
Of note:
- The properties Home and Office are references to the serial object class Sample.Address.
- Age is a calculated property.
- ByName is a class query.
* Sample.Address is a serial object class, representing a street address. Sample.Person uses
- The properties `Home` and `Office` are references to the serial object class `Sample.Address`.
- `Age` is a calculated property.
- `ByName` is a class query.
* `Sample.Address` is a serial object class, representing a street address. `Sample.Person` uses
this class as the type of the Home and Office properties.
* Sample.Employee is a subclass of Sample.Person. This class is projected to SQL as the table
Sample.Employee. The records for Sample.Employee are also included in the table Sample.Person.
* Sample.Company represents a company. This class is projected to SQL as the table Sample.Company.
Each company has a relationship properties that connects to the Sample.Employee class.
* Sample.Customer is another sample serial object class.
* Sample.Vendor demonstrates how to use the %Library.CacheSQLStorage storage class to provide
* `Sample.Employee` is a subclass of `Sample.Person`. This class is projected to SQL as the table
`Sample.Employee`. The records for `Sample.Employee` are also included in the table `Sample.Person`.
* `Sample.Company` represents a company. This class is projected to SQL as the table `Sample.Company`.
Each company has a relationship properties that connects to the `Sample.Employee` class.
* `Sample.Customer` is another sample serial object class.
* `Sample.Vendor` demonstrates how to use the `%Library.CacheSQLStorage` storage class to provide
custom storage for a persistent class.

************************************************************************************
Setup instructions
************************************************************************************
## Setup instructions

1. Download the repo to your local disk and uncompress it.
2. Open the InterSystems IRIS Terminal.
3. Enter the following command (replacing with the namespace where you want to load the sample):

ZN "mynamespace"
3. Enter the following command (replacing `<namespace>` with the namespace where you want to load the sample):
```
ZN "<namespace>"
```
4. Enter the following commands (replacing with the full path of the buildsample/buildsampledata.mac file):

```
do $system.OBJ.Load("full-path-to-buildsampledata.mac","ck")

do ^buildsampledata
```
5. Then answer any prompts.