CSE102 – Computer Programming Homework #11 (Solution)

$ 24.99
Category:

Description

You can email iaytutuldu@gtu.edu.tr if you have any questions.
You are free to design and implement these operations as mentioned above in order to test your structure. Since this is the final homework assignment for this semester, you are free to use your programming knowledge and skills that has been improving throughout the semester.
1. Read from a file
2. Write to a file
Functionality MySQL command examples C program function name
Create a new database if not exists mysql> CREATE DATABASE <name>;
void create_database(char *name);
Show tables on a
database by names mysql> SHOW TABLES;
void show_table(database *d);
typedef struct database {
tables * tList; /* to be implemented as a
linked list */
int n; /* num of entries */ char * name; /* table name */
} database;
typedef struct tables { tables *next; table * t;
} tables;
typedef struct table {
char **field;
char **type; bool *isNull; bool *isKey;
} table;

For each table;
• 1st row of the table is the name of the fields(columns) with their type. (e.g. name | char (20))
• Other rows can be the different types such as char, int, float, double, char [64].
The database application will have a similar functionality as MySQL database; therefore, you would like to see the web page: MySQL

Describe tables mysql> DESCRIBE <name>; void desc_table(database *d, table *t);
Create a new table with columns on a database mysql> CREATE TABLE pet (name VARCHAR (20), owner VARCHAR (20), species VARCHAR (20)); void insert_table(database *d, table *t);
Remove a table from a database mysql> DROP TABLE <name>; void remove_table(database *d, char *name);
Insert a key on a table
mysql> ALTER TABLE contacts
ADD CONSTRAINT contacts_pk
PRIMARY KEY (contact_id); Void insert_key(database *d, table *t, key_value )

Once your database, tables and all operations ready, write a test driver and test your program by creating databases, tables, keys, and all the functions.
Submit all of your implementations including driver program and your output screens, files, reports if any, and any documentation that you write or used.
NOTE: You are free to change the design or implementation details (you must obey the linkedlist structure) that are reasonable for you if you comment on them.

Reviews

There are no reviews yet.

Be the first to review “CSE102 – Computer Programming Homework #11 (Solution)”

Your email address will not be published. Required fields are marked *