Create a database with 3 tables, tblCompany, tblContact, tblCall. 2) Add fields
ID: 3876763 • Letter: C
Question
Create a database with 3 tables, tblCompany, tblContact, tblCall.
2) Add fields to each table. Include appropriate data types such as Lookup, Yes/No, Attachment, Hyperlink, etc.
3) Add appropriate field properties such as Field Size, Required, Default Values, Input Masks, Formats, Captions, Validation rules and text.
4) Add at least 15 records to each table, YOU need to be one of the contacts somewhere in your contact table.
5) Use the data in your tables to create at least 10 queries. Some options include a date function, an AND or OR function, operators, a parameter query, expressions (calculated field using builder), crosstab if applicable, find unmatched, find duplicates, etc.
6) Create 3 forms (could include a main form/subform, split form, a calculated control, and a button) and 3 reports. Make sure they are useful and would enhance the database.
7) Make sure your relationships are built correctly, currency fields reflect dollar signs, fields names are showing (fields aren't too narrow for titles), etc.
Explanation / Answer
First, I am going to create table
CREATE TABLE tblCompany
( comp_id number(10) NOT NULL PRIMARY KEY ,comp_name varchar2(50) NOT NULL, comp_city varchar2(50),comp_details LONG RAW );
CREATE TABLE tblCustomer
( cust_id number(10) NOT NULL PRIMARY KEY , cust_name varchar2(50) NOT NULL, comp_id number(10) NOT NULL, cust_city varchar2(50) , cust_photo BLOB );
CREATE TABLE tblCall
( call_id number(10) NOT NULL, cust_id number(10) NOT NULL,call_date DATE DEFAULT (sysdate) );
In above I have created three tables which include data type related to attachment of files and photo in LONG RAW and BLOB
I have added field properties such as NOT NULL, Primary key etc to the table.
for inserting the data into the table the query are
insert into tblCompany values(123,abc,xyz,rawtohex('Details'));
the above query is for the first table
insert into tblCustomer values(121,abc,123,xyz,utl_raw.cast_to_raw ('img'));
insert into tblCall(111,121);
like above we can enter the values into three tables.
the queries asked are
select CURRENT_DATE from tblCALL;
select * from tblCompany where comp_id = 123;
select * from tblCustomer where cust_id <= 333;
select * from tblCompany where comp_id = 123 union select * from tblCustomer where cust_id =321 ;
select * from tblCustomer inner join tblCall on tblCustomer.cust_id=tblCall.Cust_id;
The above aare some of the queries reuired.
Kindly can you ask the remaining two questions separately as I have to answer four questions only .
I hope you understand the above. Thank you.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.