@@ -113,15 +113,18 @@ Student - StudentMajor
113113
114114### Creating a virtual module
115115
116- Now ` spawn_missing_classes ` creates the new classes in the local namespace.
116+ Virtual modules provide a way to access the classes corresponding to tables in a
117+ DataJoint schema without having to create local files.
118+
119+ ` spawn_missing_classes ` creates the new classes in the local namespace.
117120However, it is often more convenient to import a schema with its Python module,
118- equivalent to the Python command
121+ equivalent to the Python command:
119122
120123``` python
121124import university as uni
122125```
123126
124- We can mimick this import without having access to ` university.py ` using the
127+ We can mimic this import without having access to ` university.py ` using the
125128` VirtualModule ` class object:
126129
127130``` python
@@ -145,7 +148,13 @@ uni.Student - uni.StudentMajor
145148
146149![ query object preview] ( ../images/StudentTable.png ) {: style="align: center "}
147150
148- ` dj.VirtualModule ` takes optional arguments.
151+ ` dj.VirtualModule ` takes required arguments
152+
153+ - ` module_name ` : displayed module name.
154+
155+ - ` schema_name ` : name of the database in MySQL.
156+
157+ And ` dj.VirtualModule ` takes optional arguments.
149158
150159First, ` create_schema=False ` assures that an error is raised when the schema
151160does not already exist. Set it to ` True ` if you want to create an empty schema.
0 commit comments