CompEdNet | Paul Gardner | Activity https://www.compednet.com/members/p-gardnerdunedin-edin-sch-uk/activity/ Activity feed for Paul Gardner. Fri, 29 Mar 2024 05:45:44 +0000 https://buddypress.org/?v=12.3.0 en-GB 30 hourly 2 211d607275272b534d75121ecb426762 Paul Gardner replied to the topic 2023 Practical Assessment Part 1b in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/2023-practical-assessment-part-1b/#post-84108 Tue, 24 Jan 2023 16:02:53 +0000

Sorry Erico, I spoke to soon. This looks like a parallel array problem.

]]>
0
8360fdd214f467549c0d93dc39fac909 Paul Gardner replied to the topic 2023 Practical Assessment Part 1b in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/2023-practical-assessment-part-1b/#post-84107 Tue, 24 Jan 2023 15:51:48 +0000

Hi Enrico. The task only needs one array. The purpose of “Store new startMiles” might be what you’re missing.

]]>
0
d0cedd3fbcee88adc823984130139fb2 Paul Gardner replied to the topic Databases using RaspPi in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/databases-using-rasppi/page/2/#post-81963 Thu, 10 Mar 2022 09:33:44 +0000

Hi David. The current version of SQLite doesn’t support the ‘ALTER TABLE ADD CONSTRAINT’ command so you have to include constraints in the original CREATE TABLE command, or recreate the table with the new constraints.

SQLite constraint error messages have changed over the versions though and I noticed today that SQLite version 3.37 has some new…Read More

]]>
0
1ac18e81f9886c8972c719807c47741c Paul Gardner replied to the topic Databases using RaspPi in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/databases-using-rasppi/#post-81921 Tue, 08 Mar 2022 22:17:34 +0000

One of my earlier posts appears in ‘My Activity’ but not in this thread, so here it is agian. Apologies if this comes up as a duplicate.
——————————————————————————————————–

SQLite is very relaxed about datatypes. Any column can store any type of data! Columns can be also…Read More

]]>
0
0df3396de6577494d7213c21eb8f7087 Paul Gardner replied to the topic specimen coursework in sql in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/specimen-coursework-in-sql/#post-81886 Fri, 25 Feb 2022 13:53:57 +0000

Hi Kerry. I’ve uploaded it to the documents part of this group.
Paul

]]>
0
9846b501dfc5acaca7f642fe4420d556 Paul Gardner uploaded the file: Higher Specimen Coursework Task database in SQLite to Higher Computing Science https://www.compednet.com/activity/p/29572/ Fri, 25 Feb 2022 13:51:32 +0000

The attached zip file contains the database for the Higher specimen courswork task in SQLite format and all the .SQL commands and CSVs to recreate it, if necessary.

]]>
0
e8da8407d0ad09371fa61e86fff84795 Paul Gardner replied to the topic Databases using RaspPi in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/databases-using-rasppi/#post-81863 Thu, 24 Feb 2022 14:53:39 +0000

SQLite is very relaxed about datatypes. Any column can store any type of data! Columns can be also defined without a data type specified at all. Without CHECK constraints, SQLite doesn’t enforce any type checking on data being inserted as the following code demonstrates:
create table test(
name text,
age int,
hours float,
pt boolean
);

insert…Read More

]]>
0
4877a484fa859ee208a7e8db4ae9fd0f Paul Gardner replied to the topic Databases using RaspPi in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/databases-using-rasppi/#post-81861 Thu, 24 Feb 2022 13:54:36 +0000

For date fields in SQLite I get my pupils to create tables using the syntax, e.g.
CREATE TABLE test (
start DATE not null,
end DATE not null);

and then insert data as text in ‘YYYY-MM-DD’ format, e.g.
INSERT INTO test VALUES ('2022-02-20', '2022-02-24');

they can then perform data calclations using the ‘julianday’ function, e.g.
SELECT…Read More

]]>
0
2402496828ff4a956b3c321b6446e834 Paul Gardner replied to the topic Databases using RaspPi in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/databases-using-rasppi/#post-81830 Thu, 17 Feb 2022 17:52:14 +0000

I’ve taught databases on the Raspberry Pi before and it worked really well. You can use the command line interface for setting up tables and performaing queries, there are a few GUI applications (DB Browser, Adminer, DB Visualizer) that work well but it’s also easy to set up a Python web server based interface that gives an easy to use GUI. I’m…Read More

]]>
0
83ad067a1bb505c307a55324437b9075 Paul Gardner replied to the topic WDD code reference document in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/wdd-code-reference-document/#post-81489 Sat, 13 Nov 2021 16:46:42 +0000

Hello all, this might help too. I’ve implemented the SQA’s example website for Higher in Replit. You don’t need a Replit account to view it. Open it fullscreen and you can view the source code and the style sheet. It’s well commented and contains demonstrations of all the Higher techniques from the course specification.

]]>
0
c2b33c06af5abe47ce81e71d64477897 Paul Gardner replied to the topic national5computing.co.uk/sql in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/national5computing-co-uk-sql/#post-81450 Thu, 11 Nov 2021 08:24:19 +0000

Thanks Peter. I’m planning ahead and was looking to see where I could put some Higher/Advanced Higher sample database query exercises with feedback and your site looks great. I’ll send you some examples in the next couple of weeks. Thank you.

]]>
0
7c52ac28fbf3d73c03555f8f04f22273 Paul Gardner replied to the topic national5computing.co.uk/sql in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/national5computing-co-uk-sql/#post-81439 Wed, 10 Nov 2021 15:21:34 +0000

Hi Emma,

it’s back up again. If anyone knows who wrote this, can you let me know. It’s a lovely interface and I’d like to add some Higher and Advanced Higher tables and queries.

Paul

]]>
0
d2b5c282d07dfb071bb05fe6d272608b Paul Gardner replied to the topic Strong and Weak Entities 2020 SQA Paper in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/strong-and-weak-entities-2020-sqa-paper/page/2/#post-80686 Mon, 30 Aug 2021 16:42:48 +0000

The Scholar notes at

https://scholar.hw.ac.uk/courses/content/ahccmp/2/1/2/5/Database-design-and-development__Design__Entity~relationship-diagrams__Relationship-participation

cover relationship participation and contradict the written explanation of the Travel Agency scenario in the AH Course Spec.

I looked into how ER diagrams and…Read More

]]>
0
dcc12e301c028333c280f47ad581c27b Paul Gardner replied to the topic Strong and Weak Entities 2020 SQA Paper in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/strong-and-weak-entities-2020-sqa-paper/page/2/#post-80684 Fri, 27 Aug 2021 16:43:37 +0000

Now I’m confused over this topic.
The notes in the course spec. seem quite clear to start. “The mandatory side of any relationship is indicated by using a vertical line”. “The optional side of a relationship is indicated by using a bold circle.”

And the example, Customer -|—-O< Order, reads to me that Customer is mandatory, Order is…Read More

]]>
0
c22bb57801c4ee09687e8e6bfd37e3a4 Paul Gardner replied to the topic Strong and Weak Entities 2020 SQA Paper in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/strong-and-weak-entities-2020-sqa-paper/#post-80679 Thu, 26 Aug 2021 18:20:56 +0000

Yes. The table design matches the diagram which shows three strong entities.

]]>
0
5e32ff44ac2081b17e74700ad275f7ce Paul Gardner replied to the topic Strong and Weak Entities 2020 SQA Paper in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/strong-and-weak-entities-2020-sqa-paper/#post-80677 Thu, 26 Aug 2021 17:20:06 +0000

Sorry if I caused confusion by suggesting that that relational participation influences whether the relationship line is shown as solid or dotted. I was looking at it the other way around.

An entity is weak if it depends on another entity for it to exist *and* it gets at least part of its primary key from the other entity.

The diagram’s…Read More

]]>
0
1d55ab43241a65a56a22a4218c14b38e Paul Gardner replied to the topic Strong and Weak Entities 2020 SQA Paper in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/strong-and-weak-entities-2020-sqa-paper/#post-80672 Thu, 26 Aug 2021 14:00:22 +0000

https://www.cs.dartmouth.edu/~cs61/Lectures/04%20-%20ER%20Modeling/04%20-%20ER%20Modeling.html

has a good description of stong and weak entities and realtionships and how they can be implemented.

]]>
0
6d50f8335e641a802a2d77aba7e82e0b Paul Gardner replied to the topic Strong and Weak Entities 2020 SQA Paper in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/strong-and-weak-entities-2020-sqa-paper/#post-80671 Thu, 26 Aug 2021 13:56:47 +0000

The ‘occupied’ field is probably there to provide a quick way of showing *currently* occupied in the implemented database.

The ParkingRecord entity implements the many:many realationship between Driver and ParkingSpace and holds all the necessary fields to capture the history of which drivers are occupying/have occupied which parking space.…Read More

]]>
0
d1bb57f65feff58dc6ec51b353c72515 Paul Gardner replied to the topic Strong and Weak Entities 2020 SQA Paper in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/strong-and-weak-entities-2020-sqa-paper/#post-80669 Thu, 26 Aug 2021 11:44:18 +0000

I think it should be clear from the analysis but it is also a design decision.

Analysis
1) Strong entity is not dependent on any other entity. Weak entity depends on strong entity:
CarPark is strong. ParkingSpace is weak if it depends on CarPark (i.e if a parking space can’t exist on its own without a CarPark).

Design
2) Strong entity always has…Read More

]]>
0
ddd5dc8122b0dbd941caa3b493fd29c2 Paul Gardner replied to the topic Which Database Software? in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/which-database-software/page/3/#post-63422 Thu, 24 Sep 2020 18:58:03 +0000

Re Validation:
I teach the pupils how to write/edit a script that creates the tables with validation rules defined in the SQL create table commands. These can validate presence check, field length, range check, list of values and PK/FK constraints.

https://repl.it/@paulatdunedin/N5201819

shows how this can be done in SQLite, with some code to…Read More

]]>
0
2eaaa7174ef084b2b066683741f9eaeb Paul Gardner replied to the topic Which Database Software? in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/which-database-software/page/2/#post-63352 Wed, 23 Sep 2020 18:30:04 +0000

(Apologies for the duplicate the link didn’t paste properly)

There are several ways to import the data from the SQA supplied .CSV files but the way I prefer is to write a script that sets up the tables and uses the .import command to import the data. You can do this on a local SQLite database or you can upload the .CSV files to repl.it and run…Read More

]]>
0
03adb7e10c279b19260a8c1b8800e69e Paul Gardner replied to the topic Which Database Software? in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/which-database-software/page/2/#post-63350 Wed, 23 Sep 2020 18:22:32 +0000

There are several ways to import the data from the SQA supplied .CSV files but the way I prefer is to write a script that sets up the tables and uses the .import command to import the data. You can do this on a local SQLite database or you can upload the .CSV files to repl.it and run the script from there. Have a look at

for an example.
Paul

]]>
0
57bab52c24400d414c5ca00b882eb724 Paul Gardner replied to the topic Which Database Software? in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/which-database-software/#post-63289 Tue, 22 Sep 2020 17:29:28 +0000

I introduce databases using MS Works 9. It offers a simple introduction to field definitions and has an easy query tool. Then I jump right to SQLite, setting up and querying databases using its command line interface. There are some nice utilities for SQLite for Windows or the Raspberry Pi that give you a GUI and can create E-R diagrams from the…Read More

]]>
0
273ddb0c8bdcc101cac7bb929be2bc80 Paul Gardner replied to the topic Robert Gordon Python materials in the forum Advanced Higher Computing Science https://www.compednet.com/groups/advanced-higher/forum/topic/robert-gordon-python-materials/#post-63004 Fri, 28 Aug 2020 13:10:44 +0000

It’s a good question for discussion in class. As there is no use made of the duplicate data you could read each line from the file and only add it to a list if it wasn’t already present in the list. This compares each line in full and also lets you find the original and new count of records at the same time.

file = open("rawpupildata.txt",…Read More

]]>
0
a406bb1ffc11b75ae73fcff1e2c9ae1f Paul Gardner replied to the topic Computing Science Super Team on Glow in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/computing-science-super-team-on-glow/#post-61701 Fri, 13 Mar 2020 18:49:02 +0000

I’d be happy to help.
Paul

]]>
0
922f10007378a9dc6de1d7d6ef617558 Paul Gardner replied to the topic Coursework Publication Date - 17/01/2020 in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/coursework-publication-date-17-01-2020/page/2/#post-61486 Tue, 25 Feb 2020 16:37:55 +0000

Re the validation. Check that you have the updated data files from the SQA secure site. The telephone number field has a value for all rows in the updated files. This lets you have a simple length check in Access with no errors when it is applied to the existing data yet still allows you to leave the field blank when adding new data.

]]>
0
03e9229b44ed2a33c1163655e49128c9 Paul Gardner replied to the topic Coursework Publication Date - 17/01/2020 in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/coursework-publication-date-17-01-2020/page/2/#post-61485 Tue, 25 Feb 2020 16:20:52 +0000

Apart from the pesky smart quotes (if you cut and paste), I see two reasons why the SQL ‘fails’ (i.e. won’t run) and one reason why, when these are fixed, the SQL doesn’t return any results.

]]>
0
2429f9722e38006d054abb5d1cb718af Paul Gardner uploaded the file: Gym Database in MySQL to Higher Computing Science https://www.compednet.com/activity/p/27335/ Mon, 03 Feb 2020 13:08:42 +0000

Greg Reid’s recently upload Gym Classes database converted from Access to a couple of MySQL .sql files. One file creates and populates the database tables. The other has all the sample queries converted to MySQL format. The database conversion was mainly done using “MS Access to MySQL” from http://www.bullzip.com with the Foreign Key relationships…Read More

]]>
1
fc3c89dddb0ef757f09591bb63f4712a Paul Gardner replied to the topic Higher Python SDD Programming help in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/higher-python-sdd-programming-help/#post-60946 Thu, 16 Jan 2020 12:25:20 +0000

Hi Frank. For Higher Software Design and Development using Python I found a publicly available document at https://blogs.glowscotland.org.uk/er/public/mchbusinesscomputing/uploads/sites/13559/2018/09/Copy-of-Higher-CS-Software-Design-and-Development-Booklet.pdf (108 pages) which seems to cover everything. I can’t tell who developed it but it looks…Read More

]]>
4
4a9b2567628604980951b248a26a83a6 Paul Gardner joined the group NPA Digital Passport https://www.compednet.com/activity/p/27055/ Sun, 29 Dec 2019 18:54:28 +0000 0 fa9d53cde6fdb19965d91915256fb418 Paul Gardner joined the group PC Passport https://www.compednet.com/activity/p/27054/ Sun, 29 Dec 2019 18:54:06 +0000 0 ba77d3bebf0d65d28bae5c7b3161f2fd Paul Gardner joined the group NPA Web Design https://www.compednet.com/activity/p/27053/ Sun, 29 Dec 2019 18:51:48 +0000 0 e46dd880116ea1f5376eade2e64d19ba Paul Gardner joined the group NPA Computer Games Development https://www.compednet.com/activity/p/27052/ Sun, 29 Dec 2019 18:51:40 +0000 0 d2fced2f87252a434f56579e78f9839e Paul Gardner joined the group Computing Jobs https://www.compednet.com/activity/p/27051/ Sun, 29 Dec 2019 18:51:19 +0000 0 0577e8de8112ae1c065862754a72258d Paul Gardner joined the group Cyber Security https://www.compednet.com/activity/p/27050/ Sun, 29 Dec 2019 18:51:07 +0000 0 6d80b62b611773dd6caeb770cc85ba7b Paul Gardner joined the group NPA Data Science https://www.compednet.com/activity/p/27049/ Sun, 29 Dec 2019 18:45:32 +0000 0 939e4cdad0a00170a100d2d84dfdc34f Paul Gardner replied to the topic Higher Specimen Coursework in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/higher-specimen-coursework/#post-56013 Wed, 09 Jan 2019 20:51:26 +0000

Hi Richard,

I think the SQA specifies equi-joins (only) so that it’s clear that pupils aren’t expected to know about outer joins (left join, right join etc.).

I think you’re right about syntax, the newer style for select, e.g.

select patientID, datePrescribed
from prescribedDrug inner join drug
on prescribedDrug.drugID = drug.drugID
where…Read More

]]>
0
29d67cd94fc722fecd364ed6ed5c4b5a Paul Gardner joined the group NPA Cyber Security https://www.compednet.com/activity/p/23433/ Wed, 02 Jan 2019 11:14:45 +0000 0 a36f6ccc89bd24623bf60379b35d008c Paul Gardner replied to the topic Higher Specimen Coursework in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/higher-specimen-coursework/#post-55691 Sat, 22 Dec 2018 20:02:15 +0000

Hi Richard,

There are a few ways to answer Q1 C(ii)

If you were tackling this in Access you’d probably create and save a named query that finds the drug with the highest dose and then use this query in a second query. The SQL equivalent to this is to create a view and then use this view in another query, e.g.

— Q1 c(ii) patients prescribed…Read More

]]>
0
84c902d9e873811cab8834fe38df99a7 Paul Gardner replied to the topic Past Coursework for Int 1 & Int 2 in the forum Other Qualifications https://www.compednet.com/forums/topic/past-coursework-for-int-1-int-2/#post-53169 Wed, 10 Oct 2018 21:50:43 +0000

Got them now. Thanks!
Paul

]]>
0
bfd599bc7c5125f1c771bd13ee06736a Paul Gardner started the topic Past Coursework for Int 1 & Int 2 in the forum Other Qualifications https://www.compednet.com/forums/topic/past-coursework-for-int-1-int-2/ Tue, 09 Oct 2018 18:47:54 +0000

Hello everyone,

can anyone let me have a copy of the coursework that was set for Intermediate 1 Computing Studies and Intermediate 2 Computing for their final year of presentation (2014/2015)? The final exams are available from the SQA but I can’t find the coursework anywhere.

Thanks

Paul

p.gardner@dunedin.edin.sch.uk

]]>
0
32d508b6698c235e1cde30d2910c334b Paul Gardner replied to the topic VB6 Array of Records in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/vb6-array-of-records/#post-51108 Tue, 04 Sep 2018 18:46:19 +0000

Hi Frank,

here’s a code snippet from a VB6 project. Records can be implemented as TYPES in VB6 and then used in arrays. This bit reads beach data from a datafile into a dynamic array that is resized as it reads so it works for files with different numbers of line.

Private Type beachRecord
name As String
rating As Integer
End Type

Private Sub…Read More

]]>
0
d5f762a47875adb9dfc0603e618e023b Paul Gardner replied to the topic MySQL vs MS Access SQL in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/mysql-vs-ms-access-sql/#post-50335 Sat, 25 Aug 2018 09:44:04 +0000

Hi,
there is a standard SQL technique that works here without having to CREATE VIEW or use a traditional subquery (i.e. a query in the WHERE clause). You can use an ‘inline view’. E.g.

select patientid, dateprescribed, drug.drugid, dosage
from prescribeddrug, drug, (select max(dosage) as maxdose from drug) as iv
where…Read More

]]>
0
ed5d4ca03decf82473913b8489e15da0 Paul Gardner joined the group Primary CfE + https://www.compednet.com/activity/p/22522/ Sun, 01 Jul 2018 17:24:22 +0000 0 4ee8c8175a98c5cf085df6068322fce5 Paul Gardner joined the group CompEdNet Site Discussion https://www.compednet.com/activity/p/22521/ Sun, 01 Jul 2018 17:23:52 +0000 0 71d01bb8223b7feedf51be463b823610 Paul Gardner joined the group Curriculum For Excellence https://www.compednet.com/activity/p/22520/ Sun, 01 Jul 2018 17:23:41 +0000 0 a275aecb145c7cc5a5233cd969b19d3f Paul Gardner replied to the topic Arrays of Records in Python in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/arrays-of-records-in-python/page/2/#post-47121 Thu, 31 May 2018 09:57:15 +0000

An updateable version of namedtuple !

If you can’t wait for Python 3.7 (for Python Data Classes) or still want to/need to use Python 2.7 then try ‘recordclass’.

‘recordclass’ is a mutable variant of collections.namedtuple, which supports assignments and works in Python 2.7 as well as 3.x. See http://pypi.org/project/recordclass
Get it with
pip…Read More

]]>
0
d6d62a17ed244e3ec4ae6326bc5e059d Paul Gardner replied to the topic Design Techniques in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/design-techniques/#post-41682 Fri, 23 Feb 2018 12:16:48 +0000

Counter controlled loop

]]>
0
5b1d3babddd86683c223e44c4374b239 Paul Gardner replied to the topic Design Techniques in the forum National 5 Computing Science https://www.compednet.com/groups/national-5-computing-science/forum/topic/design-techniques/#post-41650 Fri, 23 Feb 2018 08:52:48 +0000

Hi. I use a great, free flowcharting tool called Flowgorithm. It has a good way of showing counter controlled loops.

Paul

 

]]>
0
731572ced6cb5a6808bc393a52d9e96d Paul Gardner replied to the topic Java woes in the forum Higher Computing Science https://www.compednet.com/groups/higher-computing-science/forum/topic/java-woes/#post-41504 Mon, 19 Feb 2018 22:21:10 +0000

Hi Roderick,

I’ve just uploaded a larger demo to the ‘documents’ part of the forum. This Java program demonstrates console i/o, file i/o, a simple class to store structured data and some error handling techniques useful for catching user input errors, file i/o and data conversion errors.

Paul

 

]]>
0