Your problem can be modelled in UML - see the picture bellow...
(I have made few edits inspired by srutzky's answer to show where the UML composition should be)
The class TypeOfThing is optional but it is a good habit to include it. It basicaly enables you to distinguish the type of Thing in a collection. The SerialNo attribute represents the order of Things in the collection in Class A.
There are several ways how to implement this model in SQL relational database.
One of them showed Pieter Geerkens in his answer - to create a table for every particular class X, Y and Z.
There is also another option - to create a table that mixes the classes X, Y and Z together.
Here is the database diagram:
And here is the code in SQL Server t-sql. Mark that optional fields are nullable - e.g. the class X stored in the table Things will allways have the field [value] = NULL. The table/class AItem in this model encapsulates only the functionality of ordered list, as you required.
CREATE TABLE [dbo].[TypeOfThing](
[TypeOfThingID] [int] NOT NULL,
[TypeOfThing] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_TypeOfThing] PRIMARY KEY CLUSTERED
(
[TypeOfThingID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[B](
[BId] [int] NOT NULL,
CONSTRAINT [PK_B] PRIMARY KEY CLUSTERED
(
[BId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[A](
[AId] [int] NOT NULL,
[AName] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_A] PRIMARY KEY CLUSTERED
(
[AId] ASC
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[AItem](
[AItemId] [int] NOT NULL,
[AId] [int] NOT NULL,
[ThingID] [int] NOT NULL,
[SerialNo] [int] NOT NULL,
CONSTRAINT [PK_AItem] PRIMARY KEY CLUSTERED
(
[AItemId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [dbo].[AItem] WITH CHECK ADD CONSTRAINT [FK_A_Things] FOREIGN KEY([ThingID])
REFERENCES [dbo].[Thing] ([ThingId])
ALTER TABLE [dbo].[AItem] CHECK CONSTRAINT [FK_A_Things]
ALTER TABLE [dbo].[AItem] WITH CHECK ADD CONSTRAINT [FK_AItem_A] FOREIGN KEY([AId])
REFERENCES [dbo].[A] ([AId])
ALTER TABLE [dbo].[AItem] CHECK CONSTRAINT [FK_AItem_A]
CREATE TABLE [dbo].[Thing](
[ThingId] [int] NOT NULL,
[TypeOfThingId] [int] NOT NULL,
-- OR ThingCode char(1) NOT NULL,
[Attr] [int] NULL,
[Value] [nvarchar](100) NULL,
[BId] [int] NULL,
CONSTRAINT [PK_Things] PRIMARY KEY CLUSTERED
(
[ThingId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [dbo].[Thing] WITH CHECK ADD CONSTRAINT [FK_Things_B] FOREIGN KEY([BId])
REFERENCES [dbo].[B] ([BId])
ALTER TABLE [dbo].[Thing] CHECK CONSTRAINT [FK_Things_B]
ALTER TABLE [dbo].[Thing] WITH CHECK ADD CONSTRAINT [FK_Things_TypeOfThing] FOREIGN KEY([TypeOfThingId])
REFERENCES [dbo].[TypeOfThing] ([TypeOfThingID])
ALTER TABLE [dbo].[Thing] CHECK CONSTRAINT [FK_Things_TypeOfThing]
You can replace the table TypeOfThing with just one TypeOfThing char(1) NOT NULL column in the table Things, that would allways contain either 'X', 'Y' or 'Z' - this could be for example ensured using check constrains.
This approach is called Single table inheritance, see:
http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html
This approach is useful when your inherited classes have many attributes (columns, properties...) in common and there is only relatively small difference between them.
Peter's answer copies the approach called Concrete table inheritance http://www.martinfowler.com/eaaCatalog/concreteTableInheritance.html. There is also Class table inheritance which is something between them.
The select to get the ordered list of things contained in A class would be like this:
SELECT * FROM A
INNER JOIN AItem ON A.AId=AItem.AId
INNER JOIN Thing ON AItem.ThingID=Thing.ThingId
INNER JOIN TypeOfThing ON Thing.TypeOfThingId=TypeOfThing.TypeOfThingId
WHERE A.AName = 'Some instance of class A'
ORDER BY AItem.SerialNo ASC
This is quite common problem and usually this is not the reason to look for another non-relational type of database - this is my answer to the question 2.
B reference
?B
is just another entity.