ICX 1 Solution
.pdf
keyboard_arrow_up
School
Memorial University of Newfoundland *
*We aren’t endorsed by this school
Course
5720
Subject
Computer Science
Date
Feb 20, 2024
Type
Pages
3
Uploaded by ElderFogHerring33
Question 1 (0.25 points) Saved
Which of the following statements is true of the relational data model Question 1 options: It predates the invention of the computer. It can only represent relationships between entity types It consists of tables and chairs It consists of a set of tables containing data Question 2 (0.25 points) Saved
A row in a table can be represented as follows: PostalCode = {NL, NS, NB, PE, QC, ON, MB, SK, AB, BC, YT, NT, NU}, which represents the 13 Canadian provide/territory postal designations. Question 2 options: True False Question 3 (0.25 points) Saved
Which of the following is NOT a relational rule? Question 3 options: A table can contain more than one primary key Multi-valued attributes cannot be contained in a table Duplicate tuples in a table are not possible Primary key attributes must have a value for each tuple Foreign key values in one table must be present as values of a primary key in another table.
Question 4 (0.25 points) Saved
Which of the following statements are true? Question 4 options: Insert operations add new tuples to a relation Delete operations change existing values in a tuple by deleting old values and adding new values Update operations add new relations to a database Delete operations can lead to loss of referential integrity Question 5 (0.25 points) Saved
Which of the following are possible? Question 5 options: A tuple can have a null value for a primary key A tuple can have a null value for a foreign key Every foreign key value in a table must be a primary key value in another table If you lose a foreign key, you cannot access a database in a country other than the one in which it was created Question 6 (0.25 points) Saved
A superkey is another term for primary key. Question 6 options: True False Question 7 (0.25 points)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
J
SHORTAND NOTATION FOR RELATIONAL SQL TABLES
Notation Example Meaning
Underlined A or A, B The attribute(s) is
(are) a primary key
Superscript name
of relation
AR or AR, BR The attribute(s) is
(are) a foreign key
referencing
relation R
As an example, the schema
R(A, B, C, D, ES)
S(F, G, H)
corresponds to the following SQL tables:
CREATE TABLE R
( A <any SQL type>,
B <any SQL type>,
C <any SQL type>,
D <any SQL type>,
E <any SQL type>,
PRIMARY KEY(A),
FOREIGN KEY (E) REFERENCES S(F)
);
CREATE TABLE S
( F <any SQL type>,
G <any SQL type>,
H <any SQL type>,
PRIMARY KEY(F))
EXERCISE
Consider the following relational schema, representing five relations describing shopping transactions and
information about credit cards generating them [the used notation is explained above].
SHOPPINGTRANSACTION (TransId, Date, Amount, Currency, ExchangeRate, CardNbrCREDITCARD, StoreIdSTORE)
CREDITCARD (CardNbr, CardTypeCARDTYPE, CardOwnerOWNER, ExpDate, Limit)…
arrow_forward
SQL help
arrow_forward
ER- DIAGRAM/ DATABASE
The European Parliament wants to create a database to help the various countries store information about its inhabitants. Your mission is to create an ER chart that captures the following information:
In each country there are provinces, which contain cities. There can be no two provinces of the same name in a country. In the same way, there can be no two cities of the same name in a province. People live in cities. A person can be a man, a woman or a child, and have a first name, last name, ID, and birthday.Men and women work in a city. Children go to school in a city. Children are everyone persons under 18 years of age.A man can be married to a woman. For each marriage, they store the day for the marriage and information about who is the child of the married couple. You should assume that the parents of a child married at the time of her birth.
arrow_forward
struct student {
char name[20];
char studentID[10];
char phonenum [9];
char advisor [20];
float gpa;
}
Operations needed:
addnewStudent
{
purpose: to create a new student in the database
input: name, studentID.phonenum,advisor.gpa
output: none
}
Name another operation besides add that we could use for our student data structure.
arrow_forward
*SI schema contains customers that have bought one or more vehicles.They can be classified using the following criteria:Customers that have bought only one car (one-time buyer)Customer that have bought two cars (two-time buyer)Customers that have bought more than two cars (frequent buyer)Using a SINGLE SELECT statement, display a list of customers withtheir names and what type of buyer they are for all those customersthat have bought Mercedes car makes.
arrow_forward
Data type
1.) Database Design : Take a crack at designing a simple database for 'A
Small Dentist Office'. To keep it simple, please exclude any financial
or billing information. So build a simple database that keeps track of
patient information and appointments. Keep this very simple, maybe
4 tables.
Part I: First determine the entities. The entities will be the
tables. For example in an employee database the entities might
be: an Employee, a Dept. These would then become the
tables...the Employee table and the Dept table. Once you
have come up with your 4 tables, move on to Part II.
Part II: Design each table. Tables must include:
a. Appropriate column names
b. Data type for each column
c. Whether a column can be 'null' or not
d. Indicate any Primary Keys' and Foreign
Keys'.
e. Indicate any relationships with other tables
PS → DO NOT USE MSAccess to do this Assign. I would use Excel for
this Assign, or you could possibly use MS Word.
arrow_forward
URGENT!
arrow_forward
Structured Query Language (SQL) is a language widely used in industry to create, update and
query data in relational databases. You are required to write the SQL code.
Q.6.1
The below sample data in the third normal form was provided by a database
designer. Answer the below questions using this data.
Table: LawFirm
Primary key: LawFirmID (auto number)
All fields are mandatory
LawFirmID
Name
Yearlncorporated
1
Ze Boss Attorneys
2011
2
Lawyers for the Win
2018
3
Court Rulez
2019
Table: Lawyer
Primary key: LawyerlD
Foreign key: LawFirmID
LawyerID
LawFirmlD
Surname
Name
Age
Bianchi
Anna
45
7
2
Modise
Dikeledi
57
8
2
Ferreira
Piet
34
3
Nkosi
Jabulani
28
Q.6.1.1 Write a SQL statement to create the table Lawyer.
Hint: The sample data should give you an indication of the data
types you should use.
Q.6.1.2 Write a SQL statement that will calculate the average age of all the
lawyers that are at least 40 years old.
Q.6.1.3
Write a SQL statement to insert the below row into table LawFirm.
arrow_forward
c#
Create a small Sports database with two tables: Team and Athlete. The Team table should include fields for the type of team (e.g., basketball), coach's name (both last and first), and the season the sport is most active (S for spring, F for Fall, or B for both). The Athlete table should include fields for student number, student first and last names, and type of sport. Use the same identifier for type of sport in both tables to enable the tables to be related and linked. Populate the tables with sporting teams from your school. Write a C# program that displays information about each team, including the names of the athletes. The data base we have provided to us just need to know how to program it in with the other guidelines given.
arrow_forward
Lili Company 1
(Use C programming language and struct)Lili has a company, so it has a lot of employees.However, many of Lili employees have changed, resigned, and retired, causing the databasethat Lili has not synchronized properly. For that reason, Lili asks for your help to helpher make a list of Lili employees.Each employee has 3 attributes:• Name (max 20 character)• Gender (Laki-laki / Perempuan)• Division (Management / Accounting / HRD)There are several things you can do on the Lili database :1. Add EmployeeIn the add employee feature, the new employee will be after the old employee (ifall positions are full). Because Lili does not like to have employees who have thesame name, if there are employees who have the same name, the employee will notbe accepted to work at Lili’s company. New employees will always fill the leftmostplaces in the database to get a large salary.2. Change PositionThe employee’s position determines the employee’s salary, if the employee is in thefirst…
arrow_forward
Database Question:In this problem, you will come up with decision trees to predict if a planet is habitable based only on features observed by the telescope.In the table below, you are given the data from all 800 planets surveyed so far. The features observed by telescope are Size (“Big” or “Small”), and Orbit (“Near” or “Far”). Each row indicates the values of the features and habitability, and how many times that set of values was observed. So, for example, there were 20 “Big” planets “Near” their star that were habitable.Determine if Planet=Big and Orbit=Far is habitable? Derive and draw the decision tree learned by ID3 on this data.
arrow_forward
Programming Language :- C
arrow_forward
Medical Appointment System
C PROGRAMMING LANGAUGE:
You need to work in your group and identify what are the fields required. From that fields you need to
perform the following operations using any data structures elements that you have learned:
• Insert a new record in the appropriate position
• Remove a record when ID is given
• Update a record based on ID given
• Find a record based on ID given
• List all records in alphabetical order
You should include comments in your program to explain the processes that takes place.
arrow_forward
True or False :
___ Multiple Inheritance happens when a class has more than one sub-class. This problem can be observed in Programming Languages as well.
___ Given two relations named A and B, if we q-JOIN A and B, the maximum number of attributes in the result relation could be (the number of attributes of A) times(*) the number of attributes of B).
____ * in an SQL SELECT statement means “all the tuples”.
____ In relational algebra, Cartesian Product (X) can be implemented using the q-JOIN operator. Cartesian Product ISA q-JOIN where q-condition always evaluates to true.
____ SQL is based on Predicate Calculus. A query in SQL always specifies what should be included in the query result.
arrow_forward
How do data dictionaries aid in mapping dependencies between data elements?
arrow_forward
Course: Database systems: design and application
arrow_forward
Salesforce object query language
arrow_forward
C language
Identify what are the fields required to develop a Medical Appointment System. From
that fields you need to perform the following operations using any data structures elements
to develop the system.
Your program must include these functions:
Insert a new record in the appropriate position
Remove a record when ID is given
●
•
Update a record based on ID given
• Find a record based on ID given
List all records in alphabetical order
You should use linked list and stack and queue
You should include comments in your program.
** Kindly don't copy the code from the internet because it's
incorrect and doesn't include linked list, stack, and queue **
Thank you..
arrow_forward
Material : Relational Algebra
Course : Database Systems
Create a Relational Algebra From Entity Relational Diagram (ERD) Below for:a) Displays books published in the last 5 years from 2020.b) Displays details of customers who have done shopping (using the Join operator)c) Displays email customers who have done shopping (using the Set operator)d) Displays the ISBN book that has never been purchased (using the Set operator)
arrow_forward
SQL query Knowledge
arrow_forward
Question 2
Structured Query Language (SQL) is a standard computer language for relational database management and data manipulation. SQL queries
are used to insert, update and modify data. By referring to the Table1 below, write the SQL statements for the following:
Table 1: Students
ID
Names
PhoneNumber
Country
Somalia
Age
1234
Aishah
0131234561
18
Absya
Ah Meng
Bee Chean
Malaysia
China
4567
0131234562
21
8910
01312345673
20
1112
01312345674
Korea
19
1314
Buchanan
0131234565
Korea
20
(a) Add new column: Ambition Varchar (20).
(b) Display Names and Ambition for 20 year old students using SQL.
(c) Delete Table Students.
(d) Delete column country.
(e) Use SQL statements to update all Country names in the Students table from Korea to
Malaysia.
arrow_forward
DATABASE:
library (library_name [pk], City, Phone, manager_SSN[pk, fk])
book (book_name [pk], Genre, Country)
borrower (SSN[pk], Name, Birthyear, Fav book [fk], Gender)
likes (SSN[pk, fk], book [pk, fk])
bookLoans (library [fk], books [fk])
manager (SSN[pk], Name, City, Address, Phone)
Provide OPTIMIZED relational algebra for the following queries:
1 a) List name, gender, and age of all borrowers.
b) List all male borrowers older than 65 years of age.
c) List the book names loaned by at least one library and liked by at least one borrower.
d) List the name and ssn of all borrowers who like their favorite book
arrow_forward
“Martial Arts R Us” (MARU) needs a database. MARU is a martial arts school with hundreds of students. The database must keep track of all the classes that are offered, who is assigned to teach each class, and which students attend each class. Also, it is important to track the progress of each student as they advance.
Students are given a student number when they join the school. The number is stored along with their name, date of birth, and the date they joined the school.
All instructors are also students, but clearly not all students are instructors. In addition to the normal student information, for all instructors, the date that they start working as an instructor must be recorded along with their instructor status (compensated or volunteer).
An instructor may be assigned to teach any number of classes, but each class has one and only one assigned instructor. Some instructors, especially volunteer instructors, may not be assigned to any class.
A class is offered for a…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Fundamentals of Information Systems
Computer Science
ISBN:9781305082168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Related Questions
- J SHORTAND NOTATION FOR RELATIONAL SQL TABLES Notation Example Meaning Underlined A or A, B The attribute(s) is (are) a primary key Superscript name of relation AR or AR, BR The attribute(s) is (are) a foreign key referencing relation R As an example, the schema R(A, B, C, D, ES) S(F, G, H) corresponds to the following SQL tables: CREATE TABLE R ( A <any SQL type>, B <any SQL type>, C <any SQL type>, D <any SQL type>, E <any SQL type>, PRIMARY KEY(A), FOREIGN KEY (E) REFERENCES S(F) ); CREATE TABLE S ( F <any SQL type>, G <any SQL type>, H <any SQL type>, PRIMARY KEY(F)) EXERCISE Consider the following relational schema, representing five relations describing shopping transactions and information about credit cards generating them [the used notation is explained above]. SHOPPINGTRANSACTION (TransId, Date, Amount, Currency, ExchangeRate, CardNbrCREDITCARD, StoreIdSTORE) CREDITCARD (CardNbr, CardTypeCARDTYPE, CardOwnerOWNER, ExpDate, Limit)…arrow_forwardSQL helparrow_forwardER- DIAGRAM/ DATABASE The European Parliament wants to create a database to help the various countries store information about its inhabitants. Your mission is to create an ER chart that captures the following information: In each country there are provinces, which contain cities. There can be no two provinces of the same name in a country. In the same way, there can be no two cities of the same name in a province. People live in cities. A person can be a man, a woman or a child, and have a first name, last name, ID, and birthday.Men and women work in a city. Children go to school in a city. Children are everyone persons under 18 years of age.A man can be married to a woman. For each marriage, they store the day for the marriage and information about who is the child of the married couple. You should assume that the parents of a child married at the time of her birth.arrow_forward
- struct student { char name[20]; char studentID[10]; char phonenum [9]; char advisor [20]; float gpa; } Operations needed: addnewStudent { purpose: to create a new student in the database input: name, studentID.phonenum,advisor.gpa output: none } Name another operation besides add that we could use for our student data structure.arrow_forward*SI schema contains customers that have bought one or more vehicles.They can be classified using the following criteria:Customers that have bought only one car (one-time buyer)Customer that have bought two cars (two-time buyer)Customers that have bought more than two cars (frequent buyer)Using a SINGLE SELECT statement, display a list of customers withtheir names and what type of buyer they are for all those customersthat have bought Mercedes car makes.arrow_forwardData type 1.) Database Design : Take a crack at designing a simple database for 'A Small Dentist Office'. To keep it simple, please exclude any financial or billing information. So build a simple database that keeps track of patient information and appointments. Keep this very simple, maybe 4 tables. Part I: First determine the entities. The entities will be the tables. For example in an employee database the entities might be: an Employee, a Dept. These would then become the tables...the Employee table and the Dept table. Once you have come up with your 4 tables, move on to Part II. Part II: Design each table. Tables must include: a. Appropriate column names b. Data type for each column c. Whether a column can be 'null' or not d. Indicate any Primary Keys' and Foreign Keys'. e. Indicate any relationships with other tables PS → DO NOT USE MSAccess to do this Assign. I would use Excel for this Assign, or you could possibly use MS Word.arrow_forward
- URGENT!arrow_forwardStructured Query Language (SQL) is a language widely used in industry to create, update and query data in relational databases. You are required to write the SQL code. Q.6.1 The below sample data in the third normal form was provided by a database designer. Answer the below questions using this data. Table: LawFirm Primary key: LawFirmID (auto number) All fields are mandatory LawFirmID Name Yearlncorporated 1 Ze Boss Attorneys 2011 2 Lawyers for the Win 2018 3 Court Rulez 2019 Table: Lawyer Primary key: LawyerlD Foreign key: LawFirmID LawyerID LawFirmlD Surname Name Age Bianchi Anna 45 7 2 Modise Dikeledi 57 8 2 Ferreira Piet 34 3 Nkosi Jabulani 28 Q.6.1.1 Write a SQL statement to create the table Lawyer. Hint: The sample data should give you an indication of the data types you should use. Q.6.1.2 Write a SQL statement that will calculate the average age of all the lawyers that are at least 40 years old. Q.6.1.3 Write a SQL statement to insert the below row into table LawFirm.arrow_forwardc# Create a small Sports database with two tables: Team and Athlete. The Team table should include fields for the type of team (e.g., basketball), coach's name (both last and first), and the season the sport is most active (S for spring, F for Fall, or B for both). The Athlete table should include fields for student number, student first and last names, and type of sport. Use the same identifier for type of sport in both tables to enable the tables to be related and linked. Populate the tables with sporting teams from your school. Write a C# program that displays information about each team, including the names of the athletes. The data base we have provided to us just need to know how to program it in with the other guidelines given.arrow_forward
- Lili Company 1 (Use C programming language and struct)Lili has a company, so it has a lot of employees.However, many of Lili employees have changed, resigned, and retired, causing the databasethat Lili has not synchronized properly. For that reason, Lili asks for your help to helpher make a list of Lili employees.Each employee has 3 attributes:• Name (max 20 character)• Gender (Laki-laki / Perempuan)• Division (Management / Accounting / HRD)There are several things you can do on the Lili database :1. Add EmployeeIn the add employee feature, the new employee will be after the old employee (ifall positions are full). Because Lili does not like to have employees who have thesame name, if there are employees who have the same name, the employee will notbe accepted to work at Lili’s company. New employees will always fill the leftmostplaces in the database to get a large salary.2. Change PositionThe employee’s position determines the employee’s salary, if the employee is in thefirst…arrow_forwardDatabase Question:In this problem, you will come up with decision trees to predict if a planet is habitable based only on features observed by the telescope.In the table below, you are given the data from all 800 planets surveyed so far. The features observed by telescope are Size (“Big” or “Small”), and Orbit (“Near” or “Far”). Each row indicates the values of the features and habitability, and how many times that set of values was observed. So, for example, there were 20 “Big” planets “Near” their star that were habitable.Determine if Planet=Big and Orbit=Far is habitable? Derive and draw the decision tree learned by ID3 on this data.arrow_forwardProgramming Language :- Carrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningFundamentals of Information SystemsComputer ScienceISBN:9781305082168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Fundamentals of Information Systems
Computer Science
ISBN:9781305082168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning