Skip to content
UoL CS Notes

Home

This website houses notes from my studies at the University of Liverpool. If you see any errors or issues, please do open an issue on this site's GitHub.

Data Analysis

COMP207 Lectures

Consider that a big company wants analyse its product sales. They have a database with the following schema: Sales(productNo, date, store_name, price) Stores(name, city, country, phone) and will run the following query: SELECT country, AVG(price) FROM Sales, Stores WHERE Sales.store_name = Stores.name AND date >= '2021-01-01' GROUP BY country; This...

Read More

Other NoSQL Databases

COMP207 Lectures

Document Stores This is a database that stores an ObjectID associated in a document (typically in JSON). JSON vs XML We can represent the following XML: <?xml version=“1.0” standalone=“yes”> <students> <student> <name>Anna</name> <number>20171989</number> <programme>G402</programme> </student> <student> <name>John</name> <number>20174378</number> <programme>G702</programme> </student> … </students> as the following JSON file: {"students":[ {"name": "Anna",...

Read More

Key-Value Stores

COMP207 Lectures

This is the simplest type of database with only two columns, one for the key and one for the value. They have a simple access mechanism: find(k) - Returns the local value for key $k$. write(k, v) - Inserts value $v$ under key $k$. Distributed Storage Each key-value pair $(k,v)$...

Read More

NoSQL Databases

COMP207 Lectures

These are non-relational databases that generally cater to web applications: Very fast access, will millions of users in parallel. Vault Tolerance Semi-structured Flexibility in the type of data stored. Full ACID compliance can sometimes be relaxed. NoSQL Example Consider that you have the following setup: flowchart ws[Web Service] <--> nsql[NoSQL...

Read More

Convert XML to SQL

COMP207 Lectures

We can convert the other way by using XML Schema. To convert an XML database to SQL we have the following approaches: Storing XML in an Attribute We can use the XML data type (XML or XMLType) to store raw XML in a serialised form. Creating Tables Using XML Type...

Read More

Undecidable Problems for CFGs

COMP218 Lectures

We currently know the decidability of the following problems: Decidable Undecidable DFA $M$ accepts $w$ TM $M$ accepts $w$ CFG $G$ generates $w$ TM $M$ halts on $w$ DFAs $M$ and $M’$ accept the same inputs TM accepts some input   TM $M$ and $M’$ accept the same inputs Computation...

Read More

Reducability

COMP218 Lectures

This is a common technique that can be used to show how hard a problem is or how to reduce a hard problem to a simpler ones. As we know that $A_\text{TM}$ is not recursive we can use that to prove that a language $L$ is not recursive: If some...

Read More

Software Cost Estimation

COMP201 Lectures

Cost Components Hardware and Software Costs Travel and Training Costs Effort Costs (The dominant factor in most projects) Salaries of engineers involved in the project. social and insurance costs. Effort costs must take overheads into account: Costs of building, heating, lighting. Costs of networking and communications. Costs of shared facilities...

Read More

Project Management

COMP201 Lectures

This is the process of organising, planning and scheduling software projects. We need to make sure that the product is delivered on time and each component is delivered on schedule. Management Activities Proposal Writing Project Planning and Scheduling Project Costing Project Monitoring and Reviews Personnel Selection and Evaluation Report Writing...

Read More

Advanced XQuery

COMP207 Lectures

Order By This clause is included in the following order: Clause Requirement for & let Any number, interleaved.Some interpreters require at least one let. where Optional order by Optional return Mandatory and we can use it like so: let $doc := doc("mydoc.xml") for $b in $doc/books/book for $author in $b/author...

Read More