Database Articles

Page 12 of 546

How to List All Tables in a Schema in Oracle Database?

Bharti Kumari
Bharti Kumari
Updated on 04-Oct-2023 52K+ Views

Introduction In Oracle databases, a schema is a logical grouping of related objects, such as tables, views, and stored procedures. Each schema belongs to a specific database user and has a set of associated privileges. To list all tables in a schema in an Oracle database, you can use one of the views in the data dictionary. The `ALL_TABLES` view contains one row for each table in the current schema, while the `DBA_TABLES` view contains one row for each table in the entire database. To list the tables in a schema, you can use a SELECT statement to query the ...

Read More

How can we capitalize only first letter of a string with the help of MySQL function/s?

Sharon Christine
Sharon Christine
Updated on 14-Sep-2023 29K+ Views

Actually, there is no single function in MySQL to capitalize only first letter of the string. We need to use nesting of functions and for this case, we can use UPPER() and LOWER() with SUBSTRING() functions. To understand it, we are using data, given as below, from ‘emp_tbl’.mysql> Select * from emp_tbl; +----+----------------+ | Id | Name           | +----+----------------+ | 1  | rahul singh    | | 2  | gaurav kumar   | | 3  | yashpal sharma | | 4  | krishan kumar  | | 5  | kuldeep rai    | | 6  | ...

Read More

How to Update Two Tables in One Statement in SQL Server?

Bharti Kumari
Bharti Kumari
Updated on 14-Sep-2023 53K+ Views

Introduction In SQL Server, you may sometimes need to update data in multiple tables at the same time. This can be done using a single UPDATE statement, which allows you to update multiple tables in a single query. To update two tables in one statement, you can use the UPDATE statement with a JOIN clause. The JOIN clause allows you to specify a relationship between the two tables that you want to update, based on a common column or set of columns. Definition The term "update two tables in one statement" refers to the process of using a single UPDATE ...

Read More

How to count the number of tables in a MySQL database?

Arjun Thakur
Arjun Thakur
Updated on 14-Sep-2023 40K+ Views

To count the total number of tables, use the concept of count(*) with table_schema. First, to check how many tables are present in our database "business", we need to use the 'show' command. mysql> show tables; The following is the output that displays all the tables in the database "business". +--------------------------+ | Tables_in_business | +--------------------------+ | addcheckconstraintdemo | | addcolumntable | | addconstraintdemo | | addnotnulldemo ...

Read More

What are different types of DBMS languages?

Bhanu Priya
Bhanu Priya
Updated on 14-Sep-2023 40K+ Views

Once data is stored or filled it requires manipulation like insertion, deletion, updating, and modification of data. For these operations a set of languages are provided by the database management system (DBMS). So, the database languages are used to read, update and store data in the database.The different types of DBMS languages are as follows −Data Definition Language (DDL) − Create, Drop, Truncate, Rename.Data Manipulation language (DML) − Select, Insert, Delete, Update.Data Control Language (DCL) − Revoke, Grant.Transaction Control Language (TCL) − Rollback, Commit.The DBMS languages are pictorially represented as follows −Data Definition Language (DDL)It is a language that allows ...

Read More

How to get the next auto-increment id in MySQL?

Arjun Thakur
Arjun Thakur
Updated on 14-Sep-2023 34K+ Views

MySQL has the AUTO_INCREMENT keyword to perform auto-increment. The starting value for AUTO_INCREMENT is 1, which is the default. It will get increment by 1 for each new record. To get the next auto increment id in MySQL, we can use the function last_insert_id() from MySQL or auto_increment with SELECT. Creating a table, with "d" as auto-increment. mysql> create table NextIdDemo -> ( -> id int auto_increment, -> primary key(id) -> ); Query OK, 0 rows affected (1.31 sec) Inserting records into the table. mysql> insert into NextIdDemo ...

Read More

Extended Entity-Relationship (EE-R) Model

Ricky Barnes
Ricky Barnes
Updated on 13-Sep-2023 56K+ Views

EER is a high-level data model that incorporates the extensions to the original ER model. Enhanced ERD are high level models that represent the requirements and complexities of complex database.In addition to ER model concepts EE-R includes −Subclasses and Super classes.Specialization and Generalization.Category or union type.Aggregation.These concepts are used to create EE-R diagrams.Subclasses and Super classSuper class is an entity that can be divided into further subtype.For example − consider Shape super class.Super class shape has sub groups: Triangle, Square and Circle.Sub classes are the group of entities with some unique attributes. Sub class inherits the properties and attributes from ...

Read More

Explain about nested queries in DBMS

Bhanu Priya
Bhanu Priya
Updated on 13-Sep-2023 40K+ Views

A nested query is a query that has another query embedded within it. The embedded query is called a subquery.A subquery typically appears within the WHERE clause of a query. It can sometimes appear in the FROM clause or HAVING clause.ExampleLet’s learn about nested queries with the help of an example.Find the names of employee who have regno=103The query is as follows −select E.ename from employee E where E.eid IN (select S.eid from salary S where S.regno=103);Student tableThe student table is created as follows −create table student(id number(10), name varchar2(20), classID number(10), marks varchar2(20)); Insert into student values(1, 'pinky', 3, ...

Read More

What is tier-3 architecture in DBMS?

Bhanu Priya
Bhanu Priya
Updated on 13-Sep-2023 36K+ Views

The overall design of the Database Management System (DBMS) depends on its architecture. A large amount of data on web servers, Personal Computers (PC) and other elements are linked with networks with the help of basic client or server architecture.PCs and workstations are part of Client architecture that are connected over the network. The architecture of DBMS depends on how the users are linked to the database.There are three kinds of DBMS Architecture, which are as follows −Tier-1 Architecture.Tier-2 Architecture.Tier-3 Architecture.Tier-3 ArchitectureThe 3-tier architecture contains one more layer between the client and the server.In this architecture, there is no direct ...

Read More

Difference between DDL and DML in DBMS

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 12-Sep-2023 39K+ Views

Anybody dealing with databases must comprehend the distinction between DDL and DML commands because it has an impact on how data is saved, accessed, and modified. A collection of commands called DDL are used to specify a database's structure. Database objects including tables, views, indexes, and constraints can be created, modified, and deleted using these commands. DDL statements specify how the data is arranged and accessed rather than altering the data that is stored in the database. DML, on the other hand, is a set of instructions used to work with the data that is kept in the ...

Read More
Showing 111–120 of 5,457 articles
« Prev 1 10 11 12 13 14 546 Next »
Advertisements