You are on page 1of 20
1. Tell me about yourself and why you want this po “| am a strong team worker who can be relied upon to carry out my technical duties with passion and professionalism to ensure the goals of the department and the company | am working for are met. My level of SQL technical ability is a strong match for this role and | have experience of working with other developers, engineers and also third-party service providers to compete tasks successfully. | want this SQL position because | feel | can contribute to the team positively; | can bring something new in terms of my competence, and you are also an attractive employer to work for due to your future plans and also the reputation you have within the industry.” “Structured Query Language, more commonly known as SQL, is seen as the standard for managing data kept in relational database management systems. For example, SQL statements are used to carry out tasks including updating the data, and also retrieving specific data from a database.” Q3. Why do you want to work for our com tees “Within any SQL job, it’s really important to choose your employer carefully. What | mean by this is, in order to carry out your job properly, you need to work as part of a team that has clearly defined goals, sets high standards and also works collaboratively to achieve all company objectives. From what | found during my research into your organization, you are very well thought of by other people who work within the industry, you have exciting and ambitious plans for the future, and it is clear you give your staff the support they need to grow and develop within their roles.” “MySQL is an open-source relational database management system that is based on SQL, most commonly used for web databases. It was co-founded by Michael Widenius and the ‘My’ aspect of MySQL is the name of his daughter. The remainder is obviously an abbreviation for Structured Query Language. MySAL is utilized by a variety of database-driven web applications. These include WordPress and Joomla amongst others. It is also used by many of the world’s most popular websites, including YouTube, Facebook and Twitter. Written using C and C++ languages, MySQL supports the major platforms you'd expect such as macOS, Linux, and Windows.” So, SQL is often used to access, manipulate and update the data within a database, whereas MySQL is a relational database management system that keeps the data within the database organized. In other words, SQL is a language created to manage relational databases, and MySQL is an open-source relational database management system, based on SQL. “There are four main types of joins in SQL. These are FULL JOINS, RIGHT JOINS, LEFT JOINS and INNER JOINS. Joins basically combine the rows from two or more tables.” “An index is useful because it allows for the faster retrieval of records from a table. The index creates an entry for each value, which in turn, makes it much faster to retrieve the data required, or in other words, an index is a pointer to data contained within a table.” Cena fon “My personality is one of always being positive, having a can-do attitude and also being supportive of other developers, team members and ensuring | help out the team in a professional and timely manner. What’s important within any SQL role, is to remember you are all working together collaboratively to achieve the company’s objectives, and on that basis, you have to ig your technical expertise to the table, look for efficient ways of working, and also respond to people’s queries and questions in as quick a time as possible.” “There are several common SQL constraints. These are PRIMARY KEY, which identifies each record in a table; NOT NULL is used to prevent a NULL value being inserted into a column; FOREIGN KEY, which provides a unique identification of a row or record within another table; and also DEFAULT, which will automatically assign a default value if there has not been a value already specified for a field. There is also CHECK, which is a constraint that is used to verify that all values meet a specific criteria or condition in a field; and UNIQUE, which ensures unique values are always inserted into a column. Finally, INDEX is used to create data and to obtain it from a database with speed.” “In its simplest form, a TABLE is a collection of data that is organized into rows and columns. The columns are vertical, and the rows are horizontal. The columns are called FIELDS and the rows are often referred to as records.” So, there are three main subsets of SQL. Firstly, there is Data Control Language, or DCL, which permits you to control access to the database. For example, you can either grant access to the database or revoke it. Then there is DDL, which is Data Definition Language, which allows you to specify data structures in the database, including deleting tables, creating them or altering them Finally, there is Data Manipulation Language (DML) which, as the name suggests, allows you to manipulate the data, including updating, inserting, deleting or retrieving data in the table as required. {Q14, i's Spm on a Friday and you receive a request from a stakeholder who says it's urgent. You assess the task and it will take approximately one hour to complete. What would you do? “| would start off by clarifying what their exact requirements were before setting to work on the task to get it completed before | went home for the weekend. | think in those types of situations, it's easy to say you can't do it because it's late on a Friday afternoon, but this is an opportunity to show how flexible we are as an organization and to also provide great service by going above and beyond what would normally be required. My personal life is flexible, so | would certainly be available to stay behind and get tasks like these complete for the stakeholder.” “For this, the FORMAT function can be used. This function allows the formatting of the date and time. Firstly, | would decide what format | wanted, for example DD/MM/YYYY or MM-DD-YY. If | wanted to get DD/MM/YYYY | would use SELECT FORMAT (getdate(), 'dd/MM/yyyy’).” “For a database table to qualify as ‘relational’, it needs to have a primary key. A primary key has one or more columns. The data in the columns is then used to identify each row in a table. Basically, these are very similar to street addresses, for example. So, if you think of the rows in the table as the dustbins or trashcans belonging to houses on a street, the primary key is the list of the addresses. Primary key attributes cannot have NULL values. A foreign key is a column in one table. In that table, the values are members of a primary key column in another table. It is possible for a foreign key attribute to accept NULL values and for there to be more than one foreign key in a table.” Mareen “Il want to leave my job because | am looking for a fresh challenge with a company that has exciting and ambitious plans for the future, and one that will also use my skills and technical SQL abilities to the full. My employer has been great and we have achieved some fantastic things whilst | have been there, but | am now ready for a new challenge, and | would like that challenge to be with your company.” “Denormalization is a method used to improve the performance of a database, allowing the retrieval of data in the quickest time possible. Essentially, the process of denormalization adds redundant database data into a table which in turn enables the performance of the database to improve significantly, as the same data can be put in several places.” “Normalization reduces redundancy of data within a database. Normalization is a design technique that places larger database tables into smaller tables and then uses specific relationships to link them. In other words, normalization is the process of putting each piece of data in the appropriate place, using multiple tables. The benefit is keeping data integrity and it makes updating faster, but retrieval of data, can then in turn be slower.” Q20. What are your salary expectations in this SQL position? “| have carried out some research in relation to the average salary for this SQL position, and the general range is between $40,000 and $48,000. Whilst | do personally feel | am worth the higher end of the salary scale, | understand and appreciate | need to prove to you my worth. On that basis, | would be comfortable with a salary of $45,000.” “A subquery is often referred to as an inner query or inner select. As the name suggests, it is an SQL query nested inside a larger query, such as a SELECT, UPDATE, or INSERT statement, or indeed inside another subquery. Asubquery can be used to retrieve data that will be used in the main query. This in turn provides a condition to restrict the retrieval of data even further.” “The data rows will be stored in order. Cluster indexes sort data rows based on their key values. When a table doesn’t use clustered index, this is called a heap — in other words, the data rows will be unordered.” Erle DOC em Cay Delete PRG aa Delete command ic used ta delete 3 row ina table ¥ You can roliback data after using delete statement. ¥ ttis@ DML command, ts slower than truncate statement ee Truneate ~ Truncate is used to delete all the rows from a table. + You cannot rollback data ¥ itis DDL command, ¥ tisfaster. edurekal ‘MySQL DBA Certification Training omesace/nbi Ely ree Toy Cereccney Rey PENA eel faa Po crm Pra ea iy Cerca Pao and field in SL? [A Database Management System (DBMS} isa software application that Interacts with the user, applications and the database Itself to capture ‘and analyse data. The data stored in the database can be modified, retrieved and deleted, and can be of any type lke strings, numbers, mages etc. HIERARCHIAL NETWORK RELATIONAL: (OBJECT-ORIENTED Table ‘table refers to colecton of dataln an organised manner inform of rows and columns, Field A fild refers to the number of columns ina table att EMPLOYEE_INFORMATION ‘MySQL DEA Certification Training — cle Trae iy Cereccnry Toei Per crm Trea Ly Crreret) at is a Unique ke Constraints are used to specify the limit on the data type ofthe table. It canbe specified while creating or altering the table statement. ord ‘This onsaint ensues tht al the vals na conn Cred ee es sera conto et of au ales rad ‘MySQL DEA Certification Taning aa Uniquely identifies a single row inthe table, Null values ae allowed, Duplicate values are not alowed. ‘MySQL DEA Certification Taning ae crm aa Ly Crreriees Oo) integrity? Per crm Pea ea Ly Cree) Nee icc between clustered and non clustered index in SQL? Data Integrity Acree of data Gon istency of data Tntegrity Constraints to enforce business rules on data. ‘MySQL DBA Cetiiation ae ¥ Clustered index is used for easy retrieval of data from the database ands faster, ¥ Clustered indox alters the way records are stored in a database asit sorts out rows by the coluran whichis set to be clustered index (© one table can only have one clustered index. Non Chustered Index ~ Non-Clustered indexs used for easy retrieval of date from the database and is slower. ~ "Non clustered index does not alter the way it was stored but it Creates a separate object within table which points back to ‘the orginal table rows ater searching, ¥ One table can have many non-custered indexes. ‘MySQL DBA Cetiiation| aoe Elm Interview Questions Crrernee) eRe ier) the current date: te Elm Interview Questions Cree ret ey Dead In SQL, there isa built-in function caled GetDate() which helps to return the current imestamp/date, syntax. GETDATE ( ) Server 2014, SOL Server 2012, ‘Applies To SELECT GETDATE(); Example ——— result: (2019-03-18 18:17:28,160" ‘MySQL DEA Cetifiation| cae Denormalization refers toa technique which is used to access data from higher to lower forms ofa database, Adds the redundant data into a tat incorporating database queries that combine data from various tables into a single table. ‘MySQL DBA Certtiation| aoe Erle rae Ly Crreret) Per Erle rae Ly Crrecrners Index Performance Tuning Method Allows faster retrieval of records from the table Creates an entry for each value ‘MySQL DEA Certiction Te oe To display name ofthe employees that ben with‘ type in the below commana! SELECT * FROM Table_nane WHERE Enpllane Like" AX’ ‘MySQL DBA Cetiction Te aoe Erm ree Ty You can write a query a follows: Cree rners SELECT ToP 1 salary FROM SELECT Top 3 salary FROM enployee_table Roe ee ORDER BY salary DESC) AS emp Pa ORDER BY salary ASC; Cem ad edureka! mn ‘MySQL DBA Cetfication Training el Elm PO ir Group functions work on the sot of rows and returns one Cree rer) ‘Some of the commenly used group functions are: eee eee or ce) functions in SQL? Qe oY ‘VARIANCE a $< Erle Trae Ly Creer the main diffe aay Nae) Per cle Tae Ly Creer) a erates ai rcel BETWEEN Used to display rows based on @ range of values in a row. Example of BETWEEN: SELECT * FROM Students where ROLL_NO BETWEEN 10 AND 50 IN Used to check for values contained in a specifi set of valu Example of ne SELECT * FROM students where ROLL_NO IN (815,25); ‘MySQL DBA Cetiiation ae SQL clause helps to limit the result set by 1g @ condition to the query. A clause helps to filter the rows from the entire set of records. Example: WHERE & HAVING clause ‘MySQL DBA Cetiiation aoe Erle Pea ea Ly Crrerers Nee icici) Pewee mV caen tris BERT seen Erm ree Toy reer eee cr in SQL HAVING CLAUSE can be used only with SELECT statement. Its wsvally used in @ ‘GROUP BY clause, WHERE CLAUSE WHERE Clause is applied to each row before they are @ part of ‘the GROUP BY function in a query. ‘MySQL DEA Certification Talning ere ‘This function returns the string in lowercase. It takes a string as an argument and returns it by converting t inte lower case. This function returns the string in uppercase. Ittakes.a string 35 an ‘argument and returns it by converting it into uppercase. ‘Syntax: UPPER(‘string’) This Function returns the string withthe frst letter in uppercase and rest ofthe leters in lowercase. ‘Syntax INITCAP( string’) ‘MySQL DBA Cetincation Training oe Erle eae iy Creer Pern Erle eae Ly Creer) Pee ec Peer erg: pentane ALIAS name can be given to any table or a column. This alias name can be referred in WHERE clause to identify « particular table or a column. Example Select enp.empID, dept.Result fron employee fenp, department as dept where lenp. emprD=dept .enpr0 ‘MySQL DBA Cetiiation ae LIKE operator is used for pattern matching. % - it matches zero or more characters. exemple SELECT * FROW students WHERE studentnane LIKE 5 t matches exactly one character example SELECT * FROM student WHERE studentnane LIKE abe” ‘MySQL DBA Cetiiation ae crm eae Ly renner) Nhat is the main diffe Peano ected Pee Tle eae iy reerary Seat SQL Isa query languoge that allows you to issue a single query or execute a single INSERT/UPOATE/DELETE v/s PL/SQL Is Oracle's “Procedural Language” SQL, which allows you to write a ful program (loop, variables, etc) to accomplish multiple operations such as ‘SELECTSJINSERTS/UPDATES/DELETES. ‘MySQL DBA Cetiiation ae Dotawarshouse refers to a central repository of data where the data is assembled from multiple sources of information. Warehouse data also have @ subset of data called Data Marts. ‘MySQL DEA Cetiiation ae

You might also like