Object-Based Databases - Database System Concepts
C H A P T E R22Object-Based DatabasesPractice car-rental company maintains a Database for all vehicles in its cur-rent fleet. For all vehicles, it includes the vehicle identification number,license number, manufacturer, model, date of purchase, andcolor. Spe-cial data are included for certain types of vehicles: Trucks: cargo capacity. Sports cars: horsepower, renter age requirement. Vans: number of passengers. Off-road vehicles: ground clearance, drivetrain (four- ortwo-wheeldrive).Construct anSQLschema definition for this Database . Use inheritancewhere :For this problem, we use table inheritance. We assume thatMyDate,ColorandDriveTrainTypeare pre-defined typeVehicle(vehicleidinteger,licensenumb erchar(15),manufacturerchar(30),modelcha r(30),purchasedateMyDate,colorColor)crea te tablevehicleof typeVehiclecreate tabletruck(cargocapacityinteger)underveh iclecreate tablesportsCar12Chapter 22Object-Based Databases (horsepowerintegerrenteragerequ irementinteger)undervehiclecreate tablevan(numpassengersint)
2 Chapter 22 Object-Based Databases (horsepower integerrenter age requirement integer) under vehicle create table van (num passengers integer)under vehicle create table offRoadVehicle (ground clearance realdriveTrain DriveTrainType) under vehicle 22.2 Consider a database schema with a relation Emp whose attributes are as shown below, with types specified for …
Download Object-Based Databases - Database System Concepts
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document: