Question

Consider the database schema of college database. Students have a major department and take classes where...

Consider the database schema of college database. Students have a major department and take classes where faculty can be met.

Student (cwid int, name, text, age int, majorDept text)

Department (name text, chair text)

Faculty (name text, deptName text)

Enrollment (facName text, studID int)

Note that the underlined attributes are primary keys. studID, chair, deptName of Faculty, facName and majorDept of Student are foreign keys to cwid, name of Faculty, name of Department, name of Faculty and also name of Department, respectively. Insertion statements should include those tuples such that the SQL results should be NON-NULL.

a) Compare shreadsheets (e.g., Excel) and databases (e.g., SQLite3).

b) Compare simple database systems (e.g., SQLite3 or Microsoft Access) and complete database systems (e.g., Oracle or mySQL, SQLserver). Due to the shortage, how can such strong capabilities available in Oracle be implemented in a simple database system?

b) Define the table Department above in DML. Primary key should be defined.

d) Write an insertion statement to Student table (the value chosen by you as you wish)

e) Write an SQL statement to list the chair of all departments.

f) Write an SQL statement to list the faculty names who teach the student "Tom".

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

This demonstration is using SQL Server.

b.Create Department Table :

create table Department(
name varchar(50) primary key,
chair varchar(50)
);

d.Inserting records :

insert into student values(1,'Virat Kohli',23,'Maths');

e.

select chair from Department;

f.

select facName from Enrollment ,Student
where Enrollment.studID=Student.cwid and
name='Tom';

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
Consider the database schema of college database. Students have a major department and take classes where...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state,...

    The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode) ACADEMIC(acnum, deptnum*, famname, givename, initials, title) PAPER(panum, title) FIELD(fieldnum, id, title) INTEREST(fieldnum* acnumk, descrip) Some notes on the Academics database An academic department belongs to one institution (instname) and often has many academics. An academic only works for one department. Research papers (PAPER) are often authored by several academics, and of course an academic often writes several papers (AUTHOR) A research field (FIELD) often...

  • The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode)...

    The relational schema for the Academics database is as follows DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode) ACADEMIC(acnum, deptnum*, famname, givename, initials, title) PAPER(panum, title) FIELD(fieldnum, id, title) INTEREST(fieldnum* acnumk, descrip) Some notes on the Academics database An academic department belongs to one institution (instname) and often has many academics. An academic only works for one department. Research papers (PAPER) are often authored by several academics, and of course an academic often writes several papers (AUTHOR) A research field (FIELD) often...

  • Consider the below schema of the university database (keys are in bold and underline): Students(stuID: Integer,...

    Consider the below schema of the university database (keys are in bold and underline): Students(stuID: Integer, stuName: String, gender: String, age: Integer, gpa: Float) Departments(deptName: String, numPhDs: Integer) ProfessorWorks(profID: Integer, profName: String, deptName: String) CoursesOffer(cNo: String, cTitle: String, deptName: String) Majors(deptName:  String, stuID: Integer, degreeProgram: String; attendYear: String, attendSemester: String) Sections(cNo: String, academicYear: String, semester: String, sectNo: Integer, profID: Integer) Enrolls(stuID: Integer, cNo: String, academicYear: String, semester: String, sectNo: Integer, grade: String) Write the following queries in Relational algebra. Print...

  • 2) Consider the database schema on the relations (where key attributes have been underlined): PROJECTS(Number, Department,...

    2) Consider the database schema on the relations (where key attributes have been underlined): PROJECTS(Number, Department, ProjectName) EMPLOYEES(Number, Surname, FirstName, Department) ALLOCATIONSEmplovee, Project, Function, Date) NOTE: relation ALLOCATIONS stores the registration number (attribute Employee) of employees that are assigned to a given project (attribute Project is the number of the project, not the name of the project), the function the employee has in that project (i.e., technician, manager, etc.) and the date when the employee has been assigned to that...

  • The relational schema for the Academics database is as follows: DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode)...

    The relational schema for the Academics database is as follows: DEPARTMENT(deptnum, descrip, instname, deptname, state, postcode) ACADEMIC(acnum, deptnum*, famname, givename, initials, title) PAPER(panum, title) AUTHOR(panum*, acnum*) FIELD(fieldnum, id, title) INTEREST(fieldnum*, acnum*, descrip) Some notes on the Academics database: ● An academic department belongs to one institution (instname) and often has many academics. An academic only works for one department. ● Research papers (PAPER) are often authored by several academics, and of course an academic often writes several papers (AUTHOR). ●...

  • For this set of Review Questions, we will create and use a database for the Wedgewood...

    For this set of Review Questions, we will create and use a database for the Wedgewood Pacific Corporation (WPC) that is similar to the Microsoft Access database we created and used in Chapters 1 and 2. Founded in 1957 in Seattle, Washington, WPC has grown into an internationally recognized organization. The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The...

  • Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accoun...

    Overview: Database management plays an integral role in nearly every area of business. Databases house customer, accounting, and employee data, and these different data sets must all be efficiently managed in order to make the data accessible. Companies rely on database engineers to ensure that their records are accurate, updated, and tracked in real time. This course covers structured query language (SQL) and how it can be used to manage database schemas, manipulate data, and analyze data. For your final...

  • Q1: The following question are based on these database tables: EMPLOYEE FNAME MIDINT LNAME SSN BDATE ADDRESS SEX SALARY SUPER_SSN Dept_No James A Borg 123123123 Hous...

    Q1: The following question are based on these database tables: EMPLOYEE FNAME MIDINT LNAME SSN BDATE ADDRESS SEX SALARY SUPER_SSN Dept_No James A Borg 123123123 Houston, TX M 55000 Null 1 Franklin S Wong 234234234 Houston, TX M 40000 123123123 5 John Q Smith 345345345 Houston, TX M 30000 234234234 5 Jennifer L Wallace 456456456 Bellaire, TX F 43000 123123123 4 Alicia M Zalaya 567567567 Spring, TX F 25000 456456456 4 Ramesh R Narayan 678678678 Humble, TX M 38000 234234234...

  • (MMU) has decided to consolidate the functionality of three small overlapping database systems, which support applications...

    (MMU) has decided to consolidate the functionality of three small overlapping database systems, which support applications for 1) teaching (e.g. instructor assignment and evaluation), for 2) registration (e.g. online course status, waiting lists), and for 3) student records (e.g. transcript generation) The resulting new system will support the following enterprise description: Professors and GTAs are assigned to teach the sections of each class being offered in a semester. At the end of the semester, they get a "team rating" (professors...

  • I need help with the following SQL query for a company database (script given below). The...

    I need help with the following SQL query for a company database (script given below). The name of the Department. The number of employees working in that department. The number of different projects controlled by this department. The name of the project controlled by this department that has the maximum number of employees of the company working on it. The number of the above project. The cumulative sum of the number of employees of the company working on the projects...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT