








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Table of Contents # 01: Introduction to MS Visio # 02: Notations for Entities and Attributes # 03: Notations for Relationships # 05: Conversion of ERD into relational schema # 06: Conversion of EERD into relational schema # 07: Transformation of relational to physical schema # 08: Normalization # 09: Introduction to SQL, DDL Commands # 10: DML Commands (Insert, Update, Delete) # 11: DML Commands (Joins: Inner & Outer Joins etc.) # 12: DML Commands (Aggregate Functions, Group by etc.)
Typology: Lab Reports
1 / 48
This page cannot be seen from the preview
Don't miss anything!









































HAS
workers in companies. TEC’s manager gives you the following description of the business: TEC has a file of candidates who are willing to work. If the candidate has worked before, that candidate has a specific job history. (Naturally, no job history exists if the candidate has never worked.) Each time the candidate works, one additional job history record is created.
attributes in MS Visio. Lab Task 1: The Company is organized into departments. Each department has a unique name, a unique number, and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A department may have several locations. A department controls a number of projects, each of which has a unique name, a unique number, and a single location. The database will store each employee’s name, CNIC, address, salary, sex (gender), and birth date. An employee is assigned to one department, but may work on several projects, which are not necessarily controlled by the same department. It is required to keep track of the current number of hours per week that an employee works on each project, as well as the direct supervisor of each
Entity Name Entity Attributes
temporary workers in companies. TEC’s manager gives you the following description of the business: TEC has a file of candidates who are willing to work. If the candidate has worked before, that candidate has a specific job history. (Naturally, no job history exists if the candidate has never worked.) Each time the candidate works, one additional job history record is created. Each candidate has earned several qualifications. Each qualification may be earned by more than one candidate. (For example, it is possible for more than one candidate to have earned a BBA degree or a Microsoft Network Certification. And clearly, a candidate may have earned both a BBA and a Microsoft Network Certification.) TEC also has a list of companies that request temporaries. Each time a company requests a temporary employee, TEC makes an entry in the Openings folder. That folder contains an opening number, a company name, required qualifications, a starting date, an anticipated ending date, and hourly pay. Each opening requires only one specific or main qualification. When a candidate matches the qualification, the job is assigned and an entry is made in the Placement Record folder. That folder contains an opening number, a candidate number, the total hours worked, etc. In addition, an entry is made in the job history for the candidate. An opening can be filed by many candidates, and a candidate can fill many openings. Solution: TEC’s management wants to keep track of the following entities:
Lab Task 1: The Company is organized into departments. Each department has a unique name, a unique number, and a particular employee who manages the department. We keep track of the start date when that employee began managing the department. A department may have several locations. A department controls a number of projects, each of which has a unique name, a unique number, and a single location. The database will store each employee’s name, CNIC, address, salary, sex (gender), and birth date. An employee is assigned to one department, but may work on several projects, which are not necessarily controlled by the same department. It is required to keep track of the current number of hours per week that an employee works on each project, as well as the direct supervisor of each
Lab Task 1: Consider an ONLINE_AUCTION database system in which members (buyers and sellers) participate in the sale of items. The data requirements for this system are summarized as follows: The online site has members, each of whom is identified by a unique member number and is described by an e-mail address, name, password, home address, and phone number. A member may be a buyer or a seller. A buyer has a shipping address recorded in the database. A seller has a bank account number and routing number recorded in the database. Items are placed by a seller for sale and are identified by a unique item number assigned by the system. Items are also described by an item title, a description, starting bid price, bidding increment, the start date of the auction, and the end date of the auction. Items are also categorized based on a fixed classification hierarchy (for example, a modem may be classified as COMPUTER → HARDWARE → MODEM). Buyers make bids for items they are interested in. Bid price and time of bid are recorded. The bidder at the end of the auction with the highest bid price is declared the winner, and a transaction between buyer and seller may then proceed. The buyer and seller may record feedback regarding their completed transactions. Feedback contains a rating of the other party participating in the transaction (1–10) and a comment.
Lab Task 2: The database keeps track of three types of persons: employees, alumni and students. A person can belong to one, two, or all three of these types. Each person has a name, SSN, sex, address, and birth date. Every employee has a salary, and there are three types of employees: faculty, staff and student assistants. Each employee belongs to exactly one of these types. For each alumnus, a record of the degree or degrees that he or she earned at the university is kept, including the name of the degree, the year granted, and the major department. Each student has a major department. Each faculty has a rank, whereas each staff member has a staff position. Student assistants are classified further as either research assistants or teaching assistants, and the percent of time that they work is recorded in the database. Research assistants have their research project stored, whereas teaching assistants have the current course they work on. Students are further classified as either graduate or undergraduate, with the specific attributes degree program (M.S., Ph.D., M.B.A., and so on) for graduate students and class (freshman, sophomore, and so on) for undergraduates.
Lab Task 2:
Div-code Div_Name Emp-Num
Emp-Num Emp_Fname Emp_Lname Emp_Initial Emp_Extension Emp_Email Dept-code
Assign-Num Assign_Date Assign_Hours Emp-Num Proj-code
Dept-code Dept_Name Div-code Proj-code Proj_Name
Lab # 06 Tasks: Transform the following EERD into relational schema. Lab Task 1:
Emp-id Name Address
Sectr-id Typing_speed
Manage-id Manag_start_date
Emp_id Hourly_rate Tech-id T_Grade Emp_id Salary Manage-id Experience
Lab Task 2: