Hello experts, I have a few DBA questions that I need checking out, and I don't have access to a sample Oracle and SQL/Server Database.
: Assuming table t1 has the following columns:
userid (primary key), name, phone_num_home, phone_num_work, phone_num_cell, phone_num_pager
Redesign t1, create a table t2 to join to table t1, and normalize the database by eliminating the “repeating group” of phone number columns in t1.
- The goal is to "Create table t2 and copy the contents of table t1 into table t2 and join table t1 using userid (primary key), ".
- This achieved with the use of a SQL "Create table t2 (select * from t1);"
- Then you will need to maintain referential integrigty by using a SQL "Alter table t2 adding a (t2.userid) Foreign Key from table t2 restraint that references (t1.userid) Primary Key field from table t1.
- You should will make a backup copy of table t1. Then finally you should do a SQL "Alter table t1 drop ( phone_num_home, phone_num_work, phone_num_cell, phone_num_pager)
Please let me know if steps are correct or if I missed something.
: Assuming a character column named [title] in table t1 with the following values:
The Day Of The Jackal
Sleepless In Seattle
Gone With The Wind
What is the result set of the following SQL statement?
SELECT LOWER(SUBSTR(title,1,7)) FROM t1
Assuming that this statement is a syntactically correct MySql statement. The result set should look like the following:
- The Day Of The Jackal --->the day
- Sleepless In Seattle -->sleeple
- Gone With The Wind -->gone wi
Could anyone check to see if this result set is correct?
: What are the most likely physical file names for a SQL Server database named MyDB, including the standard file extensions?
I could look this up but if you know the answer or know where I can get it quickly, I'd appreciate it.
Thanks experts I look forward to your response,