Quiz
ГОС по БД #1
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (89)
1Define a degree of a relation
- AHow many rows a table has
- Bhow long each tuple is, or how many columns the table has
- Chow many different tuples there are
- Dhow many different datatypes table has
2Define a cardinality of a relation
- Ahow long each tuple is
- Bhow many columns the table has
- Chow many different tuples there are, how many rows a table has
- Dhow many different datatypes table has
3Which of the following refers to union-compatibility requirements ?
- ASame number of columns
- BSame number of rows
- CSame number of tuples
- DDifferent domains
4Which of the following refers to union-compatibility requirements ?
- ACorresponding columns have the same domains
- BSame number of rows
- CSame number of tuples
- DCorresponding columns have the same fields
5Define a domain
- Arestrict the possible values a tuple can assign to each attribute
- Brelations to each other
- Cuniquely identifies each tuple that appears in a relation
- Dminimality of the attribute
6Define a foreign key
- Arestrict the possible values a tuple can assign to each attribute
- Brelations to each other
- Cuniquely identifies each tuple that appears in a relation
- Dminimality of the attribute
7Define a primary key
- Arestrict the possible values a tuple can assign to each attribute
- Brelations to each other
- Cuniquely identifies each tuple that appears in a relation
- Ddatatypes of attributes
8Define restrict
- Astop the user from doing it
- Blet the changes flow on
- Cmake referencing values the default for their column
- Dmake referencing values null
9Define cascade
- Astop the user from doing it
- Blet the changes flow on
- Cmake referencing values the default for their column
- Dmake referencing values null
10Define set default
- Astop the user from doing it
- Blet the changes flow on
- Cmake referencing values the default for their column
- Dmake referencing values null
11Define set null
- Astop the user from doing it
- Blet the changes flow on
- Cmake referencing values the default for their column
- Dmake referencing values null
12Define Data Definition Language
- ASpecify database format
- BSpecify access controls (privileges)
- CSpecify and retrieve database contents
- DSpecify table attribute uniqueness
13Define Data Control Language
- ASpecify access controls (privileges)
- BSpecify database format
- CSpecify and retrieve database contents
- DSpecify table attribute uniqueness
14Define Data Manipulation Language
- ASpecify table attribute uniqueness
- BSpecify database format
- CSpecify access controls (privileges)
- DSpecify and retrieve database contents
15Which of the following does not refer to DBMS tools
- AOracle
- BPostgreSQL
- CMySQL
- DPython
16Which of the following is used to provide privilege to only a particular attribute?
- AGrant select on employee to finance
- BGrant update(salary, rate) on employee to finance
- CGrant update(salary) on employee to finance
- DGrant delete to finance
17Which of the following statement is used to remove the privilege from the user finance?
- ARemove update on employee from finance
- BDelete select on employee from finance
- CRevoke update on employee from finance
- DGrant update on employee from finance
18Which of the following is true regarding views?
- AThe user who creates a view cannot be given update authorization on a view without having update authorization on the relations used to define the view.
- BIf a user creates a view on which no authorization can be granted, the system will allow the view creation request.
- CA user who creates a view receives all privileges on that view.
19If we wish to grant a privilege and to allow the recipient to pass the privilege on to other users, we append the __________ clause to the appropriate grant command.
- AWith grant
- BGrant user
- CWith grant option
- DGrant pass privelege
20Which of the following is used to avoid cascading of authorizations from the user?
- AGranted by current role
- BRevoke grant option for select on department from finance;
- CRevoke select on employee from finance, cashier restrict;
- DRevoke select on department from finance, cashier cascade;
21Privileges are granted over some specified parts of a database, such as a
- ASchema
- BEnvironment
- CRelation Or view
- DQuery statement
22Prevention of access to the database by unauthorized users is referred to as:
- AIntegrity
- BProductivity
- CSecurity
- DReliability
23Database Authentication refers to:
- Amethods of restricting user access to system
- Bcontrolling access to portions of database
- Call of the answers mentioned
- Dcontrolling the operation on the data
24A set of possible data values is called
- Aattribute
- Bdegree
- Cdomain
- Dtuple
25A functional dependency between two or more non-key attributes is called
- APartial transitive dependency
- BFunctional dependency
- CTransitive dependency
- DPartial functional dependency
26__ refers to the correctness and completeness of the data in a database.
- ADatabase security
- BData constraint
- CData integrity
- DData independence
27Which of the following creates a virtual relation for storing the query?
- AFunction
- BProcedure
- CView
- DNone of the mentioned
28Which of the following is the syntax for views where v is view name?
- ACreate view v as “query name”;
- BCreate “query expression” as view;
- CCreate view v as “query expression”;
- DCreate view “query expression”;
29Updating the value of the view
- AWill not change the view definition
- BWill not affect the relation from which it is defined
- CWill affect the relation from which it is defined
- DCannot determine
30Create view faculty as: Select ID, name, dept name from instructor; Find the error in this query.
- AInstructor
- BSelect
- CNone of the mentioned
- DView …as
31Which of the following is a basic form of grant statement?
- AGrant ‘privilege list’ on ‘user/role list’ to ‘relation name or view name’;
- BGrant ‘privilege list’ to ‘user/role list’;
- CGrant ‘privilege list’ on ‘relation name or view name’ to ‘user/role list’;
- DGrant ‘privilege list’ on ‘relation name or view name’ on ‘user/role list’;
32Retrieve all data from the table OFFICE { id,room, name}
- ASelect *from office;
- BSelect from office;
- CSelect name from office;
- DSelect *form office;
33Retrieve office name from the table OFFICE {id, room, name}
- ASelect *from office;
- BSelect from office;
- CSelect name from office;
- DSelect *form office;
34Retrieve office id from the table OFFICE {id, room, name}
- ASelect *from office;
- BSelect id from office;
- CSelect name from office;
- DSelect id form office;
35Retrieve office id and room from the table OFFICE {id, room, name}
- ASelect *from office;
- BSelect id, room from office;
- CSelect room name from office;
- DSelect id form office;
36Retrieve quantity of offices in the office table - OFFICE {id, rom, name}
- ASelect avg (id) from office;
- BSelect count (id) from office;
- CSelect sum (id) from office;
- DSelect max (id) from office;
37Retrieve total number scholarship in the students table – STUDENTS {id, name, scholarship, registereddate, tutorid}
- ASelect avg (scholarship) from office;
- BSelect count (scholarship) from office;
- CSelect sum (scholarship) from office;
- DSelect max (scholarship) from office;
38Retrieve quantity of students in the students table – STUDENTS {id, name, scholarship, registereddate, tutorid}
- ASelect avg (id) from office;
- BSelect count (id) from office;
- CSelect sum (id) from office;
- DSelect max (id) from office;
39Sort students name by descending order - STUDENTS {id, name, scholarship, registereddate, tutorid}
- ASelect name from students order by desc;
- BSelect name from students group by desc;
- CSelect *from students order by desc;
- DSelect name form students order by desc;
40Find an average scholarship of students - STUDENTS {id, name, scholarship, registereddate, tutorid}
- ASelect avg (scholarship) from students;
- BSelect count (scholarship) from students;
- CSelect sum (scholarship) from students;
- DSelect max (scholarship) from students;
41Find maximum scholarship of students - STUDENTS {id, name, scholarship, registereddate, tutorid}
- ASelect avg (scholarship) from students;
- BSelect count (scholarship) from students;
- CSelect sum (scholarship) from students;
- DSelect max (scholarship) from students;
42Find minimum scholarship of students - STUDENTS {id, name, scholarship, registereddate, tutorid}
- ASelect avg (scholarship) from students;
- BSelect count (scholarship) from students;
- CSelect min (scholarship) from students;
- DSelect max (scholarship) from students;
43Retrieve offices’ name and tutors’, who work in CSSE department. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, OFFICEID (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- ASelect o.name, t.name from office o join tutor t on o.id=t.officeid where o.name = ‘CSSE’
- BSelect o.name, t.name from office o join tutor t on o.id=t.id where o.name = ‘CSSE’
- CSelect o.name, t.name from office o join tutor t on o.id=t.officeid where o.name = ‘csse’
- DSelect o.name, t.name from office o join tutor t on o.id=t.officeid where o.name ‘CSSE’
44Retrieve all offices’ name and tutors’, who work in departments. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- ASelect o.name, t.name from office o left join tutor t on o.id=t.officeid;
- BSelect o.name, t.name from office o left join tutor t on o.id=t.id ;
- CSelect o.name, t.name from office o right join tutor t on o.id=t.officeid;
- DSelect o.name, t.name from office o right join tutor t on o.id=t.id ;
45Retrieve students’ name, who have more than average scholarship. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect s.name from students s where s.scholarship > (select avg (scholarship)from students);
- Bselect s.name from students s where s.scholarship > (select scholarship from students);
- Cselect s.name from students s where s.scholarship > avg (scholarship);
- Dselect s.name from students s where s.scholarship < avg (scholarship);
46Retrieve students’ name, who registered in 10th of Jan 2016. Tables: STUDENTS {id (PK), name, scholarship, registereddate, tutorid }.
- Aselect name from students where registereddate = '2016-01-10';
- Bselect name from students where registereddate = '2016-10-10';
- Cselect name from students where registereddate = 2016-10-10;
- Dselect name from students where registereddate = '2016-01-01';
47Retrieve tutors’ name, who have more than experience others along with their students name . Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect t.name, s.name from tutor t join students s on t.id=s.tutorid where experience = (select max (experience) from tutor);
- Bselect t.name, s.name, max(experience) from tutor t join students s on t.id=s.tutorid;
- Cselect t.name, s.name from tutor t join students s on t.id=s.id where experience = (select max (experience) from tutor);
48Retrieve tutors’ name, who have less experience than others along with their students name. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect t.name, s.name from tutor t join students s on t.id=s.tutorid where experience = (select min (experience) from tutor);
- Bselect t.name, s.name, min(experience) from tutor t join students s on t.id=s.tutorid;
- Cselect t.name, s.name from tutor t join students s on t.id=s.id where experience = (select min (experience) from tutor);
49Increase tutors experience and students’ scholarship twice. Retrieve experience and scholarship along with their names. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect t.name,t.experience*2, s.name, s.scholarship*2 from tutor t join students s on t.id=s.tutorid;
- Bselect t.name,t.experience*2, s.name, s.scholarship*2 from tutor t join students s on t.id=s.id;
- Cselect t.name,t.experience*2, s.name, s.scholarship*2 from tutor t join tutor s on t.id=s.tutorid;
- Dselect t.name,t.experience*2, s.name, s.scholarship*2 from tutor t join tutor s on t.id=s.id;
50Retrieve office, tutor and students name, but tutors name should have y value. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect o.name, t.name, st.name from tutor t join office o on o.id=t.officeid join students st on t.id=st.tutorid where t.name like '%y%';
- Bselect o.name, t.name, st.name from tutor t join office o o.id=t.officeid join students st on t.id=st.tutorid where t.name like '%y%';
- Cselect o.name, t.name, st.name from tutor t join office o on o.id=t.officeid join students st t.id=st.tutorid where t.name like '%y%';
- Dselect o.name, t.name, st.name from tutor t join office o on o.id=t.officeid join students st on t.id=st.id where t.name like '%y%';
51Retrieve office, tutor and students name, but tutors name should not have y value. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutored (FK references tutor (id))}.
- Aselect o.name, t.name, st.name from tutor t join office o on o.id=t.officeid join students st on t.id=st.tutorid where t.name not like '%y%';
- Bselect o.name, t.name, st.name from tutor t join office o o.id=t.officeid join students st on t.id=st.tutorid where t.name not like '%y%';
- Cselect o.name, t.name, st.name from tutor t join office o on o.id=t.officeid join students st t.id=st.tutorid where t.name not like '%y%';
- Dselect o.name, t.name, st.name from tutor t join office o on o.id=t.officeid join students st on t.id=st.id where t.name not like '%y%';
52Retrieve students name and scholarship along with their department name, who have scholarship between 4000 and 5000. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect s.name, s.scholarship, o.name from office o join tutor t on o.id=t.officeid join students s on t.id=s.tutorid where s.scholarship between 4000 and 5000;
- Bselect s.name, s.scholarship, o.name from office o join tutor t on o.id=t.officeid join students s on t.id=s.tutorid where s.scholarship 4000 and 5000;
- Cselect s.name, s.scholarship, o.name from tutor t join students s on t.id=s.tutorid where s.scholarship between 4000 and 5000;
- Dselect s.name, s.scholarship, o.name from tutor t join students s on t.id=s.tutorid where s.scholarship >=4000
53Retrieve information about office and their tutors as well. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.d
- Aselect *from office o join tutor t on o.id=t.officeid;
- Bselect *from office o join tutor t in o.id=t.officeid;
- Cselect *form office o join tutor t on o.id=t.officeid;
- Dselect *from office o join tutor t on o.id=t.id;
54Retrieve office name and tutor name, which have maximum experienced tutors. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect o.name, t.name from office o join tutor t on o.id=t.officeid where t.experience = (select max (experience) from tutor);
- Bselect o.name, t.name from office o join tutor t on o.id=t.officeid where t.experience = (select min (experience) from tutor);
- Cselect o.name, t.name from office o join tutor t on o.id=t.officeid where t.experience = (select high (experience) from tutor);
- Dselect o.name, t.name from office o join tutor t on o.id=t.officeid where t.experience = (select low (experience) from tutor);
55Retrieve all tutors and students names. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect t.name, s.name from tutor t full join students s on t.id=s.tutorid;
- Bselect t.name, s.name from tutor t full join students s t.id=s.tutorid;
- Cselect t.name, s.name from tutor t full join students s t.id=s.id;
- Dselect t.name, s.name from tutor t full join students s on t.id=s.id;
56Retrieve tutors’ name and the number of students for each of them. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect count (s.name) as numberofstudents, t.name from tutor t join students s on t.id=s.tutoridgroup by t.name;
- Bselect count (s.name) as numberofstudents, t.name from tutor t join students s on t.id=s.tutorid;
- Cselect count (s.name) as numberofstudents, t.name from tutor t join students s on t.id=s.idgroup by t.name;
- Dselect count (s.name) as numberofstudents, t.name from tutor t join students s on t.id=s.id;
57Retrieve office name and the number of students for each of them. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))}.
- Aselect count (s.name) as numberofstudents, o.name from tutor t join students s on t.id=s.tutoridjoin office o on o.id=t.officeid group by o.name;
- Bselect count (s.name) as numberofstudents, o.name from students s on join office o on o.id=s.id group by o.name;
- Cselect count (s.name) as numberofstudents, o.name from tutor t join students s on t.id=s.tutoridjoin office o o.id=t.officeid group by o.name;
- Dselect count (s.name) as numberofstudents, o.name from tutor t join students s on t.id=s.idjoin office o on o.id=t.id group by o.name;
58Retrieve all students’ name and scholarship, tutors name except students who have scholarship 3000$. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))
- Aselect s.name, t.name from students s join tutor t on s.tutorid=t.id where s.scholarship <> 3000;
- Bselect s.name, t.name from students s join tutor t on s.tutorid=t.id where s.scholarship = 3000;
- Cselect s.name, t.name from students s join tutor t on s.tutorid=t.id where s.scholarship < 3000;
- Dselect s.name, t.name from students s join tutor t on s.tutorid=t.id where s.scholarship is 3000;
59How many types of anomalies exist?
- A1
- B2
- C3
- D4
60Which of the following anomaly does not exist?
- ACreation anomaly
- BDeletion anomaly
- CInsertion anomaly
- DModification anomaly
61When an insertion anomaly occurs?
- Awe are prevented from inserting some data into a relation until other data can be supplied
- Bdeletion leads to an unintended loss of data
- Cit is possible that not all data needs to be changed will always be changed
- Dit does not occur
62When a modification anomaly occurs?
- Ait is possible that not all data needs to be changed will always be changed
- Bwe are prevented from inserting some data into a relation until other data can be supplied
- Cdeletion leads to an unintended loss of data
- Dit does not occur
63When a deletion anomaly occurs?
- Adeletion leads to an unintended loss of data
- Bit is possible that not all data needs to be changed will always be changed
- Cwe are prevented from inserting some data into a relation until other data can be supplied
- Dit does not occur
64Define inner join
- Aselects all rows from both tables as long as there is a match between the columns in both tables
- Breturns all rows from the left table (1), with the matching rows in the right table (2)
- Creturns all rows from the right table (2), with the matching rows in the right table (1)
- Dreturns all rows from the left table (1) and from the right table (2)
65Define left join
- Areturns all rows from the left table (1), with the matching rows in the right table (2)
- Bselects all rows from both tables as long as there is a match between the columns in both tables
- Creturns all rows from the right table (2), with the matching rows in the right table (1)
- Dreturns all rows from the left table (1) and from the right table (2)
66Define right join
- Areturns all rows from the right table (2), with the matching rows in the left table (1)
- Breturns all rows from the left table (1), with the matching rows in the right table (2)
- Cselects all rows from both tables as long as there is a match between the columns in both tables
- Dreturns all rows from the left table (1) and from the right table (2)
67Define full join
- Areturns all rows from the left table (1) and from the right table (2)
- Breturns all rows from the right table (2), with the matching rows in the right table (1)
- Creturns all rows from the left table (1), with the matching rows in the right table (2)
- Dselects all rows from both tables as long as there is a match between the columns in both tables
68Define an union
- Aсombines the result set of two or more select statements
- Breturns all rows from the left table (1) and from the right table (2)
- Creturns all rows from the right table (2), with the matching rows in the right table (1)
- Dreturns all rows from the left table (1), with the matching rows in the right table (2)
69INNER JOIN and JOIN are the same
- ATrue
- BFalse
70Define self join
- Areturns all rows from the table that references to yourself
- Breturns all rows from the right table (2), with the matching rows in the right table (1)
- Cselects all rows from both tables as long as there is a match between the columns in both tables
- Dreturns all rows from the left table (1) and from the right table (2)
71How many types of functional dependencies exist
- A1
- B2
- C3
- D0
72Which of the following does not to the functional dependency
- Aequational
- Bfull
- Ctransitive
- Dpartial
73Which of the following represent a full dependency?
- Ait exists in relation if there is no attribute A that can be removed from X and the dependency still holds
- Bif there exists an attribute A that is part of X that can be removed from X and the dependency still holds
- Cx->y dependency in relation R and x, y , z are columns in R. X->Y and Y>Z in R. Final: X->Y
- Dall above mentioned
74Which of the following represent a partial dependency?
- Aif there exists an attribute A that is part of X that can be removed from X and the dependency still holds
- Bit exists in relation if there is no attribute A that can be removed from X and the dependency still holds
- Cx->y dependency in relation R and x, y , z are columns in R. X->Y and Y>Z in R. Final: X->Y
- Dall above mentioned
75Which of the following represent a transitive dependency?
- Ax->y dependency in relation R and x, y , z are columns in R. X->Y and Y->Z in R. Final: X->Y
- Bif there exists an attribute A that is part of X that can be removed from X and the dependency still holds
- Cit exists in relation if there is no attribute A that can be removed from X and the dependency still holds
- Dall above mentioned
76When was first normalization developed?
- A1970
- B1972
- C1973
- D1974
77When was second normalization developed?
- A1971
- B1972
- C1973
- D1974
78When was Boyce–Codd normalization developed?
- A1974
- B1972
- C1973
- D1971
79Who is an inventor of relational model?
- AEdgar F.Codd
- BRaymond Boyce
- CMarine Jone
- DJohn Salamondor
80Which of the following refers to the requirement of 1NF
- AEach cell should be single valued
- BEntries in a column are same type
- CRows uniquely identified
- DAll above mentioned
81Which of the following refers to the requirement of 2NF
- AAll attributes (non-key columns) dependent on the key
- BEach cell should be single valued
- CAll fields (columns) can be determined only by the key in the table and no other column
- DAll above mentioned
82Which of the following refers to the requirement of 3NF
- AAll fields (columns) can be determined only by the key in the table and no other column
- BAll attributes (non-key columns) dependent on the key
- CEach cell should be single valued
- DAll above mentioned
83Define avg function
- AReturns average value
- BReturns total value
- CReturns the first value
- DConverts to lowercase
84Which function is used to retrieve quantity of rows
- Acount
- Bsum
- Cmax
- Davg
85Retrieve avg scholarship of students. Tables: office {id (PK), locations, name}, tutor {id (PK), name, officeid (FK references office (id)), experience}, students {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))
- Aselect avg (scholarship) from students;
- Bselect aveg (scholarship) from students;
- Cselect avr (scholarship) from students;
- Dselect avgr (scholarship) from students;
86Retrieve students’, scholarship and teacher's’ name, who have more than average scholarship. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))
- Aselect s.name, s.scholarship, t.name from students s, tutor t where t.id=s.tutorid and s.scholarship> (select avg(scholarship) from students)
- Bselect s.name, s.scholarship, t.name from students s, tutor t where t.id=s.tutorid and s.scholarship> avg(scholarship)
- Cselect s.name, s.scholarship, t.name from students s, tutor t where s.scholarship> (select avg(scholarship) from students)
- Dselect s.name, avg(s.scholarship), t.name from students s, tutor t
87Retrieve students’, scholarship and teacher's’ name, who have more than average scholarship AND increase those students twice. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))
- Aselect s.name, s.scholarship*2, t.name from students s, tutor t where t.id=s.tutorid and s.scholarship> (select avg(scholarship) from students)
- Bselect s.name, s.scholarship*2, t.name from students s, tutor t where t.id=s.tutorid and s.scholarship> avg(scholarship)
- Cselect s.name, s.scholarship*2, t.name from students s, tutor t where s.scholarship> (select avg(scholarship) from students)
- Dselect s.name, avg(s.scholarship)*2, t.name from students s, tutor t
88Retrieve students and mentors name, but mentors registration date should be before students registration date. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))
- Aselect s.name, m.name from students s join students m on s.tutorid=m.tutorid where s.registereddate<m.registereddate;
- Bselect s.name, m.name from students s join students m on s.tutorid=m.tutorid where s.registereddate>m.registereddate;
- Cselect s.name, m.name from students s join students m on s.tutorid=m.tutorid;
- Dselect s.name, m.name from students s join students m on s.registereddate=m.registereddate;
89Retrieve the highest experience from tutor. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))
- Aselect max (experience) from tutor;
- Bselect min (experience) from tutor;
- Cselect max (t.experience) from tutor t group by t.name;
- Dselect min (t.experience) from tutor t group by t.name;
Information
- Description
- God Philosophy Quiz on ГОС по БД #1, created by хомяк убийца on 23/03/2019.
- Author
- хомяк убийца
- Language
- English
- Views
- 1,624
- Tags
- Rating
- No ratings yet Rate this quiz