Tag: dblabcs


Databases – lab 5 (Computer Science)

Lab 5. Indexes

  • assigned: week 11; due: week 12

Work on 3 tables of the form Ta(aid, a2, …), Tb(bid, b2, …), Tc(cid, aid, bid, …), where:

  • aid, bid, cid, a2, b2 are integers;
  • the primary keys are underlined;
  • a2 is UNIQUE in Ta;
  • aid and bid are foreign keys in Tc, referencing the primary keys in Ta and Tb, respectively.

Databases – lab 4 (Computer Science)

Lab 4. Database Testing

  • assigned: week 8; due: week 11

After you finished designing your database, the development team is interested in assessing the performance of your design. To record different test configurations and results, you create the following relational structure:

Tests – holds data about different test configurations;
Tables – holds data about tables that might take part in a test;
TestTables – link table between Tests and Tables (which tables take part in which tests);
Views – holds data about a set of views from the database, used to assess the performance of certain SQL queries;
TestViews – link table between Tests and Views (which views take part in which tests);
TestRuns contains data about different test runs; each test run involves:

  • deleting the data from the test’s tables – in the order specified by the Position field (table TestTables);
  • inserting data into the test’s tables – reverse deletion order; the number of records to insert is stored in the NoOfRows field (table TestTables);
  • evaluating the test’s views;

TestRunTables – contains performance data for INSERT operations for every table in the test;
TestRunViews – contains performance data for every view in the test.…


Databases – lab 3 (Computer Science)

Lab 3. Altering the Database

  • assigned: week 6; due: week 8

Sometimes, after you design a database, you need to change its structure. Unfortunately, changes aren’t correct every time, so they must be reverted. Your task is to create a versioning mechanism that allows you to easily switch between database versions.…


Databases – lab 2 (Computer Science)

Lab 2. SQL Queries

  • assigned: week 3; due: week 6

On the relational structure created for the first lab, write SQL statements that:

  • insert data – for at least 4 tables; at least one statement should violate referential integrity constraints;
  • update data – for at least 3 tables;
  • delete data – for at least 2 tables.

Databases – lab 1 (Computer Science)

Lab 1. Database Design

  • assigned: week 1; due: week 3

Imagine a simple application that requires a database. Represent the application data in a relational structure and implement the structure in a SQL Server database. The database must contain at least: 10 tables, two 1:n relationships, one m:n relationship.…


Databases – Practical exam bonus (Computer Science)

You can earn an extra point on the practical exam if you submit an interesting, original query to sabina@cs.ubbcluj.ro. The query must be useful to a potential user.
Submission deadline: November 6, 2019
Files to submit:
* Group_StudentLastName_StudentFirstName_Query.sql – query + short description;
* Group_StudentLastName_StudentFirstName_DbDiagram.png – database diagram.…


Practical exam bonus

The following students earned an extra point on the practical exam (alphabetical order): Adascalitei Alexandru, Cseke Alpar, Deaconu Andrei, Farauanu Ionut, Fitero Isabela, Georgescu Stefan Paul, Gingu Ionut Viorel, Goteciuc Gabriel, Irimia Cristiana, Marcu Alexandru, Mesesan Patricia, Naiman Alexandru, Narita Gheorghe-Marcel, Pasca Vanessa.

Congratulations to all participants, Merry Christmas and a Happy New Year! 🙂…